[Freeswitch-svn] [commit] r10116 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Wed Oct 22 14:33:13 EDT 2008


Author: anthm
Date: Wed Oct 22 14:33:12 2008
New Revision: 10116

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c

Log:
update to previous patch

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Wed Oct 22 14:33:12 2008
@@ -795,7 +795,7 @@
 
 		if (multi_reg) {
 			if (multi_reg_contact) {
-				sql = switch_mprintf("delete from sip_registrations where contact='%q'", contact_str);
+				sql = switch_mprintf("delete from sip_registrations where sip_user='%q' and sip_host='%q' and contact='%q'", to_user, reg_host, contact_str);
 			} else {
 				sql = switch_mprintf("delete from sip_registrations where call_id='%q'", call_id);
 			}
@@ -863,7 +863,7 @@
 			}
 
 			if (multi_reg_contact) {
-				sql = switch_mprintf("delete from sip_subscriptions where contact='%q'", contact_str);
+				sql = switch_mprintf("delete from sip_subscriptions where sip_user='%q' and sip_host='%q' and contact='%q'", to_user, reg_host, contact_str);
 			} else {
 				sql = switch_mprintf("delete from sip_subscriptions where call_id='%q'", call_id);
 			}
@@ -871,7 +871,7 @@
 			sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
 
 			if (multi_reg_contact) {
-				sql = switch_mprintf("delete from sip_registrations where contact='%q'", contact_str);
+				sql = switch_mprintf("delete from sip_registrations where sip_user='%q' and sip_host='%q' and contact='%q'", to_user, reg_host, contact_str);
 			} else {
 				sql = switch_mprintf("delete from sip_registrations where call_id='%q'", call_id);
 			}



More information about the Freeswitch-svn mailing list