提交 21f1aebd authored 作者: Anthony Minessale's avatar Anthony Minessale

tweak expire on pres

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10635 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 2e05ee65
...@@ -1497,7 +1497,7 @@ void sofia_presence_handle_sip_i_subscribe(int status, ...@@ -1497,7 +1497,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
full_from = sip_header_as_string(profile->home, (void *) sip->sip_from); full_from = sip_header_as_string(profile->home, (void *) sip->sip_from);
full_via = sip_header_as_string(profile->home, (void *) sip->sip_via); full_via = sip_header_as_string(profile->home, (void *) sip->sip_via);
exp_raw = (sip->sip_expires ? sip->sip_expires->ex_delta : 3600); exp_raw = (sip->sip_expires ? sip->sip_expires->ex_delta : 600);
exp = (long) switch_timestamp(NULL) + exp_raw; exp = (long) switch_timestamp(NULL) + exp_raw;
if (sofia_test_pflag(profile, PFLAG_MULTIREG)) { if (sofia_test_pflag(profile, PFLAG_MULTIREG)) {
...@@ -1533,6 +1533,10 @@ void sofia_presence_handle_sip_i_subscribe(int status, ...@@ -1533,6 +1533,10 @@ void sofia_presence_handle_sip_i_subscribe(int status,
switch_assert(sql != NULL); switch_assert(sql != NULL);
sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE); sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
if (exp_raw >= 180) {
exp_raw -= 120;
}
sstr = switch_mprintf("active;expires=%ld", exp_raw); sstr = switch_mprintf("active;expires=%ld", exp_raw);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论