Skip to content

Commit

Permalink
core: msg translator - switch condition to buf pointer instead of lenght
Browse files Browse the repository at this point in the history
- better correlation with returned value from functions
  • Loading branch information
miconda committed Jul 20, 2017
1 parent 0b177a2 commit 1968b43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/msg_translator.c
Expand Up @@ -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, /*;*/
Expand All @@ -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, /*';'*/
Expand Down

0 comments on commit 1968b43

Please sign in to comment.