Small tweaks so it actually compiles

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5001 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-04-22 19:11:22 +00:00
parent bb40700d84
commit deb4972610
3 changed files with 6 additions and 5 deletions

View File

@ -1 +1 @@
Tue Apr 19 14:23:59 EDT 2007
Sat Apr 21 16:48:55 EDT 2007

View File

@ -339,7 +339,7 @@ int main(int argc, char *argv[])
known_opt++;
}
if (!known_opt || argv[x] && !strcmp(argv[x], "-help")) {
if ((!known_opt || argv[x]) && !strcmp(argv[x], "-help")) {
printf("%s\n", usageDesc);
exit(0);
}

View File

@ -693,13 +693,14 @@ static void *SWITCH_THREAD_FUNC switch_core_session_thread(switch_thread_t * thr
switch_core_session_run(session);
switch_core_media_bug_remove_all(session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Session %u (%s) Locked, Waiting on external entities\n",
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Session %"SWITCH_SIZE_T_FMT" (%s) Locked, Waiting on external entities\n",
session->id, switch_channel_get_name(session->channel));
switch_core_session_write_lock(session);
switch_set_flag(session, SSF_DESTROYED);
switch_core_session_rwunlock(session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Session %u (%s) Ended\n", session->id, switch_channel_get_name(session->channel));
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Session %"SWITCH_SIZE_T_FMT" (%s) Ended\n",
session->id, switch_channel_get_name(session->channel));
switch_core_session_destroy(&session);
return NULL;
}
@ -805,7 +806,7 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch
switch_thread_cond_create(&session->cond, session->pool);
switch_thread_rwlock_create(&session->rwlock, session->pool);
snprintf(session->name, sizeof(session->name), "%u", session->id);
snprintf(session->name, sizeof(session->name), "%"SWITCH_SIZE_T_FMT, session->id);
switch_mutex_lock(runtime.session_table_mutex);
session->id = runtime.session_id++;
switch_core_hash_insert(runtime.session_table, session->uuid_str, session);