X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_daemon.c;h=2c81424a34d0426d8680b751f13221b9837d268c;hp=2eb69301d179f8b5653ed599c3f99d80d4c7eb94;hb=b63a6268ac7c3668f6731c0a0972e4575c3f6dcf;hpb=fa7d240d60a1179513ae9021bf948247d00592e4 diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index 2eb6930..2c81424 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -63,13 +63,6 @@ * Now for some includes.. */ /* {{{ */ -#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) -#include "../win32/config.h" -#else -#ifdef HAVE_CONFIG_H -#include "../rrd_config.h" -#endif -#endif #include "rrd_tool.h" #include "rrd_client.h" @@ -302,7 +295,9 @@ static int handle_request_help (HANDLER_PROTO); static void sig_common (const char *sig) /* {{{ */ { RRDD_LOG(LOG_NOTICE, "caught SIG%s", sig); - state = FLUSHING; + if (state == RUNNING) { + state = FLUSHING; + } pthread_cond_broadcast(&flush_cond); pthread_cond_broadcast(&queue_cond); } /* }}} void sig_common */ @@ -1331,7 +1326,7 @@ static int handle_request_update (HANDLER_PROTO) /* {{{ */ /* save it for the journal later */ if (!JOURNAL_REPLAY(sock)) - strncpy(orig_buf, buffer, buffer_size); + strncpy(orig_buf, buffer, min(RRD_CMD_MAX,buffer_size)); status = buffer_get_field (&buffer, &buffer_size, &file); if (status != 0) @@ -2654,7 +2649,7 @@ static void *connection_thread_main (void *args) /* {{{ */ getting overwritten by another thread. */ struct request_info req; - request_init(&req, RQ_DAEMON, "rrdcache\0", RQ_FILE, fd, NULL ); + request_init(&req, RQ_DAEMON, "rrdcached\0", RQ_FILE, fd, NULL ); fromhost(&req); if(!hosts_access(&req)) { RRDD_LOG(LOG_INFO, "refused connection from %s", eval_client(&req));