git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4887 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-04-07 21:23:01 +00:00
parent 10ae6900b4
commit 8f3249fce5
2 changed files with 7 additions and 3 deletions

View File

@ -1495,7 +1495,10 @@ static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
handle->state = CS_NEW;
}
ldl_clear_flag_locked(handle, LDL_FLAG_RUNNING);
if (!ldl_test_flag(handle, LDL_FLAG_TLS)) {
ldl_flush_queue(handle, 1);
}
while(ldl_test_flag(handle, LDL_FLAG_QUEUE_RUNNING)) {
microsleep(100);
}
@ -2077,10 +2080,10 @@ ldl_status ldl_global_init(int debug)
ldl_status ldl_global_destroy(void)
{
if (ldl_test_flag(&globals, LDL_FLAG_INIT)) {
if (!ldl_test_flag(&globals, LDL_FLAG_INIT)) {
return LDL_STATUS_FALSE;
}
apr_pool_destroy(globals.memory_pool);
ldl_clear_flag(&globals, LDL_FLAG_INIT);
apr_terminate();

View File

@ -1928,6 +1928,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
break;
}
}
if (globals.init) {
ldl_global_destroy();
}