diff --git a/src/modules/sipcapture/hep.c b/src/modules/sipcapture/hep.c index 0430b96969b..f435477a09c 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 dbb53c05376..a7a75646084 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",