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 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.
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 *);
msg_flags: 0
};
- return recvmsg (&msg, 0, tot);
+ return recvmsg (&msg, 0);
}
inline ssize_t
}
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;
msg_flags: 0
};
- return sendmsg (&msg, 0, tot);
+ return sendmsg (&msg, 0);
}
inline ssize_t
}
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)
{
{
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);
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);