Commit 227525f5 authored by Pekka Pessi's avatar Pekka Pessi

nua_subnotref.c: fixed problems re-calculating the subscription duration upon NOTIFY

Thanks for Colin Whittaker for reporting this problem.

darcs-hash:20080225144939-65a35-3983ad67c5e9db1fbd154ee034518c81230c8500.gz
parent 287ca1ad
......@@ -368,6 +368,9 @@ static int nua_subscribe_client_response(nua_client_request_t *cr,
else
delta = 0;
if (delta > eu->eu_expires)
delta = eu->eu_expires;
if (win_messenger_enable && !nua_dialog_is_established(nh->nh_ds)) {
/* Notify from messanger does not match with dialog tag */
nh->nh_ds->ds_remote_tag = su_strdup(nh->nh_home, "");
......@@ -647,8 +650,6 @@ int nua_notify_server_report(nua_server_request_t *sr, tagi_t const *tags)
if (substate == nua_substate_active || substate == nua_substate_pending) {
if (subs && subs->ss_expires)
delta = strtoul(subs->ss_expires, NULL, 10);
else
delta = eu->eu_expires;
}
else if (substate == nua_substate_embryonic) {
if (subs && subs->ss_reason) {
......@@ -686,7 +687,8 @@ int nua_notify_server_report(nua_server_request_t *sr, tagi_t const *tags)
nua_dialog_usage_set_refresh_range(du, retry, retry + 5);
}
else {
nua_dialog_usage_set_refresh(du, delta);
if (delta < SIP_TIME_MAX)
nua_dialog_usage_set_refresh(du, delta);
}
return retval;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment