diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-04 16:05:42 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-04 16:05:42 +0000 |
commit | faf8e5a3849621acfbd0a0887f2e924a40cb029a (patch) | |
tree | 2cc3b3c4342ccded98f56f6ec7bc72cf46c35dc5 /syslogd.c | |
parent | b95b5ab28407b75467c6cff63359cba9a0a3bd70 (diff) | |
download | rsyslog-faf8e5a3849621acfbd0a0887f2e924a40cb029a.tar.gz rsyslog-faf8e5a3849621acfbd0a0887f2e924a40cb029a.tar.xz rsyslog-faf8e5a3849621acfbd0a0887f2e924a40cb029a.zip |
- begun some work on Msg Object serializiation
- created a kind of general base class
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -3353,7 +3353,7 @@ init(void) } /* create message queue */ - CHKiRet_Hdlr(queueConstruct(&pMsgQueue, MainMsgQueType, iMainMsgQueueSize, msgConsumer)) { + CHKiRet_Hdlr(queueConstruct(&pMsgQueue, MainMsgQueType, iMainMsgQueueSize, msgConsumer, MsgSerialize, NULL)) { /* no queue is fatal, we need to give up in that case... */ fprintf(stderr, "fatal error %d: could not create message queue - rsyslogd can not run!\n", iRet); exit(1); @@ -4608,11 +4608,27 @@ static void mainThread() } +/* Method to initialize all global classes. + * rgerhards, 2008-01-04 + */ +static rsRetVal InitGlobalClasses(void) +{ + DEFiRet; + + CHKiRet(MsgClassInit()); + +finalize_it: + return iRet; +} + + /* This is the main entry point into rsyslogd. Over time, we should try to * modularize it a bit more... */ int main(int argc, char **argv) { + DEFiRet; + register int i; register char *p; int num_fds; @@ -4627,6 +4643,8 @@ int main(int argc, char **argv) * or put in conditional compilation. 2005-01-18 RGerhards */ #endif + CHKiRet(InitGlobalClasses()); + ppid = getpid(); if(chdir ("/") != 0) @@ -4883,6 +4901,11 @@ int main(int argc, char **argv) die(bFinished); thrdExit(); + +finalize_it: + if(iRet != RS_RET_OK) + fprintf(stderr, "rsyslogd run failed with error %d.\n", iRet); + return 0; } |