[asterisk-commits] file: branch 1.4 r63286 - in /branches/1.4: ./ include/asterisk/ main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 7 14:45:01 MST 2007


Author: file
Date: Mon May  7 16:45:01 2007
New Revision: 63286

URL: http://svn.digium.com/view/asterisk?view=rev&rev=63286
Log:
Merged revisions 63285 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r63285 | file | 2007-05-07 17:39:52 -0400 (Mon, 07 May 2007) | 2 lines

Properly handle what happens during a masquerade in relation to group counting. (issue #9657 reported by ramonpeek)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/include/asterisk/app.h
    branches/1.4/main/app.c
    branches/1.4/main/channel.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/include/asterisk/app.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/app.h?view=diff&rev=63286&r1=63285&r2=63286
==============================================================================
--- branches/1.4/include/asterisk/app.h (original)
+++ branches/1.4/include/asterisk/app.h Mon May  7 16:45:01 2007
@@ -225,6 +225,9 @@
 /*! Discard all group counting for a channel */
 int ast_app_group_discard(struct ast_channel *chan);
 
+/*! Update all group counting for a channel to a new one */
+int ast_app_group_update(struct ast_channel *old, struct ast_channel *new);
+
 /*! Lock the group count list */
 int ast_app_group_list_lock(void);
 

Modified: branches/1.4/main/app.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/app.c?view=diff&rev=63286&r1=63285&r2=63286
==============================================================================
--- branches/1.4/main/app.c (original)
+++ branches/1.4/main/app.c Mon May  7 16:45:01 2007
@@ -870,6 +870,20 @@
 	regfree(&regexbuf);
 
 	return count;
+}
+
+int ast_app_group_update(struct ast_channel *old, struct ast_channel *new)
+{
+	struct ast_group_info *gi = NULL;
+
+	AST_LIST_LOCK(&groups);
+	AST_LIST_TRAVERSE(&groups, gi, list) {
+		if (gi->chan == old)
+			gi->chan = new;
+	}
+	AST_LIST_UNLOCK(&groups);
+
+	return 0;
 }
 
 int ast_app_group_discard(struct ast_channel *chan)

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=63286&r1=63285&r2=63286
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Mon May  7 16:45:01 2007
@@ -3611,7 +3611,7 @@
 			original->fds[x] = clone->fds[x];
 	}
 
-	ast_app_group_discard(original);
+	ast_app_group_update(clone, original);
 
 	/* move any whisperer over */
 	ast_channel_whisper_stop(original);



More information about the asterisk-commits mailing list