[asterisk-dev] dvossel: branch 1.4 r183126 - in /branches/1.4: apps/ include/asterisk/ res/

Russell Bryant russell at digium.com
Thu Mar 19 11:56:24 CDT 2009


Russell Bryant wrote:
>> +int ast_feature_detect(struct ast_channel *chan, struct ast_flags *features, char *code, struct ast_call_feature *feature) {
>> +
>> +	char *dynamic_features;
>> +	ast_channel_lock(chan);
>> +	dynamic_features = ast_strdupa(S_OR(pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"),""));
>> +	ast_channel_unlock(chan);
>> +
>> +	return feature_interpret_helper(chan, NULL, NULL, code, 0, dynamic_features, features, 0, feature);
>> +}
> 
> feature_interpret_helper() actually executes the feature if it is 
> matched.  So, in the case of app_dial, when you _only_ want to detect 
> and execute the disconnect feature, you are now also detecting and 
> executing any dynamic features that have been enabled on this channel. 
> This is undesired behavior.
> 

Oops, I misread this and now see that the features are not actually 
executed.  However, I am left wondering what the benefit is of passing 
the dynamic features in here.

-- 
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list