diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | runtime/conf.c | 6 | ||||
-rw-r--r-- | runtime/rsconf.c | 34 | ||||
-rw-r--r-- | runtime/ruleset.c | 2 |
4 files changed, 20 insertions, 24 deletions
@@ -2,6 +2,8 @@ Version 6.3.7 [DEVEL] 2011-0?-?? - imported refactored v5.9.6 imklog linux driver, now combined with BSD driver +- bugfix: rsyslog aborted during startup if there is an error in loading + an action and legacy configuration mode is used - bugfix: bsd klog driver did no longer compile - removed imtemplate/omtemplate template modules, as this was waste of time The actual input/output modules are better copy templates. Instead, the diff --git a/runtime/conf.c b/runtime/conf.c index 24f64b9f..37774902 100644 --- a/runtime/conf.c +++ b/runtime/conf.c @@ -736,9 +736,6 @@ rsRetVal cflineDoAction(rsconf_t *conf, uchar **p, action_t **ppAction) iRet = RS_RET_OK; } if(iRet == RS_RET_OK || iRet == RS_RET_SUSPENDED) { - /* advance our config parser state: we now only accept an $End as valid, - * no more action statments. - */ if((iRet = addAction(&pAction, pMod, pModData, pOMSR, NULL, NULL, (iRet == RS_RET_SUSPENDED)? 1 : 0)) == RS_RET_OK) { /* now check if the module is compatible with select features */ @@ -752,8 +749,7 @@ rsRetVal cflineDoAction(rsconf_t *conf, uchar **p, action_t **ppAction) conf->actions.nbrActions++; /* one more active action! */ } break; - } - else if(iRet != RS_RET_CONFLINE_UNPROCESSED) { + } else if(iRet != RS_RET_CONFLINE_UNPROCESSED) { /* In this case, the module would have handled the config * line, but some error occured while doing so. This error should * already by reported by the module. We do not try any other diff --git a/runtime/rsconf.c b/runtime/rsconf.c index 8d8891a5..ed61e65e 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -2,27 +2,24 @@ * * Module begun 2011-04-19 by Rainer Gerhards * - * Copyright 2011 by Rainer Gerhards and Adiscon GmbH. + * Copyright 2011-2012 Adiscon GmbH. * * This file is part of the rsyslog runtime library. * - * The rsyslog runtime library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * The rsyslog runtime library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with the rsyslog runtime library. If not, see <http://www.gnu.org/licenses/>. - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. - * A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * -or- + * see COPYING.ASL20 in the source distribution + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - #include "config.h" #include <stdio.h> #include <stdlib.h> @@ -241,7 +238,7 @@ cnfDoActlst(struct cnfactlst *actlst, rule_t *pRule) } else { dbgprintf("legacy action line:%s\n", actlst->data.legActLine); str = (uchar*) actlst->data.legActLine; - iRet = cflineDoAction(loadConf, &str, &pAction); + CHKiRet(cflineDoAction(loadConf, &str, &pAction)); iRet = llAppend(&(pRule)->llActList, NULL, (void*) pAction); } for( cflst = actlst->syslines @@ -250,6 +247,7 @@ cnfDoActlst(struct cnfactlst *actlst, rule_t *pRule) } actlst = actlst->next; } +finalize_it: RETiRet; } diff --git a/runtime/ruleset.c b/runtime/ruleset.c index ceab08d1..00d96714 100644 --- a/runtime/ruleset.c +++ b/runtime/ruleset.c @@ -266,7 +266,7 @@ addRule(ruleset_t *pThis, rule_t **ppRule) rule.Destruct(ppRule); } else { CHKiRet(llAppend(&pThis->llRules, NULL, *ppRule)); - dbgprintf("selector line successfully processed\n"); + dbgprintf("selector line successfully processed, %d actions\n", iActionCnt); } finalize_it: |