diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-10 14:27:26 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-10 14:27:26 +0000 |
commit | 28c44e9a7bf4f99279af94a96bac42d0379b27d0 (patch) | |
tree | 7f66af0893f092d3212e3e34218d41973a3fe2cc /syslogd.c | |
parent | 4c24b427954166689b58562d68fefcfda7439ace (diff) | |
download | rsyslog-28c44e9a7bf4f99279af94a96bac42d0379b27d0.tar.gz rsyslog-28c44e9a7bf4f99279af94a96bac42d0379b27d0.tar.bz2 rsyslog-28c44e9a7bf4f99279af94a96bac42d0379b27d0.zip |
- fixed a bug that caused a segfault on startup when no $WorkDir directivev3-10-1a
was specified in rsyslog.conf
- fixed a bug that caused a segfault on queues with types other than "disk"
- removed the now longer needed thread TermSyncTool
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -3244,7 +3244,7 @@ startInputModules(void) while(pMod != NULL) { if((iRet = pMod->mod.im.willRun()) == RS_RET_OK) { /* activate here */ - thrdCreate(pMod->mod.im.runInput, pMod->mod.im.eTermSyncType, pMod->mod.im.afterRun); + thrdCreate(pMod->mod.im.runInput, pMod->mod.im.afterRun); } else { dbgprintf("module %lx will not run, iRet %d\n", (unsigned long) pMod, iRet); } @@ -3349,6 +3349,12 @@ init(void) iMainMsgQueueNumWorkers = 1; } + if(MainMsgQueType == QUEUETYPE_DISK && pszWorkDir == NULL) { + fprintf(stderr, "No $WorkDirectory specified - can not run main message queue in 'disk' mode. " + "Using 'FixedArray' instead.\n"); + MainMsgQueType = QUEUETYPE_FIXED_ARRAY; + } + /* switch the message object to threaded operation, if necessary */ if(MainMsgQueType == QUEUETYPE_DIRECT || iMainMsgQueueNumWorkers > 1) { MsgEnableThreadSafety(); @@ -3360,6 +3366,7 @@ init(void) fprintf(stderr, "fatal error %d: could not create message queue - rsyslogd can not run!\n", iRet); exit(1); } +dbgprintf("queue 1 \n"); /* ... set some properties ... */ # define setQPROP(func, directive, data) \ CHKiRet_Hdlr(func(pMsgQueue, data)) { \ @@ -3371,18 +3378,21 @@ init(void) } setQPROP(queueSetMaxFileSize, "$MainMsgQueueFileSize", iMainMsgQueMaxFileSize); - setQPROPstr(queueSetFilePrefix, "$MainMsgQueueFilePrefix", +dbgprintf("queue 2 \n"); + setQPROPstr(queueSetFilePrefix, "$MainMsgQueueFileName", (pszMainMsgQFName == NULL ? (uchar*) "mainq" : pszMainMsgQFName)); # undef setQPROP # undef setQPROPstr +dbgprintf("try start queue \n"); /* ... and finally start the queue! */ CHKiRet_Hdlr(queueStart(pMsgQueue)) { /* no queue is fatal, we need to give up in that case... */ fprintf(stderr, "fatal error %d: could not start message queue - rsyslogd can not run!\n", iRet); exit(1); } +dbgprintf("queue running\n"); Initialized = 1; bHaveMainQueue = (MainMsgQueType == QUEUETYPE_DIRECT) ? 0 : 1; @@ -3395,6 +3405,7 @@ init(void) */ startInputModules(); +dbgprintf("inputs running\n"); if(Debug) { dbgPrintInitInfo(); } |