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:
parent
e51cf4f946
commit
5f5c1b6bcb
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue