copy the monitor over when masquerading (bug #3809)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Russell Bryant 21 years ago
parent 7fe4d52579
commit 2595998b8f

@ -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));

Loading…
Cancel
Save