]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
copy the monitor over when masquerading (bug #3809)
authorRussell Bryant <russell@russellbryant.com>
Fri, 5 Aug 2005 00:02:09 +0000 (00:02 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 5 Aug 2005 00:02:09 +0000 (00:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6287 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index 125829809b29f180842184794144f945a10e5c30..cb43057f1d5ac006266a1f1159e5ed30281380a8 100755 (executable)
--- a/channel.c
+++ b/channel.c
@@ -2211,6 +2211,7 @@ int ast_do_masquerade(struct ast_channel *original)
        struct ast_frame *cur, *prev;
        struct ast_channel_pvt *p;
        struct ast_channel *clone = original->masq;
+       struct ast_channel_monitor *monitor;
        int rformat = original->readformat;
        int wformat = original->writeformat;
        char newn[100];
@@ -2318,6 +2319,11 @@ int ast_do_masquerade(struct ast_channel *original)
 
        /* Update the type. */
        original->type = clone->type;
+
+       /* copy the monitor */
+       monitor = original->monitor;
+       original->monitor = clone->monitor;
+       clone->monitor = monitor;       
        
        /* Keep the same language.  */
        strncpy(original->language, clone->language, sizeof(original->language));