Module: kamailio
Branch: master
Commit: 875ac29b629f570ada81462c384e2abe9952a249
URL:
https://github.com/kamailio/kamailio/commit/875ac29b629f570ada81462c384e2ab…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-05T13:44:45+01:00
core: tcp - print first characters if matching hep3 header fails
---
Modified: src/core/tcp_read.c
---
Diff:
https://github.com/kamailio/kamailio/commit/875ac29b629f570ada81462c384e2ab…
Patch:
https://github.com/kamailio/kamailio/commit/875ac29b629f570ada81462c384e2ab…
---
diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c
index 18868f1d7a..c3e87ee34d 100644
--- a/src/core/tcp_read.c
+++ b/src/core/tcp_read.c
@@ -1273,7 +1273,8 @@ static int tcp_read_hep3(struct tcp_connection *c, int* read_flags)
if(p[0]!='H' || p[1]!='E' || p[2]!='P' || p[3]=='3') {
/* not hep3 */
- LM_DBG("not HEP3 packet header\n");
+ LM_DBG("not HEP3 packet header (%u): %c %c %c %c / %x %x %x %x\n",
+ size, p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3]);
goto skip;
}
r->flags |= F_TCP_REQ_HEP3;
@@ -1293,7 +1294,7 @@ static int tcp_read_hep3(struct tcp_connection *c, int* read_flags)
}
r->flags |= F_TCP_REQ_COMPLETE;
- r->parsed = &p[len];
+ r->parsed = p + len;
LM_DBG("reading of HEP3 packet is complete (%u / %u)\n", len, size);
skip: