From 5f5c1b6bcbf389c35f839ef0b39fb73961717c32 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 4 Apr 2010 16:29:44 +0200 Subject: bsc_msc_ip.c: Fix the reading of data... len contains the actual length of the message and data_len contains the size of the message. We want to read up to data_len and not up to 0 bytes. --- openbsc/src/bsc_msc_ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c index 0275df734..c552b7f6c 100644 --- a/openbsc/src/bsc_msc_ip.c +++ b/openbsc/src/bsc_msc_ip.c @@ -601,7 +601,7 @@ static int mgcp_do_read(struct bsc_fd *fd) return -1; } - ret = read(fd->fd, mgcp->data, mgcp->len); + ret = read(fd->fd, mgcp->data, mgcp->data_len); if (ret <= 0) { LOGP(DMGCP, LOGL_ERROR, "Failed to read: %d/%s\n", errno, strerror(errno)); msgb_free(mgcp); -- cgit v1.2.3