mirror of https://gerrit.osmocom.org/libosmocore
gprs: Subtract the headroom for what we can receive
The buffer got allocated with headroom and we need to subtract that from the size of the buffer.
This commit is contained in:
parent
c8f39391bf
commit
26c325151a
|
@ -842,7 +842,7 @@ static struct msgb *read_nsip_msg(struct bsc_fd *bfd, int *error,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
ret = recvfrom(bfd->fd, msg->data, NS_ALLOC_SIZE, 0,
|
||||
ret = recvfrom(bfd->fd, msg->data, NS_ALLOC_SIZE - NS_ALLOC_HEADROOM, 0,
|
||||
(struct sockaddr *)saddr, &saddr_len);
|
||||
if (ret < 0) {
|
||||
LOGP(DNS, LOGL_ERROR, "recv error %s during NSIP recv\n",
|
||||
|
|
Loading…
Reference in New Issue