[Freeswitch-dev] switch_ivr_bridge.c question

teldev ustcorporation at yahoo.com
Thu Feb 2 20:43:03 MSK 2012


Re-worded my original post a bit, sorry if it becomes a new thread...having
Nabble issues.

In switch_ivr_bridge.c on line 1474, we have the following lines of code:

 1474                   
switch_channel_clear_state_handler(originator_channel, NULL);
 1475                   
switch_channel_clear_state_handler(originatee_channel, NULL);
 1476                    switch_channel_set_state_flag(originator_channel,
CF_BRIDGE_ORIGINATOR);
 1477                   
switch_channel_clear_flag_recursive(originatee_channel,
CF_BRIDGE_ORIGINATOR);
 1478                   
switch_channel_add_state_handler(originator_channel,
&uuid_bridge_state_handlers);
 1479                   
switch_channel_add_state_handler(originatee_channel,
&uuid_bridge_state_handlers);

Is the call to “switch_channel_set_state_flag” a typo? Since line 1476
triggers an asynchronous flag change, and line 1477 changes the same flag
synchronously, on line 1478 the value of the flag becomes unpredictable
since the asynchronous change from line 1476 can happen before or after line
1477 (mostly after, of course).

Thanks again.

--
View this message in context: http://freeswitch-dev.4355.n6.nabble.com/switch-ivr-bridge-c-question-tp4359635p4359635.html
Sent from the FreeSWITCH-dev mailing list archive at Nabble.com.



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list