aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-06-30 11:04:13 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-06-30 11:04:13 +0000
commite0d8706d8f36e8cb323efe06431757f4384784cc (patch)
tree7b0229e2f1a59ac485f196591af2407feff71427
parent8b46f03c8da80400de53027270a23fbcfa472730 (diff)
downloadnewlib-e0d8706d8f36e8cb323efe06431757f4384784cc.zip
newlib-e0d8706d8f36e8cb323efe06431757f4384784cc.tar.gz
newlib-e0d8706d8f36e8cb323efe06431757f4384784cc.tar.bz2
* net.cc (cygwin_sendto): Allow zero-sized packets.
(cygwin_sendmsg): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/net.cc5
2 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 61e2a5c..09fcdca 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (cygwin_sendto): Allow zero-sized packets.
+ (cygwin_sendmsg): Ditto.
+
2006-06-26 Corinna Vinschen <corinna@vinschen.de>
Revert patches from 2005-10-22 and 2006-06-14 to use event driven
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index b821308..5ec30f0 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -634,7 +634,7 @@ cygwin_sendto (int fd, const void *buf, int len, int flags,
myfault efault;
if (efault.faulted (EFAULT) || !fh)
res = -1;
- else if ((res = len) != 0)
+ else
res = fh->sendto (buf, len, flags, to, tolen);
syscall_printf ("%d = sendto (%d, %p, %d, %x, %p, %d)",
@@ -2295,8 +2295,7 @@ cygwin_sendmsg (int fd, const struct msghdr *msg, int flags)
else
{
res = check_iovec_for_write (msg->msg_iov, msg->msg_iovlen);
- if (res > 0)
- res = fh->sendmsg (msg, flags, res); // res == iovec tot
+ res = fh->sendmsg (msg, flags, res); // res == iovec tot
}
syscall_printf ("%d = sendmsg (%d, %p, %x)", res, fd, msg, flags);