summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-06-07 19:07:23 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-06-07 19:07:23 +0200
commit209948aa4da22727a33c408d4c7961dcd1f630fc (patch)
tree91cee733088ba39e405dd1fe818f32b6075e014c
parentee403c2ad745039add6cd34ec1e9a55aa9d51160 (diff)
downloadrsyslog-209948aa4da22727a33c408d4c7961dcd1f630fc.tar.gz
rsyslog-209948aa4da22727a33c408d4c7961dcd1f630fc.tar.xz
rsyslog-209948aa4da22727a33c408d4c7961dcd1f630fc.zip
set queue name to aciton name (useful for impstats!)
so far untested, test follows
-rw-r--r--action.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/action.c b/action.c
index c5bd03cb..6a8bd2a3 100644
--- a/action.c
+++ b/action.c
@@ -290,7 +290,12 @@ actionConstructFinalize(action_t *pThis)
ASSERT(pThis != NULL);
/* find a name for our queue */
- snprintf((char*) pszQName, sizeof(pszQName)/sizeof(uchar), "action %d queue", iActionNbr);
+ if(pThis->pszName == NULL) {
+ snprintf((char*) pszQName, sizeof(pszQName)/sizeof(uchar), "action %d queue", iActionNbr);
+ } else {
+ strncpy(pszQName, pThis->pszName, sizeof(pszQName));
+ pszQName[63] = '\0'; /* to be on the save side */
+ }
/* now check if we can run the action in "firehose mode" during stage one of
* its processing (that is before messages are enqueued into the action q).