* 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:
parent
9869e006f3
commit
883861544a
|
@ -1,3 +1,14 @@
|
|||
2006-07-27 Brian Ford <Brian.Ford@FlightSafety.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2006-07-27 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.h (class fhandler_socket): Remove prot_info_ptr.
|
||||
|
|
|
@ -462,14 +462,14 @@ class fhandler_socket: public fhandler_base
|
|||
struct sockaddr *from, int *fromlen);
|
||||
ssize_t recvfrom (void *ptr, size_t len, int flags,
|
||||
struct sockaddr *from, int *fromlen);
|
||||
ssize_t recvmsg (struct msghdr *msg, int flags, ssize_t tot = -1);
|
||||
ssize_t recvmsg (struct msghdr *msg, int flags);
|
||||
|
||||
ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot = -1);
|
||||
inline ssize_t send_internal (struct _WSABUF *wsabuf, DWORD wsacnt, int flags,
|
||||
const struct sockaddr *to, int tolen);
|
||||
ssize_t sendto (const void *ptr, size_t len, int flags,
|
||||
const struct sockaddr *to, int tolen);
|
||||
ssize_t sendmsg (const struct msghdr *msg, int flags, ssize_t tot = -1);
|
||||
ssize_t sendmsg (const struct msghdr *msg, int flags);
|
||||
|
||||
int ioctl (unsigned int cmd, void *);
|
||||
int fcntl (int cmd, void *);
|
||||
|
|
|
@ -1153,7 +1153,7 @@ fhandler_socket::readv (const struct iovec *const iov, const int iovcnt,
|
|||
msg_flags: 0
|
||||
};
|
||||
|
||||
return recvmsg (&msg, 0, tot);
|
||||
return recvmsg (&msg, 0);
|
||||
}
|
||||
|
||||
inline ssize_t
|
||||
|
@ -1217,7 +1217,7 @@ fhandler_socket::recvfrom (void *ptr, size_t len, int flags,
|
|||
}
|
||||
|
||||
int
|
||||
fhandler_socket::recvmsg (struct msghdr *msg, int flags, ssize_t tot)
|
||||
fhandler_socket::recvmsg (struct msghdr *msg, int flags)
|
||||
{
|
||||
if (CYGWIN_VERSION_CHECK_FOR_USING_ANCIENT_MSGHDR)
|
||||
((struct OLD_msghdr *) msg)->msg_accrightslen = 0;
|
||||
|
@ -1266,7 +1266,7 @@ fhandler_socket::writev (const struct iovec *const iov, const int iovcnt,
|
|||
msg_flags: 0
|
||||
};
|
||||
|
||||
return sendmsg (&msg, 0, tot);
|
||||
return sendmsg (&msg, 0);
|
||||
}
|
||||
|
||||
inline ssize_t
|
||||
|
@ -1324,7 +1324,7 @@ fhandler_socket::sendto (const void *ptr, size_t len, int flags,
|
|||
}
|
||||
|
||||
int
|
||||
fhandler_socket::sendmsg (const struct msghdr *msg, int flags, ssize_t tot)
|
||||
fhandler_socket::sendmsg (const struct msghdr *msg, int flags)
|
||||
{
|
||||
if (get_addr_family () == AF_LOCAL)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue