aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-04 16:29:44 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-04 16:29:44 +0200
commit5f5c1b6bcbf389c35f839ef0b39fb73961717c32 (patch)
tree06a3c1c49e816459198d29ae20d8c456d90c2f77 /openbsc
parente51cf4f946820e688f9992ab405b7ed34a863d3a (diff)
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.
Diffstat (limited to 'openbsc')
-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 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);