summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-13 08:14:47 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-13 08:14:47 +0000
commit722e691af737862b32515fd5644feb33547eff8f (patch)
treec6730a14de9a90d9012aac2243e5c87ae743f9b1 /syslogd.c
parent088ad960e9d77d6a58a3914e53275a5e40b85dc3 (diff)
downloadrsyslog-722e691af737862b32515fd5644feb33547eff8f.tar.gz
rsyslog-722e691af737862b32515fd5644feb33547eff8f.tar.xz
rsyslog-722e691af737862b32515fd5644feb33547eff8f.zip
- introduced a new, more powerful, message submission interface submitMsg()
in additon to logmsg() - a first, rough implementation of imfile that is able to read files (but does not persist or handle rotation or whatever)
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/syslogd.c b/syslogd.c
index bb4cda87..fa364d4d 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2131,6 +2131,27 @@ static 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
+ * 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...).
+ * rgerhards, 2008-02-13
+ */
+rsRetVal
+submitMsg(msg_t *pMsg)
+{
+ DEFiRet;
+
+ ISOBJ_TYPE_assert(pMsg, msg);
+
+ MsgPrepareEnqueue(pMsg);
+ queueEnqObj(pMsgQueue, (void*) pMsg);
+
+ RETiRet;
+}
+
+
/*
* Log a message to the appropriate log files, users, etc. based on
* the priority.
@@ -4869,6 +4890,5 @@ int main(int argc, char **argv)
}
-/*
- * vi:set ai:
+/* vim:set ai:
*/