]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When StopMonitor is called, ensure that it will not be restarted by a channel event.
authorTilghman Lesher <tilghman@meg.abyt.es>
Sun, 25 Apr 2010 18:09:05 +0000 (18:09 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sun, 25 Apr 2010 18:09:05 +0000 (18:09 +0000)
(closes issue #16590)
 Reported by: kkm
 Patches:
       resmonitor-16590-trunk.239289.diff uploaded by kkm (license 888)

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

res/res_monitor.c

index d18a8ce25c57c5d417cd02283109a6260e34916d..dc24d4a726cac471475a737f9ed959e8627e60f0 100644 (file)
@@ -335,7 +335,9 @@ int ast_monitor_stop(struct ast_channel *chan, int need_lock)
                free(chan->monitor->format);
                free(chan->monitor);
                chan->monitor = NULL;
+               pbx_builtin_setvar_helper(chan, "MONITORED", NULL);
        }
+       pbx_builtin_setvar_helper(chan, "AUTO_MONITOR", NULL);
 
        UNLOCK_IF_NEEDED(chan, need_lock);