[sr-dev] git:master:8df2a65a: Merge pull request #1928 from adubovikov/master

GitHub noreply at github.com
Tue Apr 23 08:55:12 CEST 2019


Module: kamailio
Branch: master
Commit: 8df2a65a9d39cd929e7e2554d0ff7fa6b176458f
URL: https://github.com/kamailio/kamailio/commit/8df2a65a9d39cd929e7e2554d0ff7fa6b176458f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2019-04-23T08:55:08+02:00

Merge pull request #1928 from adubovikov/master

modules:sipcapture Fixed wrong pointer for payload buffer.

---

Modified: src/modules/sipcapture/hep.c
Modified: src/modules/sipcapture/sipcapture.c

---

Diff:  https://github.com/kamailio/kamailio/commit/8df2a65a9d39cd929e7e2554d0ff7fa6b176458f.diff
Patch: https://github.com/kamailio/kamailio/commit/8df2a65a9d39cd929e7e2554d0ff7fa6b176458f.patch

---

diff --git a/src/modules/sipcapture/hep.c b/src/modules/sipcapture/hep.c
index 0430b96969..f435477a09 100644
--- a/src/modules/sipcapture/hep.c
+++ b/src/modules/sipcapture/hep.c
@@ -739,7 +739,11 @@ int hepv3_message_parse(char *buf, unsigned int len, sip_msg_t *msg)
 		msg->rcv.proto = PROTO_UDP;
 
 	if(payload != NULL)
+	{
 		ret = len - payload_len;
+		msg->buf = payload;
+                msg->len = payload_len;
+	}
 
 
 done:
diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c
index dbb53c0537..a7a7564608 100644
--- a/src/modules/sipcapture/sipcapture.c
+++ b/src/modules/sipcapture/sipcapture.c
@@ -2969,11 +2969,8 @@ static int nosip_hep_msg(sr_event_param_t *evp)
 			return 0;
 		}
 
-		buf = msg->buf + len;
-		len = msg->len - len;
-
-		msg->buf = buf;
-		msg->len = len;
+		buf = msg->buf;
+		len = msg->len;
 	} else {
 		LOG(L_ERR, "ERROR: sipcapture:hep_msg_received: not supported version "
 				"or bad length: v:[%d] l:[%d]\n",




More information about the sr-dev mailing list