summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_pres.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-10-13 14:01:59 +0000
committerBenny Prijono <bennylp@teluu.com>2009-10-13 14:01:59 +0000
commitb2aac52d83d6e4fb46e2bef723647fa2bb1ad8be (patch)
treeeabfe4b6c36338b5adb89dff298481f6fcbe85eb /pjsip/src/pjsua-lib/pjsua_pres.c
parent745a13dbbff423464a61dbc9311aba416c245754 (diff)
Ticket #364: Upon unregistration, (un)REGISTER should be sent only after (un)PUBLISH has completed successfully
- wait for unpublication to complete or some delay expires, before sending unregistration - added unpublish_max_wait_time_msec field in account config to control how long to wait git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2942 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_pres.c')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_pres.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_pres.c b/pjsip/src/pjsua-lib/pjsua_pres.c
index bef8af92..4515636c 100644
--- a/pjsip/src/pjsua-lib/pjsua_pres.c
+++ b/pjsip/src/pjsua-lib/pjsua_pres.c
@@ -992,7 +992,7 @@ static void publish_cb(struct pjsip_publishc_cbparam *param)
}
} else {
- if (param->expiration == -1) {
+ if (param->expiration < 1) {
/* Could happen if server "forgot" to include Expires header
* in the response. We will not renew, so destroy the pubc.
*/
@@ -1201,10 +1201,13 @@ void pjsua_pres_delete_acc(int acc_id)
if (acc->publish_sess) {
acc->online_status = PJ_FALSE;
send_publish(acc_id, PJ_FALSE);
+ /* By ticket #364, don't destroy the session yet (let the callback
+ destroy it)
if (acc->publish_sess) {
pjsip_publishc_destroy(acc->publish_sess);
acc->publish_sess = NULL;
}
+ */
acc_cfg->publish_enabled = PJ_FALSE;
}
}