diff options
author | Michael Biebl <biebl@debian.org> | 2012-12-07 15:57:10 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2012-12-07 15:57:10 +0100 |
commit | ed0fad5385d95f30f7073bf3013e4ecabc4b29e4 (patch) | |
tree | 7445e112c605e9bbe04c70bf347fb4587a459d4b /runtime/rsconf.c | |
parent | 1796f8e02b6d0bc29ab65427d2ebf97f82f41999 (diff) | |
download | rsyslog-ed0fad5385d95f30f7073bf3013e4ecabc4b29e4.tar.gz |
Imported Upstream version 7.2.4upstream/7.2.4
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r-- | runtime/rsconf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c index dcaa1ad..ac9cd80 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -292,6 +292,9 @@ getNOW(eNOWType eNow, es_str_t **estr) case NOW_MINUTE: len = snprintf((char*) szBuf, sizeof(szBuf)/sizeof(uchar), "%2.2d", t.minute); break; + default: + len = snprintf((char*) szBuf, sizeof(szBuf)/sizeof(uchar), "*invld eNow*"); + break; } /* now create a string object out of it and hand that over to the var */ @@ -476,6 +479,9 @@ cnfGetVar(char *name, void *usrptr) estr = msgGetCEEVarNew((msg_t*) usrptr, name+2); else estr = msgGetMsgVarNew((msg_t*) usrptr, (uchar*)name+1); + } else { /* if this happens, we have a program logic error */ + estr = es_newStrFromCStr("err: var must start with $", + strlen("err: var must start with $")); } if(Debug) { char *s; @@ -752,7 +758,7 @@ activateMainQueue() { DEFiRet; /* create message queue */ - CHKiRet_Hdlr(createMainQueue(&pMsgQueue, UCHAR_CONSTANT("main Q"))) { + CHKiRet_Hdlr(createMainQueue(&pMsgQueue, UCHAR_CONSTANT("main Q"), 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); FINALIZE; |