Call soreserve() with the right size for receives (from pk).

This commit is contained in:
fvdl 1996-02-25 15:30:01 +00:00
parent 95d7594df0
commit 1f20fc9fc2
1 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_socket.c,v 1.24 1996/02/18 11:53:48 fvdl Exp $ */
/* $NetBSD: nfs_socket.c,v 1.25 1996/02/25 15:30:01 fvdl Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@ -228,10 +228,12 @@ nfs_connect(nmp, rep)
so->so_snd.sb_timeo = 0;
}
if (nmp->nm_sotype == SOCK_DGRAM) {
sndreserve = nmp->nm_wsize + NFS_MAXPKTHDR;
rcvreserve = nmp->nm_rsize + NFS_MAXPKTHDR;
sndreserve = nmp->nm_wsize, + NFS_MAXPKTHDR;
rcvreserve = max(nmp->nm_rsize, nmp->nm_readdirsize) +
NFS_MAXPKTHDR;
} else if (nmp->nm_sotype == SOCK_SEQPACKET) {
sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2;
sndreserve = (max(nmp->nm_wsize, nmp->nm_readdirsize) +
NFS_MAXPKTHDR) * 2;
rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2;
} else {
if (nmp->nm_sotype != SOCK_STREAM)