From cb843f8b788644ea441e9f122468f442ef3d9a0b Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 27 Jan 2012 14:29:48 +0100 Subject: bugfix: rsyslog aborted during startup if there is an error in loading an action and legacy configuration mode is used --- runtime/rsconf.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'runtime/rsconf.c') 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 . - * - * 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 #include @@ -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; } -- cgit