[Freeswitch-svn] [commit] r3181 - in freeswitch/trunk: libs/libdingaling/src src/mod/endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Tue Oct 24 14:50:52 EDT 2006


Author: anthm
Date: Tue Oct 24 14:50:52 2006
New Revision: 3181

Modified:
   freeswitch/trunk/libs/libdingaling/src/libdingaling.c
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c

Log:
update

Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c	(original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c	Tue Oct 24 14:50:52 2006
@@ -796,7 +796,7 @@
 	char *to = iks_find_attrib(pak->x, "to");
 
 	if (handle->session_callback) {
-		handle->session_callback(handle, NULL, LDL_SIGNAL_SUBSCRIBE, to, from, NULL, NULL);
+		handle->session_callback(handle, NULL, LDL_SIGNAL_UNSUBSCRIBE, to, from, NULL, NULL);
 	}
 
 	return IKS_FILTER_EAT;

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	Tue Oct 24 14:50:52 2006
@@ -2078,7 +2078,8 @@
 
 			case LDL_SIGNAL_SUBSCRIBE:
 				
-				if ((sql = switch_mprintf("insert into subscriptions values('%q','%q','%q','%q')", from, to, msg, subject))) {
+				if ((sql = switch_mprintf("delete from subscriptions where sub_from='%q' and sub_to='%q';\n"
+										  "insert into subscriptions values('%q','%q','%q','%q');\n", from, to, from, to, msg, subject))) {
 					execute_sql(profile->dbname, sql, profile->mutex);
 					switch_core_db_free(sql);
 				}



More information about the Freeswitch-svn mailing list