]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fixes bug with channel receiving wrong privileges after call parking
authorDavid Vossel <dvossel@digium.com>
Tue, 26 Jan 2010 23:55:49 +0000 (23:55 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 26 Jan 2010 23:55:49 +0000 (23:55 +0000)
(closes issue #16429)
Reported by: Yasuhiro Konishi
Patches:
      features.c.diff uploaded by Yasuhiro Konishi (license 947)
Tested by: dvossel

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@243390 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_features.c

index 3a0edde81198650b05d4aed01d49d6bac6e68584..e8937d54c3c36b04a6ce66f8c18ba3eac50efd0c 100644 (file)
@@ -2579,8 +2579,12 @@ static int park_exec(struct ast_channel *chan, void *data)
                }
                ast_channel_unlock(peer);
 
+               /* When the datastores for both caller and callee are created, both the callee and caller channels
+                * use the features_caller flag variable to represent themselves. With that said, the config.features_callee
+                * flags should be copied from the datastore's caller feature flags regardless if peer was a callee
+                * or caller. */
                if (dialfeatures) {
-                       ast_copy_flags(&(config.features_callee), dialfeatures->is_caller ? &(dialfeatures->features_caller) : &(dialfeatures->features_callee), AST_FLAGS_ALL);
+                       ast_copy_flags(&(config.features_callee), &(dialfeatures->features_caller), AST_FLAGS_ALL);
                }
 
                if ((parkedcalltransfers == AST_FEATURE_FLAG_BYCALLEE) || (parkedcalltransfers == AST_FEATURE_FLAG_BYBOTH)) {