* fhandler_socket.cc (fhandler_socket::recvmsg): Remove unused tot

argument.  All callers changed.
	(fhandler_socket::sendmsg): Likewise.
	* net.cc (cygwin_recvmsg): Likewise.
	(cygwin_sendmsg): Likewise, and prevent calling sendmsg whith an
	invalid iovec.
	* fhandler.h (fhandler_socket::recvmsg): Adjust prototype.
	(fhandler_socket::sendmsg): Likewise.
This commit is contained in:
Corinna Vinschen
2006-07-27 09:18:28 +00:00
parent 9869e006f3
commit 883861544a
4 changed files with 20 additions and 8 deletions

View File

@@ -2071,7 +2071,7 @@ cygwin_recvmsg (int fd, struct msghdr *msg, int flags)
{
res = check_iovec_for_read (msg->msg_iov, msg->msg_iovlen);
if (res > 0)
res = fh->recvmsg (msg, flags, res); // res == iovec tot
res = fh->recvmsg (msg, flags);
}
syscall_printf ("%d = recvmsg (%d, %p, %x)", res, fd, msg, flags);
@@ -2093,7 +2093,8 @@ cygwin_sendmsg (int fd, const struct msghdr *msg, int flags)
else
{
res = check_iovec_for_write (msg->msg_iov, msg->msg_iovlen);
res = fh->sendmsg (msg, flags, res); // res == iovec tot
if (res >= 0)
res = fh->sendmsg (msg, flags);
}
syscall_printf ("%d = sendmsg (%d, %p, %x)", res, fd, msg, flags);