Module: sip-router Branch: master Commit: c51bc346dee05d47b53ba150dc681e9ed779574a URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c51bc346dee05d47b53ba150dc681e9ed779574a
Author: Alexandr Dubovikov <[email protected]> Committer: Alexandr Dubovikov <[email protected]> Date: Mon Oct 10 11:55:35 2011 +0200 modules:sipcapture: fixed len of SIP message for hep callback function --- modules/sipcapture/sipcapture.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c index a71ad2e..5e5fe22 100644 --- a/modules/sipcapture/sipcapture.c +++ b/modules/sipcapture/sipcapture.c @@ -611,7 +611,7 @@ int hep_msg_received(void *data) void **srevp; char *buf; - unsigned len; + unsigned *len; struct receive_info *ri; int offset = 0, hl; @@ -632,14 +632,14 @@ int hep_msg_received(void *data) srevp = (void**)data; buf = (char *)srevp[0]; - len = *((unsigned *)srevp[1]); + len = (unsigned *)srevp[1]; ri = (struct receive_info *)srevp[2]; hl = offset = sizeof(struct hep_hdr); - end = buf + len; - if (unlikely(len<offset)) { - LOG(L_ERR, "ERROR: sipcapture:hep_msg_received len less than offset [%i] vs [%i]\n", len, offset); + end = buf + *len; + if (unlikely(*len<offset)) { + LOG(L_ERR, "ERROR: sipcapture:hep_msg_received len less than offset [%i] vs [%i]\n", *len, offset); return -1; } @@ -737,7 +737,7 @@ int hep_msg_received(void *data) ri->dst_port = ntohs(heph->hp_dport); /* cut off the offset */ - len -= offset; + *len -= offset; p = buf + offset; memmove(buf, p, BUF_SIZE+1); _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
