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:
Holger Hans Peter Freyther 2010-05-28 03:25:36 +08:00
parent c8f39391bf
commit 26c325151a
1 changed files with 1 additions and 1 deletions

View File

@ -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",