Fixed Service-Route update upon registration (#3823)
This commit is contained in:
parent
26bdf998f0
commit
19c018affd
|
@ -2002,7 +2002,7 @@ static void update_service_route(pjsua_acc *acc, pjsip_rx_data *rdata)
|
|||
pj_size_t rcnt;
|
||||
|
||||
/* Find and parse Service-Route headers */
|
||||
for (;;) {
|
||||
for (;(rdata);) {
|
||||
char saved;
|
||||
int parsed_len;
|
||||
|
||||
|
@ -2054,9 +2054,6 @@ static void update_service_route(pjsua_acc *acc, pjsip_rx_data *rdata)
|
|||
break;
|
||||
}
|
||||
|
||||
if (uri_cnt == 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Update account's route set
|
||||
*/
|
||||
|
@ -2416,6 +2413,9 @@ static void regc_cb(struct pjsip_regc_cbparam *param)
|
|||
(int)param->reason.slen, param->reason.ptr));
|
||||
destroy_regc(acc, PJ_TRUE);
|
||||
|
||||
/* Clear Service-Route header */
|
||||
update_service_route(acc, NULL);
|
||||
|
||||
/* Stop keep-alive timer if any. */
|
||||
update_keep_alive(acc, PJ_FALSE, NULL);
|
||||
} else if (PJSIP_IS_STATUS_IN_CLASS(param->code, 200)) {
|
||||
|
|
Loading…
Reference in New Issue