]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update to previous patch
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 22 Oct 2008 18:33:12 +0000 (18:33 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 22 Oct 2008 18:33:12 +0000 (18:33 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10116 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index 62fda58f5f6beb8c6fea0198fb725e3cee4fed6f..695fe2204176eca74fdb65db798fa05668b8436a 100644 (file)
@@ -795,7 +795,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
 
                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 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                        }
 
                        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 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                        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);
                        }