[asterisk-commits] mmichelson: branch 1.4 r92510 - /branches/1.4/res/res_features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 12 11:46:15 CST 2007
Author: mmichelson
Date: Wed Dec 12 11:46:14 2007
New Revision: 92510
URL: http://svn.digium.com/view/asterisk?view=rev&rev=92510
Log:
Correctly detect where a dynamic feature was activated. Before this patch,
the channel which initiated the bridge was always assumed to have been the one
which activated the dynamic feature. This patch corrects this.
(closes issue #11529, reported and patched by nic_bellamy)
Modified:
branches/1.4/res/res_features.c
Modified: branches/1.4/res/res_features.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_features.c?view=diff&rev=92510&r1=92509&r2=92510
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Wed Dec 12 11:46:14 2007
@@ -1059,15 +1059,18 @@
struct ast_flags features;
int res = FEATURE_RETURN_PASSDIGITS;
struct ast_call_feature *feature;
- const char *dynamic_features=pbx_builtin_getvar_helper(chan,"DYNAMIC_FEATURES");
+ char *dynamic_features;
char *tmp, *tok;
- if (sense == FEATURE_SENSE_CHAN)
+ if (sense == FEATURE_SENSE_CHAN) {
ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL);
- else
+ dynamic_features = pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES");
+ } else {
ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL);
+ dynamic_features = pbx_builtin_getvar_helper(peer, "DYNAMIC_FEATURES");
+ }
if (option_debug > 2)
- ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%d\n", chan->name, peer->name, sense, features.flags);
+ ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%d dynamic=%s\n", chan->name, peer->name, sense, features.flags, dynamic_features);
ast_rwlock_rdlock(&features_lock);
for (x = 0; x < FEATURES_COUNT; x++) {
More information about the asterisk-commits
mailing list