From 539bd72f55fbe4e5d8a687072c5c538c41a8b867 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 16 Dec 2011 10:45:53 -0600 Subject: [PATCH] revert small change that was unintended --- src/mod/endpoints/mod_sofia/sofia_reg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index ff5da47af4..def1673c30 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -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);