]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
revert small change that was unintended
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 16 Dec 2011 16:45:53 +0000 (10:45 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 16 Dec 2011 16:45:53 +0000 (10:45 -0600)
src/mod/endpoints/mod_sofia/sofia_reg.c

index ff5da47af46d2d9eb85e7c4791df489a976cb329..def1673c30f85c8b5840ce8cc7e547eb78aee690 100644 (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);