From: Anthony Minessale Date: Wed, 22 Oct 2008 18:33:12 +0000 (+0000) Subject: update to previous patch X-Git-Tag: v1.0.2~725 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=561467d6a5c229058f22ed311a515ebe7f18bb3b;p=thirdparty%2Ffreeswitch.git update to previous patch git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10116 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 62fda58f5f..695fe22041 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -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); }