From 8c50bcffcb9c15bd1575f88296534048b540ce7c Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 15 Apr 2008 10:37:19 +0000 Subject: Use the smart Contact header for TCP/TLS git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1931 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsua-lib/pjsua_acc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pjsip/src/pjsua-lib/pjsua_acc.c') diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 77d8d2b3..ec226521 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -571,6 +571,7 @@ static pj_bool_t acc_check_nat_addr(pjsua_acc *acc, if (acc->regc != NULL) { pjsip_regc_destroy(acc->regc); acc->regc = NULL; + acc->contact.slen = 0; } /* Update account's Contact header */ @@ -859,6 +860,7 @@ static void regc_cb(struct pjsip_regc_cbparam *param) param->status); pjsip_regc_destroy(acc->regc); acc->regc = NULL; + acc->contact.slen = 0; /* Stop keep-alive timer if any. */ update_keep_alive(acc, PJ_FALSE, NULL); @@ -869,6 +871,7 @@ static void regc_cb(struct pjsip_regc_cbparam *param) (int)param->reason.slen, param->reason.ptr)); pjsip_regc_destroy(acc->regc); acc->regc = NULL; + acc->contact.slen = 0; /* Stop keep-alive timer if any. */ update_keep_alive(acc, PJ_FALSE, NULL); @@ -878,6 +881,7 @@ static void regc_cb(struct pjsip_regc_cbparam *param) if (param->expiration < 1) { pjsip_regc_destroy(acc->regc); acc->regc = NULL; + acc->contact.slen = 0; /* Stop keep-alive timer if any. */ update_keep_alive(acc, PJ_FALSE, NULL); @@ -946,6 +950,7 @@ static pj_status_t pjsua_regc_init(int acc_id) if (acc->regc) { pjsip_regc_destroy(acc->regc); acc->regc = NULL; + acc->contact.slen = 0; } /* initialize SIP registration if registrar is configured */ @@ -992,6 +997,7 @@ static pj_status_t pjsua_regc_init(int acc_id) pjsip_regc_destroy(acc->regc); pj_pool_release(pool); acc->regc = NULL; + acc->contact.slen = 0; return status; } -- cgit v1.2.3