aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-05 00:02:09 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-05 00:02:09 +0000
commit478a588bae8d2fbf966a73f219acc91bc63cf495 (patch)
tree781e46a5b55b9b2b45437588a0ce2013ac361b7c /channel.c
parente4b55b1678a8263eea9e6e71c1857214a33022c2 (diff)
copy the monitor over when masquerading (bug #3809)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@6287 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channel.c b/channel.c
index 125829809..cb43057f1 100755
--- 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));