aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-03 14:29:17 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-03 14:29:17 +0000
commitd7fae26783eec720253525a2b9eb702888ffc718 (patch)
tree3875b41807e4ec95d6c04749f68fd5d61b15a4c9 /main/channel.c
parent572b8c9155dc9861caaaf438ca37fe091ef7ce31 (diff)
Fix order and redundancy of channel rename manager events in ast_do_masquerade.
Patch contributed by Mark Spencer. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@210027 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/main/channel.c b/main/channel.c
index 1052d0fe8..eb6995c66 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -5024,19 +5024,15 @@ int ast_do_masquerade(struct ast_channel *original)
/* Create the masq name */
snprintf(masqn, sizeof(masqn), "%s<MASQ>", newn);
- /* Copy the name from the clone channel */
- ast_change_name(original, newn);
-
/* Mangle the name of the clone channel */
ast_change_name(clonechan, masqn);
+ /* Copy the name from the clone channel */
+ ast_change_name(original, newn);
+
/* share linked id's */
ast_channel_set_linkgroup(original, clonechan);
- /* Notify any managers of the change, first the masq then the other */
- manager_event(EVENT_FLAG_CALL, "Rename", "Channel: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", newn, masqn, clonechan->uniqueid);
- manager_event(EVENT_FLAG_CALL, "Rename", "Channel: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", orig, newn, original->uniqueid);
-
/* Swap the technologies */
t = original->tech;
original->tech = clonechan->tech;