]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_dahdi: Fix segfault reloading chan_dahdi when round robin is used.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 3 Jul 2013 23:27:52 +0000 (23:27 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 3 Jul 2013 23:27:52 +0000 (23:27 +0000)
* Clear round_robin[] in dahdi_restart().

(closes issue ASTERISK-21847)
Reported by: Ivo Andonov
Patches:
      jira_asterisk_21847_v1.8.patch (license #5621) patch uploaded by rmudgett

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@393627 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index 5b33cd8001572bbe82e6e50ada10c2178470a94a..ac5f88e4bba5cafc5b274b2fd0d84dd06b80ebda 100644 (file)
@@ -15173,6 +15173,7 @@ static int dahdi_restart(void)
        dahdi_softhangup_all();
        ast_verb(4, "Final softhangup of all DAHDI channels complete.\n");
        destroy_all_channels();
+       memset(round_robin, 0, sizeof(round_robin));
        ast_debug(1, "Channels destroyed. Now re-reading config. %d active channels remaining.\n", ast_active_channels());
 
        ast_mutex_unlock(&monlock);