[Freeswitch-svn] [commit] r12680 - in freeswitch/trunk: . libs/libdingaling/src src/mod/endpoints/mod_dingaling
FreeSWITCH SVN
anthm at freeswitch.org
Fri Mar 20 05:58:05 PDT 2009
Author: anthm
Date: Fri Mar 20 07:58:04 2009
New Revision: 12680
Log:
MODENDP-202 and MODENDP-204
Modified:
freeswitch/trunk/Makefile.am
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/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am (original)
+++ freeswitch/trunk/Makefile.am Fri Mar 20 07:58:04 2009
@@ -321,7 +321,7 @@
core-install: core_install
clean_core: clean-libLTLIBRARIES
-
+ rm -f $(libfreeswitch_la_OBJECTS)
install_core: install-libLTLIBRARIES
core_install: install_core
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c Fri Mar 20 07:58:04 2009
@@ -1593,6 +1593,7 @@
microsleep(100);
}
+ ldl_set_flag_locked(handle, LDL_FLAG_STOPPED);
}
@@ -2324,6 +2325,7 @@
void ldl_handle_run(ldl_handle_t *handle)
{
+ ldl_clear_flag_locked(handle, LDL_FLAG_STOPPED);
ldl_set_flag_locked(handle, LDL_FLAG_RUNNING);
xmpp_connect(handle, handle->login, handle->password);
ldl_clear_flag_locked(handle, LDL_FLAG_RUNNING);
@@ -2332,12 +2334,24 @@
void ldl_handle_stop(ldl_handle_t *handle)
{
ldl_clear_flag_locked(handle, LDL_FLAG_RUNNING);
+ if (ldl_test_flag(handle, LDL_FLAG_TLS)) {
+ int fd;
+ if ((fd = iks_fd(handle->parser)) > -1) {
+ shutdown(fd, 0x02);
+ }
+ }
+
+ while(!ldl_test_flag(handle, LDL_FLAG_STOPPED)) {
+ microsleep(100);
+ }
+
}
ldl_status ldl_handle_destroy(ldl_handle_t **handle)
{
apr_pool_t *pool = (*handle)->pool;
+ ldl_handle_stop(*handle);
ldl_flush_queue(*handle, 1);
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.h (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.h Fri Mar 20 07:58:04 2009
@@ -119,7 +119,8 @@
LDL_FLAG_AUTHORIZED = (1 << 2),
LDL_FLAG_READY = (1 << 3),
LDL_FLAG_CONNECTED = (1 << 4),
- LDL_FLAG_QUEUE_RUNNING = (1 << 5)
+ LDL_FLAG_QUEUE_RUNNING = (1 << 5),
+ LDL_FLAG_STOPPED = (1 << 6)
} ldl_flag_t;
typedef enum {
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 Fri Mar 20 07:58:04 2009
@@ -1805,7 +1805,7 @@
#define PRES_SYNTAX "dl_pres <profile_name>"
#define LOGOUT_SYNTAX "dl_logout <profile_name>"
-#define LOGIN_SYNTAX "dl_login <profile_name>"
+#define LOGIN_SYNTAX "Existing Profile:\ndl_login profile=<profile_name>\nDynamic Profile:\ndl_login var1=val1;var2=val2;varN=valN\n"
#define DEBUG_SYNTAX "dl_debug [true|false]"
SWITCH_ADD_API(api_interface, "dl_debug", "DingaLing Debug", dl_debug, DEBUG_SYNTAX);
More information about the Freeswitch-svn
mailing list