Skip to content

Commit

Permalink
Fixed Service-Route update upon registration (#3823)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming authored Jan 10, 2024
1 parent 26bdf99 commit 19c018a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pjsip/src/pjsua-lib/pjsua_acc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 19c018a

Please sign in to comment.