From 169551c223d9d14ddfaf4db583e591a3cb8ef6dc Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 27 Jan 2006 17:07:19 +0000 Subject: Some message and comment cleanup. --- daemon/rrdbotd.c | 2 +- daemon/snmp-engine.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/daemon/rrdbotd.c b/daemon/rrdbotd.c index 7b8a79a..39094cd 100644 --- a/daemon/rrdbotd.c +++ b/daemon/rrdbotd.c @@ -62,7 +62,7 @@ /* The one main state object */ rb_state g_state; -/* TODO: These should be set from the command line */ +/* Some logging flags */ static int daemonized = 0; static int debug_level = LOG_ERR; diff --git a/daemon/snmp-engine.c b/daemon/snmp-engine.c index 8b72c67..c0af083 100644 --- a/daemon/snmp-engine.c +++ b/daemon/snmp-engine.c @@ -248,8 +248,6 @@ finish_poll(rb_poller* poll, mstime when) /* Update the book-keeping */ poll->last_polled = when; - rb_messagex(LOG_DEBUG, "collected poll values. sending them to rrd"); - /* And send off our collection of values */ rb_rrd_update(poll); } @@ -464,8 +462,8 @@ poller_timer(mstime when, void* arg) req->poll = poll; req->host = it->host; - rb_messagex(LOG_DEBUG, "preparing request '%d' for: %s@%s", - req->id, req->host->community, req->host->name); + /* rb_messagex(LOG_DEBUG, "preparing request '%d' for: %s@%s", + req->id, req->host->community, req->host->name); */ /* Setup the packet */ strlcpy(req->pdu.community, req->host->community, sizeof(req->pdu.community)); @@ -533,8 +531,6 @@ receive_resp(int fd, int type, void* arg) if(sock_any_ntop(&from, hostname, MAXPATHLEN, 0) == -1) strcpy(hostname, "[UNKNOWN]"); - rb_messagex(LOG_DEBUG, "received packet from: %s", hostname); - /* Now parse the packet */ b.asn_ptr = snmp_buffer; @@ -550,7 +546,10 @@ receive_resp(int fd, int type, void* arg) /* It needs to match something we're waiting for */ req = find_req(pdu.request_id); if(!req) + { + rb_messagex(LOG_DEBUG, "received extra or delayed packet from: %s", hostname); return; + } /* Check for errors */ if(pdu.error_status != SNMP_ERR_NOERROR) -- cgit v1.2.3