The assertion that peer was not found on final event
authorScott Griepentrog <sgriepentrog@digium.com>
Fri, 29 Aug 2014 18:46:19 +0000 (18:46 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Fri, 29 Aug 2014 18:46:19 +0000 (18:46 +0000)
message was being triggered on configuration reload.
This patch changes that case to just return instead.

Review: https://reviewboard.asterisk.org/r/3953/

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

channels/chan_sip.c

index 8b96f58..43630fb 100644 (file)
@@ -16656,7 +16656,10 @@ static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct
        struct sip_peer *peer = sip_find_peer(peer_name, NULL, TRUE, FINDALLDEVICES, FALSE, 0);
 
        if (stasis_subscription_final_message(sub, msg)) {
-               ast_assert(peer == NULL);
+               if (peer) {
+                       /* configuration reloaded */
+                       return;
+               }
                ast_free(peer_name);
                return;
        }