64 bit goodies

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@897 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-03-22 17:05:16 +00:00
1 parent ce72c5d1c8
commit 0e76b6355c
8 files changed
+1469 -18

No files matched your search

+9 -11
View File
@@ -1723,13 +1723,13 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
switch (state) {
case CS_NEW: /* Just created, Waiting for first instructions */
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "State NEW\n");
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "(%s) State NEW\n", switch_channel_get_name(session->channel));
break;
case CS_DONE:
continue;
break;
case CS_HANGUP: /* Deactivate and end the thread */
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "State HANGUP\n");
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "(%s) State HANGUP\n", switch_channel_get_name(session->channel));
if (!driver_state_handler->on_hangup ||
(driver_state_handler->on_hangup &&
driver_state_handler->on_hangup(session) == SWITCH_STATUS_SUCCESS &&
@@ -1768,7 +1768,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
midstate = switch_channel_get_state(session->channel);
break;
case CS_INIT: /* Basic setup tasks */
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "State INIT\n");
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "(%s) State INIT\n", switch_channel_get_name(session->channel));
if (!driver_state_handler->on_init ||
(driver_state_handler->on_init &&
driver_state_handler->on_init(session) == SWITCH_STATUS_SUCCESS &&
@@ -1804,7 +1804,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
}
break;
case CS_RING: /* Look for a dialplan and find something to do */
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "State RING\n");
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "(%s) State RING\n", switch_channel_get_name(session->channel));
if (!driver_state_handler->on_ring ||
(driver_state_handler->on_ring &&
driver_state_handler->on_ring(session) == SWITCH_STATUS_SUCCESS &&
@@ -1840,7 +1840,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
}
break;
case CS_EXECUTE: /* Execute an Operation */
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "State EXECUTE\n");
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "(%s) State EXECUTE\n", switch_channel_get_name(session->channel));
if (!driver_state_handler->on_execute ||
(driver_state_handler->on_execute &&
driver_state_handler->on_execute(session) == SWITCH_STATUS_SUCCESS &&
@@ -1876,7 +1876,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
}
break;
case CS_LOOPBACK: /* loop all data back to source */
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "State LOOPBACK\n");
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "(%s) State LOOPBACK\n", switch_channel_get_name(session->channel));
if (!driver_state_handler->on_loopback ||
(driver_state_handler->on_loopback &&
driver_state_handler->on_loopback(session) == SWITCH_STATUS_SUCCESS &&
@@ -1912,7 +1912,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
}
break;
case CS_TRANSMIT: /* send/recieve data to/from another channel */
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "State TRANSMIT\n");
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "(%s) State TRANSMIT\n", switch_channel_get_name(session->channel));
if (!driver_state_handler->on_transmit ||
(driver_state_handler->on_transmit &&
driver_state_handler->on_transmit(session) == SWITCH_STATUS_SUCCESS &&
@@ -1957,12 +1957,11 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session)
laststate = midstate;
}
if (state < CS_DONE && midstate == switch_channel_get_state(session->channel)) {
switch_thread_cond_wait(session->cond, session->mutex);
}
}
session->thread_running = 0;
}
@@ -2071,9 +2070,8 @@ static void *SWITCH_THREAD_FUNC switch_core_session_thread(switch_thread *thread
switch_core_hash_insert(runtime.session_table, session->uuid_str, session);
switch_core_session_run(session);
switch_core_hash_delete(runtime.session_table, session->uuid_str);
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Session %ld (%s) Ended\n", id, switch_channel_get_name(session->channel));
switch_core_session_destroy(&session);
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Session %ld Ended\n", id);
return NULL;
}