X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fredis.c;h=85a8354629240553f7e60a65ae0c5cb72446ae29;hb=9b022ebf40a1a49bedf5992e6542c1c0b6a62c13;hp=4f4b33bb562a540cb550c599e030dac17dac11bb;hpb=9b278e25d07baaa188ee349beddb8c1d303ceeb5;p=collectd.git diff --git a/src/redis.c b/src/redis.c index 4f4b33bb..85a83546 100644 --- a/src/redis.c +++ b/src/redis.c @@ -28,7 +28,12 @@ #include #include +#ifndef HOST_NAME_MAX +# define HOST_NAME_MAX _POSIX_HOST_NAME_MAX +#endif + #define REDIS_DEF_HOST "localhost" +#define REDIS_DEF_PASSWD "" #define REDIS_DEF_PORT 6379 #define REDIS_DEF_TIMEOUT 2000 #define MAX_REDIS_NODE_NAME 64 @@ -225,8 +230,8 @@ static void redis_submit_d (char *plugin_instance, static int redis_init (void) /* {{{ */ { - redis_node_t rn = { "default", REDIS_DEF_HOST, REDIS_DEF_PORT, - REDIS_DEF_TIMEOUT, /* next = */ NULL }; + redis_node_t rn = { "default", REDIS_DEF_HOST, REDIS_DEF_PASSWD, + REDIS_DEF_PORT, REDIS_DEF_TIMEOUT, /* next = */ NULL }; if (nodes_head == NULL) redis_node_add (&rn);