aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-08 17:07:45 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-08 17:07:45 +0200
commit65d10c1320d134ff9ffb0c0de13cd24cb53f9117 (patch)
tree2a943d3c71c2f04a612382df450847baa26b49c2 /openbsc/src/bsc_msc_ip.c
parent414ba77f75c186525b41400f555b7226b5d45540 (diff)
bsc_msc_ip: Specify the size we can read directly...
data_len is wrong as well as we have reserved... specifying it directly seems to make valgrind happy. This also means that we might receive more than one UDP message and do not properly forward things. I will need to investigate.
Diffstat (limited to 'openbsc/src/bsc_msc_ip.c')
-rw-r--r--openbsc/src/bsc_msc_ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c
index 4bc32bb48..18cfbeba9 100644
--- a/openbsc/src/bsc_msc_ip.c
+++ b/openbsc/src/bsc_msc_ip.c
@@ -612,7 +612,7 @@ static int mgcp_do_read(struct bsc_fd *fd)
return -1;
}
- ret = read(fd->fd, mgcp->data, mgcp->data_len);
+ ret = read(fd->fd, mgcp->data, 4096 - 128);
if (ret <= 0) {
LOGP(DMGCP, LOGL_ERROR, "Failed to read: %d/%s\n", errno, strerror(errno));
msgb_free(mgcp);