From 717eec35268cb3fe9fb5cefe11246255dbc3811e Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 4 Dec 2006 23:58:44 +0100 Subject: [PATCH] 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 --- src/email.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.11.0