[asterisk-commits] russell: branch 1.6.1 r161963 - in /branches/1.6.1: ./ main/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 9 09:07:04 CST 2008
Author: russell
Date: Tue Dec 9 09:07:03 2008
New Revision: 161963
URL: http://svn.digium.com/view/asterisk?view=rev&rev=161963
Log:
Merged revisions 161951 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r161951 | russell | 2008-12-09 08:57:39 -0600 (Tue, 09 Dec 2008) | 23 lines
Merged revisions 161948 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r161948 | russell | 2008-12-09 08:52:25 -0600 (Tue, 09 Dec 2008) | 15 lines
Fix a problem with GROUP() settings on a masquerade.
The previous code carried over group settings from the old channel to the new
one. However, it did nothing with the group settings that were already on the
new channel. This patch removes all group settings that already existed on the
new channel.
I have a more complicated version of this patch which addresses only the most
blatant problem with this, which is that a channel can end up with multiple
group settings in the same category. However, I could not think of a use case
for keeping any of the group settings from the old channel, so I went this route
for now.
(closes AST-152)
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/app.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/app.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/app.c?view=diff&rev=161963&r1=161962&r2=161963
==============================================================================
--- branches/1.6.1/main/app.c (original)
+++ branches/1.6.1/main/app.c Tue Dec 9 09:07:03 2008
@@ -1010,10 +1010,15 @@
struct ast_group_info *gi = NULL;
AST_RWLIST_WRLOCK(&groups);
- AST_RWLIST_TRAVERSE(&groups, gi, list) {
- if (gi->chan == old)
+ AST_RWLIST_TRAVERSE_SAFE_BEGIN(&groups, gi, list) {
+ if (gi->chan == old) {
gi->chan = new;
- }
+ } else if (gi->chan == new) {
+ AST_RWLIST_REMOVE_CURRENT(list);
+ ast_free(gi);
+ }
+ }
+ AST_RWLIST_TRAVERSE_SAFE_END
AST_RWLIST_UNLOCK(&groups);
return 0;
More information about the asterisk-commits
mailing list