Fix skinny voicemail indication issues.
authorDamien Wedhorn <voip@facts.com.au>
Fri, 22 Mar 2013 06:32:03 +0000 (06:32 +0000)
committerDamien Wedhorn <voip@facts.com.au>
Fri, 22 Mar 2013 06:32:03 +0000 (06:32 +0000)
Unsubscribe from MWI stasis event on channel reload.

(closes issue ASTERISK-21216)
Reported by: wedhorn
Tested by: snuffy, myself
Patches:
    skinny-mwiind02.diff uploaded by snuffy (license 5024)

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

channels/chan_skinny.c

index 6045a09..f8f5328 100644 (file)
@@ -8571,6 +8571,9 @@ int skinny_reload(void)
                   We do not want to free the line here, that
                   will happen below. */
                while ((l = AST_LIST_REMOVE_HEAD(&d->lines, list))) {
+                       if (l->mwi_event_sub) {
+                               l->mwi_event_sub = stasis_unsubscribe(l->mwi_event_sub);
+                       }
                }
                /* Delete all speeddials for this device */
                while ((sd = AST_LIST_REMOVE_HEAD(&d->speeddials, list))) {