<refactor>

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4944 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-04-16 16:53:30 +00:00
parent 5cd76f4a03
commit f40f87ebca
13 changed files with 94 additions and 102 deletions

View File

@@ -52,29 +52,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_outgoing(switch_core_
return SWITCH_STATUS_MEMERR;
}
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_answer_channel(switch_core_session_t *session, switch_answer_channel_hook_t answer_channel)
{
switch_io_event_hook_answer_channel_t *hook, *ptr;
assert(answer_channel != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
hook->answer_channel = answer_channel;
if (!session->event_hooks.answer_channel) {
session->event_hooks.answer_channel = hook;
} else {
for (ptr = session->event_hooks.answer_channel; ptr && ptr->next; ptr = ptr->next);
ptr->next = hook;
}
return SWITCH_STATUS_SUCCESS;
}
return SWITCH_STATUS_MEMERR;
}
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_state_change(switch_core_session_t *session, switch_answer_channel_hook_t state_change)
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_state_change(switch_core_session_t *session, switch_state_change_hook_t state_change)
{
switch_io_event_hook_state_change_t *hook, *ptr;