diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-01-29 19:13:55 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-01-29 19:13:55 +0000 |
commit | 868eb7a71dc1f48ee0c62fceec2da449c4b0795b (patch) | |
tree | 1f9010cc48e99493b3cbba54676c80c35390e1e2 | |
parent | b6c996a5fa0074502ea732fa06b279d2ce664645 (diff) |
Candidate fix for ticket #713: Assertion in ../src/pjsip/sip_util.c:729: pjsip_process_route_set() (thanks Ramesh D for the report)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2435 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsip/sip_util.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/pjsip/src/pjsip/sip_util.c b/pjsip/src/pjsip/sip_util.c index 18116c08..381ccade 100644 --- a/pjsip/src/pjsip/sip_util.c +++ b/pjsip/src/pjsip/sip_util.c @@ -859,12 +859,17 @@ PJ_DEF(pj_status_t) pjsip_process_route_set(pjsip_tx_data *tdata, PJSIP_ENOTREQUESTMSG); PJ_ASSERT_RETURN(dest_info != NULL, PJ_EINVAL); - /* Assert if the request contains strict route and strict - * route processing has been applied before. We need to - * restore the strict route with pjsip_restore_strict_route_set() - * before we can call this function again, otherwise strict - * route will be swapped twice! + /* If the request contains strict route, check that the strict route + * has been restored to its original values before processing the + * route set. The strict route is restored to the original values + * with pjsip_restore_strict_route_set(). If caller did not restore + * the strict route before calling this function, we need to call it + * here, or otherwise the strict-route and Request-URI will be swapped + * twice! */ + if (tdata->saved_strict_route != NULL) { + pjsip_restore_strict_route_set(tdata); + } PJ_ASSERT_RETURN(tdata->saved_strict_route==NULL, PJ_EBUG); /* Find the first and last "Route" headers from the message. */ |