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) {
(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);