From 37107dead1b79e6dfae26cf02864d431e2078916 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 5 Sep 2013 17:37:55 +0200 Subject: imudp: use inputname for statistics, if configured --- ChangeLog | 1 + plugins/imudp/imudp.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13066294..a9a75d43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ Version 7.5.3 [devel] 2013-07-?? - add main_queue() configuration object to configure main message queue - bugfix: stream compression in imptcp caused timestamp to be corrupted - imudp: add ability to specify SO_RCVBUF size (rcvbufSize parameter) +- imudp: use inputname for statistics, if configured - impstats: add process resource usage counters [via getrusage()] - librelp 1.2.0 is now required - make use of new librelp generic error reporting facility diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index cd856393..908dbde7 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -273,14 +273,14 @@ addListner(instanceConf_t *inst) newlcnfinfo->next = NULL; newlcnfinfo->sock = newSocks[iSrc]; newlcnfinfo->pRuleset = inst->pBindRuleset; - snprintf((char*)dispname, sizeof(dispname), "imudp(%s:%s)", bindName, port); - dispname[sizeof(dispname)-1] = '\0'; /* just to be on the save side... */ - CHKiRet(ratelimitNew(&newlcnfinfo->ratelimiter, (char*)dispname, NULL)); if(inst->inputname == NULL) { inputname = (uchar*)"imudp"; } else { inputname = inst->inputname; } + snprintf((char*)dispname, sizeof(dispname), "%s(%s:%s)", inputname, bindName, port); + dispname[sizeof(dispname)-1] = '\0'; /* just to be on the save side... */ + CHKiRet(ratelimitNew(&newlcnfinfo->ratelimiter, (char*)dispname, NULL)); if(inst->bAppendPortToInpname) { snprintf((char*)inpnameBuf, sizeof(inpnameBuf), "%s%s", inputname, port); -- cgit v1.2.3