[sr-dev] git:master:76718ed2: core: tcp - execute receive msg after nonsip-hook for hep3 packets

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 6 12:55:25 CET 2017


Module: kamailio
Branch: master
Commit: 76718ed2622be33d3aa28621889e02338e886094
URL: https://github.com/kamailio/kamailio/commit/76718ed2622be33d3aa28621889e02338e886094

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-11-06T12:54:18+01:00

core: tcp - execute receive msg after nonsip-hook for hep3 packets

---

Modified: src/core/tcp_read.c

---

Diff:  https://github.com/kamailio/kamailio/commit/76718ed2622be33d3aa28621889e02338e886094.diff
Patch: https://github.com/kamailio/kamailio/commit/76718ed2622be33d3aa28621889e02338e886094.patch

---

diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c
index fc4c7a1248..8fb371bd9d 100644
--- a/src/core/tcp_read.c
+++ b/src/core/tcp_read.c
@@ -70,6 +70,7 @@
 #include "forward.h"
 #include "events.h"
 #include "stun.h"
+#include "nonsip_hooks.h"
 
 #ifdef READ_HTTP11
 #define HTTP11CONTINUE	"HTTP/1.1 100 Continue\r\nContent-Length: 0\r\n\r\n"
@@ -1325,9 +1326,21 @@ static int hep3_process_msg(char* tcpbuf, unsigned int len,
 	evp.data = (void*)(&msg);
 	ret=sr_event_exec(SREV_RCV_NOSIP, &evp);
 	LM_DBG("running hep3 handling event returned %d\n", ret);
+	if(ret == NONSIP_MSG_DROP) {
+		free_sip_msg(&msg);
+		return 0;
+	}
+	if(ret < 0) {
+		LM_ERR("error running hep3 handling event: %d\n", ret);
+		free_sip_msg(&msg);
+		return -1;
+	}
+
+	ret = receive_msg(msg.buf, msg.len, rcv_info);
+	LM_DBG("running hep3-enclosed sip request route returned %d\n", ret);
 	free_sip_msg(&msg);
 
-	return 0;
+	return ret;
 }
 
 /**




More information about the sr-dev mailing list