[sr-dev] git:master:9075253c: rr: parse route headers if not parsed already (instead of aborting)
Ovidiu Sas
osas at voipembedded.com
Mon Feb 25 21:58:21 CET 2019
Module: kamailio
Branch: master
Commit: 9075253cd220165a5386ea6ed8f474ff185f8ed9
URL: https://github.com/kamailio/kamailio/commit/9075253cd220165a5386ea6ed8f474ff185f8ed9
Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date: 2019-02-26T07:56:44+11:00
rr: parse route headers if not parsed already (instead of aborting)
---
Modified: src/modules/rr/loose.c
---
Diff: https://github.com/kamailio/kamailio/commit/9075253cd220165a5386ea6ed8f474ff185f8ed9.diff
Patch: https://github.com/kamailio/kamailio/commit/9075253cd220165a5386ea6ed8f474ff185f8ed9.patch
---
diff --git a/src/modules/rr/loose.c b/src/modules/rr/loose.c
index efe428a1cd..e9138985f3 100644
--- a/src/modules/rr/loose.c
+++ b/src/modules/rr/loose.c
@@ -998,7 +998,19 @@ int redo_route_params(sip_msg_t *msg)
return -1;
}
- if(msg->route==NULL || msg->route->parsed==NULL) {
+ if(msg->route==NULL) {
+ return -1;
+ }
+
+ if(msg->route->parsed==NULL) {
+ if (parse_rr(msg->route) < 0) {
+ LM_ERR("failed to parse Route HF\n");
+ return -1;
+ }
+ }
+
+ if(msg->route->parsed==NULL) {
+ LM_ERR("NULL parsed Route header\n");
return -1;
}
More information about the sr-dev
mailing list