diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-29 16:53:26 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-29 16:53:26 +0200 |
commit | de84a12f8a5f140c0f7b8e00f4cac92ef13cd866 (patch) | |
tree | eae06778ee37276778efe93db12f1172ba71b840 /tools/syslogd.c | |
parent | 151c22e579d6de345d9ac7971ba1ba2f41b88976 (diff) | |
download | rsyslog-de84a12f8a5f140c0f7b8e00f4cac92ef13cd866.tar.gz rsyslog-de84a12f8a5f140c0f7b8e00f4cac92ef13cd866.tar.xz rsyslog-de84a12f8a5f140c0f7b8e00f4cac92ef13cd866.zip |
introduced the idea of detached properties
some things inside the message can be used over a large number of
messages and need to to be allocated and re-written every time. I now
begin to implement this as a "prop_t" object, first use for the inputName.
Some input modules are already converted, some others to go. Will do
a little performance check on the new method before I go further.
Also, this commit has some cleanup and a few bug fixes that prevented
compiliation in debug mode (I overlooked this as I did not compile
for debug, what I normally do, and the automatted test also does not
do that)
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r-- | tools/syslogd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index 3204d94e..2fe949ac 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -580,7 +580,7 @@ static inline rsRetVal printline(uchar *hname, uchar *hnameIP, uchar *msg, int f CHKiRet(msgConstructWithTime(&pMsg, stTime, ttGenTime)); } if(pszInputName != NULL) - MsgSetInputName(pMsg, pszInputName, ustrlen(pszInputName)); + MsgSetInputNameStr(pMsg, pszInputName, ustrlen(pszInputName)); MsgSetFlowControlType(pMsg, flowCtlType); MsgSetRawMsgWOSize(pMsg, (char*)msg); @@ -881,7 +881,7 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags) DEFiRet; CHKiRet(msgConstruct(&pMsg)); - MsgSetInputName(pMsg, UCHAR_CONSTANT("rsyslogd"), sizeof("rsyslogd")-1); + MsgSetInputNameStr(pMsg, UCHAR_CONSTANT("rsyslogd"), sizeof("rsyslogd")-1); MsgSetRawMsgWOSize(pMsg, (char*)msg); MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName())); MsgSetRcvFrom(pMsg, glbl.GetLocalHostName()); @@ -2089,6 +2089,7 @@ runInputModules(void) { modInfo_t *pMod; + BEGINfunc /* loop through all modules and activate them (brr...) */ pMod = module.GetNxtType(NULL, eMOD_IN); while(pMod != NULL) { |