FS-4406 please test asap and report back

This commit is contained in:
Anthony Minessale
2012-07-10 23:04:16 -05:00
parent 293516be59
commit ba428a1559
2 changed files with 7 additions and 4 deletions
+4 -2
View File
@@ -5041,11 +5041,13 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu
} else if (sofia_test_pflag(profile, PFLAG_UNREG_OPTIONS_FAIL) && (status != 200 && status != 486) && sip && sip->sip_to) {
char *sql;
time_t now = switch_epoch_time_now(NULL);
const char *call_id = sip->sip_call_id->i_id;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Expire registration '%s@%s' due to options failure\n",
sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host);
sql = switch_mprintf("update sip_registrations set expires=%ld where sip_user='%s' and sip_host='%s'",
(long) now, sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host);
sql = switch_mprintf("update sip_registrations set expires=%ld where sip_user='%s' and sip_host='%s' and call_id='%q'",
(long) now, sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host, call_id);
sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
}
}