diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-03-23 13:06:24 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-03-23 13:06:24 +0000 |
commit | 1f5dba9802e2694dfbe022af673714698e132735 (patch) | |
tree | 6bcc663b35931c10c71e07c6672ac8090db8dd3c /pjsip | |
parent | e2fe75a86e8adeebad0e9a155eadc4f77294cbeb (diff) |
Ticket #714: backported changes from ticket #713
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.0@2532 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-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 6d8b8fdb..f6b670ce 100644 --- a/pjsip/src/pjsip/sip_util.c +++ b/pjsip/src/pjsip/sip_util.c @@ -854,12 +854,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. */ |