mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-19 09:44:13 +00:00
fix MODENDP-35
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6275 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
a62373c784
commit
a30c635e2a
8 files changed
+42
-40
No files matched your search
@@ -269,9 +269,9 @@ char *sofia_reg_find_reg_url(sofia_profile_t *profile, const char *user, const c
|
||||
cbt.len = len;
|
||||
|
||||
if (host) {
|
||||
snprintf(val, len, "select contact from sip_registrations where user='%s' and host='%s'", user, host);
|
||||
snprintf(val, len, "select contact from sip_registrations where sip_user='%s' and sip_host='%s'", user, host);
|
||||
} else {
|
||||
snprintf(val, len, "select contact from sip_registrations where user='%s'", user);
|
||||
snprintf(val, len, "select contact from sip_registrations where sip_user='%s'", user);
|
||||
}
|
||||
|
||||
|
||||
@@ -483,7 +483,7 @@ uint8_t sofia_reg_handle_register(nua_t * nua, sofia_profile_t *profile, nua_han
|
||||
if (sofia_test_pflag(profile, PFLAG_MULTIREG)) {
|
||||
sql = switch_mprintf("delete from sip_registrations where call_id='%q'", call_id);
|
||||
} else {
|
||||
sql = switch_mprintf("delete from sip_registrations where user='%q' and host='%q'", to_user, to_host);
|
||||
sql = switch_mprintf("delete from sip_registrations where sip_user='%q' and sip_host='%q'", to_user, to_host);
|
||||
}
|
||||
switch_mutex_lock(profile->ireg_mutex);
|
||||
sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, NULL);
|
||||
@@ -536,7 +536,7 @@ uint8_t sofia_reg_handle_register(nua_t * nua, sofia_profile_t *profile, nua_han
|
||||
if ((p = strchr(icontact + 4, ':'))) {
|
||||
*p = '\0';
|
||||
}
|
||||
if ((sql = switch_mprintf("delete from sip_subscriptions where user='%q' and host='%q' and contact like '%%%q%%'", to_user, to_host, icontact))) {
|
||||
if ((sql = switch_mprintf("delete from sip_subscriptions where sip_user='%q' and sip_host='%q' and contact like '%%%q%%'", to_user, to_host, icontact))) {
|
||||
sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, profile->ireg_mutex);
|
||||
switch_safe_free(sql);
|
||||
sql = NULL;
|
||||
@@ -549,13 +549,13 @@ uint8_t sofia_reg_handle_register(nua_t * nua, sofia_profile_t *profile, nua_han
|
||||
}
|
||||
switch_safe_free(icontact);
|
||||
} else {
|
||||
if ((sql = switch_mprintf("delete from sip_subscriptions where user='%q' and host='%q'", to_user, to_host))) {
|
||||
if ((sql = switch_mprintf("delete from sip_subscriptions where sip_user='%q' and sip_host='%q'", to_user, to_host))) {
|
||||
sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, profile->ireg_mutex);
|
||||
switch_safe_free(sql);
|
||||
sql = NULL;
|
||||
}
|
||||
|
||||
if ((sql = switch_mprintf("delete from sip_registrations where user='%q' and host='%q'", to_user, to_host))) {
|
||||
if ((sql = switch_mprintf("delete from sip_registrations where sip_user='%q' and sip_host='%q'", to_user, to_host))) {
|
||||
sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, profile->ireg_mutex);
|
||||
switch_safe_free(sql);
|
||||
sql = NULL;
|
||||
|
||||
Reference in new issue
Block a user