[collectd] [PATCH] email plugin: Make UNIX socket path configurable
at compile time.
Sebastian Harl
sh<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>tokkee.org
Mon Dec 4 23:58:44 CET 2006
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 <sh<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>tokkee.org>
---
src/email.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/email.c b/src/email.c
index f3a9a0d..9fd05ba 100644
--- a/src/email.c
+++ b/src/email.c
@@ -76,7 +76,11 @@ #define MODULE_NAME "email"
/* 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
--
1.4.3.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20061204/15245f7e/attachment.pgp
More information about the collectd
mailing list