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.
This commit is contained in:
Holger Hans Peter Freyther 2010-04-04 16:29:44 +02:00
parent e51cf4f946
commit 5f5c1b6bcb
1 changed files with 1 additions and 1 deletions

View File

@ -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);