Module: kamailio
Branch: master
Commit: 1968b43731afdcec1bd40985176680c8af1be921
URL:
https://github.com/kamailio/kamailio/commit/1968b43731afdcec1bd40985176680c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-20T09:31:49+02:00
core: msg translator - switch condition to buf pointer instead of lenght
- better correlation with returned value from functions
---
Modified: src/core/msg_translator.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1968b43731afdcec1bd40985176680c…
Patch:
https://github.com/kamailio/kamailio/commit/1968b43731afdcec1bd40985176680c…
---
diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
index 070c6d349d..e58356999d 100644
--- a/src/core/msg_translator.c
+++ b/src/core/msg_translator.c
@@ -2022,7 +2022,7 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg,
}
/* if received needs to be added, add anchor after host and add it, or
* overwrite the previous one if already present */
- if (received_len){
+ if (received_buf){
if (msg->via1->received){ /* received already present => overwrite it*/
via_insert_param=del_lump(msg,
msg->via1->received->start-buf-1, /*;*/
@@ -2039,7 +2039,7 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg,
received_buf = NULL;
}
/* if rport needs to be updated, delete it if present and add it's value */
- if (rport_len){
+ if (rport_buf){
if (msg->via1->rport){ /* rport already present */
via_insert_param=del_lump(msg,
msg->via1->rport->start-buf-1, /*';'*/