From: Russell Bryant Date: Thu, 5 May 2011 23:00:55 +0000 (+0000) Subject: Don't lose cdr_syslog config on a reload. X-Git-Tag: 1.8.5-rc1~11^2~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=448ceb5291b9e0c6871a776d9c94670e59c403fd;p=thirdparty%2Fasterisk.git Don't lose cdr_syslog config on a reload. (closes issue #18679) Reported by: enegaard Patches: issue18679_seanbright.patch uploaded by seanbright (license 71) Tested by: enegaard git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317480 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/cdr/cdr_syslog.c b/cdr/cdr_syslog.c index 6d9a6df3bc..63545208eb 100644 --- a/cdr/cdr_syslog.c +++ b/cdr/cdr_syslog.c @@ -264,8 +264,10 @@ static int reload(void) return AST_MODULE_LOAD_DECLINE; } - free_config(); - res = load_config(1); + if ((res = load_config(1))) { + free_config(); + } + AST_RWLIST_UNLOCK(&sinks); return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;