[sr-dev] git:4.4:689d1274: tm: fix wrong CRLF position when building local request when reusing received buffer

Daniel-Constantin Mierla miconda at gmail.com
Thu Dec 1 12:22:34 CET 2016


Module: kamailio
Branch: 4.4
Commit: 689d12741b86f101d00b1bcd348c3093f47d5158
URL: https://github.com/kamailio/kamailio/commit/689d12741b86f101d00b1bcd348c3093f47d5158

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-12-01T12:22:12+01:00

tm: fix wrong CRLF position when building local request when reusing received buffer

- should affect only configs when tm parameters for reparsing request
  were changed from their default value
- reported by Helio Okuyama

(cherry picked from commit 6db0e6b5a0b8ef48250abd7bfaedd15fc4860ddd)

---

Modified: modules/tm/t_msgbuilder.c

---

Diff:  https://github.com/kamailio/kamailio/commit/689d12741b86f101d00b1bcd348c3093f47d5158.diff
Patch: https://github.com/kamailio/kamailio/commit/689d12741b86f101d00b1bcd348c3093f47d5158.patch

---

diff --git a/modules/tm/t_msgbuilder.c b/modules/tm/t_msgbuilder.c
index 09bb6dc..4781a05 100644
--- a/modules/tm/t_msgbuilder.c
+++ b/modules/tm/t_msgbuilder.c
@@ -198,8 +198,8 @@ char *build_local(struct cell *Trans,unsigned int branch,
 	append_str( p, Trans->cseq_n.s, Trans->cseq_n.len );
 	append_str( p, " ", 1 );
 	append_str( p, method, method_len );
-	append_str( p, MAXFWD_HEADER, MAXFWD_HEADER_LEN );
 	append_str( p, CRLF, CRLF_LEN );
+	append_str( p, MAXFWD_HEADER, MAXFWD_HEADER_LEN );
 
 	if (!is_local(Trans))  {
 		for ( hdr=Trans->uas.request->headers ; hdr ; hdr=hdr->next )




More information about the sr-dev mailing list