From: Sebastian Harl Date: Mon, 4 Dec 2006 22:58:44 +0000 (+0100) Subject: email plugin: Make UNIX socket path configurable at compile time. X-Git-Tag: collectd-3.11.0~28 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=717eec35268cb3fe9fb5cefe11246255dbc3811e;p=collectd.git email plugin: Make UNIX socket path configurable at compile time. The prefix for the UNIX socket can be configured using the COLLECTD_SOCKET_PREFIX macro. "email" will be prepended to it. If you configure collectd using CFLAGS="-DCOLLECTD_SOCKET_PREFIX='\"$path-\"'" ./configure the socket will be found at "$path-email". Signed-off-by: Sebastian Harl --- diff --git a/src/email.c b/src/email.c index b7995973..b5d8acfd 100644 --- a/src/email.c +++ b/src/email.c @@ -71,7 +71,11 @@ /* 256 bytes ought to be enough for anybody ;-) */ #define BUFSIZE 256 -#define SOCK_PATH "/tmp/.collectd-email" +#ifndef COLLECTD_SOCKET_PREFIX +# define COLLECTD_SOCKET_PREFIX "/tmp/.collectd-" +#endif /* COLLECTD_SOCKET_PREFIX */ + +#define SOCK_PATH COLLECTD_SOCKET_PREFIX"email" #define MAX_CONNS 5 #define MAX_CONNS_LIMIT 16384