revert small change that was unintended

This commit is contained in:
Anthony Minessale 2011-12-16 10:45:53 -06:00
parent 61ac89c894
commit 539bd72f55
1 changed files with 5 additions and 5 deletions

View File

@ -1502,10 +1502,10 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
if (multi_reg_contact) {
sql =
switch_mprintf("update sip_registrations set expires=%ld where sip_user='%q' and sip_host='%q' and contact='%q'",
(long) switch_epoch_time_now(NULL), to_user, reg_host, contact_str);
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("update sip_registrations set expires=%ld where call_id='%q'", (long) switch_epoch_time_now(NULL), call_id);
sql = switch_mprintf("delete from sip_registrations where call_id='%q'", call_id);
}
} else {
if (delete_subs) {
@ -1513,8 +1513,8 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
(long) switch_epoch_time_now(NULL), to_user, sub_host);
sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);
}
sql = switch_mprintf("update sip_registrations set expires=%ld where sip_user='%q' and sip_host='%q'",
(long) switch_epoch_time_now(NULL), to_user, reg_host);
sql = switch_mprintf("delete from sip_registrations where sip_user='%q' and sip_host='%q'",
to_user, reg_host);
}
switch_mutex_lock(profile->ireg_mutex);
sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);