[sr-dev] git:master:895208eb: core: use third array element when generating totag suffix
Henning Westerholt
hw at skalatan.de
Tue Mar 30 09:32:41 CEST 2021
Module: kamailio
Branch: master
Commit: 895208ebb0f999365ded50a9ecfc0fb2ed2b1e01
URL: https://github.com/kamailio/kamailio/commit/895208ebb0f999365ded50a9ecfc0fb2ed2b1e01
Author: Charles Chance <charles.chance at sipcentric.com>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2021-03-30T09:32:38+02:00
core: use third array element when generating totag suffix
---
Modified: src/core/tags.h
---
Diff: https://github.com/kamailio/kamailio/commit/895208ebb0f999365ded50a9ecfc0fb2ed2b1e01.diff
Patch: https://github.com/kamailio/kamailio/commit/895208ebb0f999365ded50a9ecfc0fb2ed2b1e01.patch
---
diff --git a/src/core/tags.h b/src/core/tags.h
index fff879cfab..b134dd3b01 100644
--- a/src/core/tags.h
+++ b/src/core/tags.h
@@ -51,17 +51,18 @@ static inline void calc_crc_suffix( struct sip_msg *msg, char *tag_suffix)
suffix_source[0]=msg->via1->host;
suffix_source[1]=msg->via1->port_str;
if (msg->via1->branch) {
- suffix_source[2]=msg->via1->branch->value;
+ suffix_source[ss_nr++]=msg->via1->branch->value;
} else {
suffix_source[2].s = NULL;
suffix_source[2].len = 0;
}
crcitt_string_array( tag_suffix, suffix_source, ss_nr );
+ ss_nr=2;
suffix_source[0]=msg->via1->port_str;
suffix_source[1]=msg->via1->host;
if (msg->callid) {
- suffix_source[2]=msg->callid->body;
+ suffix_source[ss_nr++]=msg->callid->body;
} else {
suffix_source[2].s = NULL;
suffix_source[2].len = 0;
More information about the sr-dev
mailing list