summaryrefslogtreecommitdiffstats
path: root/tools/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-16 15:13:47 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-16 15:13:47 +0200
commit6f0db63e9b962edf6305860b608500e8c650b71b (patch)
tree142a4dc01419a08f46481d5ca5557da07f0474c7 /tools/syslogd.c
parentaef1a38fe8c7472362904b2f90c67113b21034ab (diff)
downloadrsyslog-6f0db63e9b962edf6305860b608500e8c650b71b.tar.gz
rsyslog-6f0db63e9b962edf6305860b608500e8c650b71b.tar.xz
rsyslog-6f0db63e9b962edf6305860b608500e8c650b71b.zip
milestone: input-side multiSubmit capability
... commit before I try to touch the queue side ;)
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r--tools/syslogd.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index ea8eff7a..4d2839a1 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1345,8 +1345,7 @@ int parseLegacySyslogMsg(msg_t *pMsg, int flags)
}
-/* submit a fully created message to the main message queue. The message is
- * fully processed and parsed, so no parsing at all happens. This is primarily
+/* submit a message to the main message queue. This is primarily
* a hook to prevent the need for callers to know about the main message queue
* (which may change in the future as we will probably have multiple rule
* sets and thus queues...).
@@ -1366,6 +1365,29 @@ submitMsg(msg_t *pMsg)
}
+/* submit multiple messages at once, very similar to submitMsg, just
+ * for multi_submit_t.
+ * rgerhards, 2009-06-16
+ */
+rsRetVal
+multiSubmitMsg(multi_submit_t *pMultiSub)
+{
+ int i;
+ DEFiRet;
+ assert(pMultiSub != NULL);
+
+ for(i = 0 ; i < pMultiSub->nElem ; ++i) {
+dbgprintf("multiSubmitMsg, index %d\n", i);
+ MsgPrepareEnqueue(pMultiSub->ppMsgs[i]);
+ qqueueEnqObj(pMsgQueue, pMultiSub->ppMsgs[i]->flowCtlType, (void*) pMultiSub->ppMsgs[i]);
+ }
+
+ pMultiSub->nElem = 0;
+
+ RETiRet;
+}
+
+
/* Log a message to the appropriate log files, users, etc. based on
* the priority.
* rgerhards 2004-11-08: actually, this also decodes all but the PRI part.