[Freeswitch-trunk] [commit] r12612 - in freeswitch/trunk: libs/esl/python libs/libdingaling/src src/mod/endpoints/mod_dingaling
FreeSWITCH SVN
anthm at freeswitch.org
Sun Mar 15 09:56:15 PDT 2009
Author: anthm
Date: Sun Mar 15 11:56:15 2009
New Revision: 12612
Log:
LIBDING-13
Modified:
freeswitch/trunk/libs/esl/python/events.py
freeswitch/trunk/libs/esl/python/single_command.py
freeswitch/trunk/libs/libdingaling/src/libdingaling.c
freeswitch/trunk/libs/libdingaling/src/libdingaling.h
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
Modified: freeswitch/trunk/libs/esl/python/events.py
==============================================================================
--- freeswitch/trunk/libs/esl/python/events.py (original)
+++ freeswitch/trunk/libs/esl/python/events.py Sun Mar 15 11:56:15 2009
@@ -5,7 +5,7 @@
from ESL import *
-con = ESLconnection("localhost","8021","ClueCon")
+con = ESLconnection("localhost","8021","rad1ance")
#are we connected?
if con.connected:
Modified: freeswitch/trunk/libs/esl/python/single_command.py
==============================================================================
--- freeswitch/trunk/libs/esl/python/single_command.py (original)
+++ freeswitch/trunk/libs/esl/python/single_command.py Sun Mar 15 11:56:15 2009
@@ -4,7 +4,7 @@
import sys
from ESL import *
-con = ESLconnection("localhost","8021","ClueCon")
+con = ESLconnection("localhost","8021","rad1ance")
#are we connected?
if con.connected:
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c Sun Mar 15 11:56:15 2009
@@ -1432,7 +1432,7 @@
ldl_set_flag_locked(handle, LDL_FLAG_QUEUE_RUNNING);
- while (ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
+ while (ldl_test_flag((&globals), LDL_FLAG_READY) && ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
ldl_flush_queue(handle, 0);
if (handle->loop_callback(handle) != LDL_STATUS_SUCCESS) {
@@ -1467,7 +1467,7 @@
static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
{
- while (ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
+ while (ldl_test_flag((&globals), LDL_FLAG_READY) && ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
int e;
char tmp[512], *sl;
@@ -1522,7 +1522,7 @@
launch_queue_thread(handle);
}
- while (ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
+ while (ldl_test_flag((&globals), LDL_FLAG_READY) && ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
e = iks_recv(handle->parser, 1);
if (!ldl_test_flag(handle, LDL_FLAG_TLS) && handle->loop_callback) {
if (handle->loop_callback(handle) != LDL_STATUS_SUCCESS) {
@@ -2166,6 +2166,12 @@
}
}
+ldl_status ldl_global_terminate(void)
+{
+ ldl_clear_flag_locked((&globals), LDL_FLAG_READY);
+ return LDL_STATUS_SUCCESS;
+}
+
ldl_status ldl_global_init(int debug)
{
if (ldl_test_flag((&globals), LDL_FLAG_INIT)) {
@@ -2191,6 +2197,7 @@
globals.logger = default_logger;
globals.avatar_hash = apr_hash_make(globals.memory_pool);
ldl_set_flag_locked((&globals), LDL_FLAG_INIT);
+ ldl_set_flag_locked((&globals), LDL_FLAG_READY);
return LDL_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.h (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.h Sun Mar 15 11:56:15 2009
@@ -603,6 +603,9 @@
\param log_stream the new log stream
*/
void ldl_handle_set_log_stream(ldl_handle_t *handle, FILE *log_stream);
+
+ldl_status ldl_global_terminate(void);
+
///\}
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Sun Mar 15 11:56:15 2009
@@ -1868,10 +1868,11 @@
if (globals.running) {
int x = 0;
globals.running = 0;
+ ldl_global_terminate();
while (globals.handles > 0) {
switch_yield(100000);
x++;
- if (x > 10) {
+ if (x > 100) {
break;
}
}
More information about the Freeswitch-trunk
mailing list