update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6212 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4a60c1e310
commit
62c6f628a2
|
@ -88,6 +88,25 @@ SWITCH_STANDARD_APP(dial_function)
|
|||
|
||||
}
|
||||
|
||||
SWITCH_STANDARD_APP(avoid_function)
|
||||
{
|
||||
void *y = NULL;
|
||||
int x = 0;
|
||||
|
||||
switch_channel_t *channel;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
for (x = 0; x < 5; x++) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Avoiding initial deadlock on channel %s.\n", switch_channel_get_name(channel));
|
||||
switch_yield(100000);
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "I should never be called!.\n");
|
||||
memset((void *) y, 0, 1000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
SWITCH_STANDARD_APP(goto_function)
|
||||
|
@ -333,6 +352,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dialplan_asterisk_load)
|
|||
/* a few fake apps for the sake of emulation */
|
||||
SWITCH_ADD_APP(app_interface, "Dial", "Dial", "Dial", dial_function, "Dial", SAF_SUPPORT_NOMEDIA);
|
||||
SWITCH_ADD_APP(app_interface, "Goto", "Goto", "Goto", goto_function, "Goto", SAF_SUPPORT_NOMEDIA);
|
||||
SWITCH_ADD_APP(app_interface, "AvoidingDeadlock", "Avoid", "Avoid", avoid_function, "Avoid", SAF_SUPPORT_NOMEDIA);
|
||||
|
||||
/* fake chan_sip facade */
|
||||
sip_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
|
||||
|
|
Loading…
Reference in New Issue