summaryrefslogtreecommitdiff
path: root/lib/libevent/evbuffer.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-03-19 15:12:50 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-03-19 15:12:50 +0000
commit8f0c3b4494ef7c12f6136859858411b0e6672a31 (patch)
tree4109377d02ee8319bf59faf2af014413113f244b /lib/libevent/evbuffer.c
parent71e51af8810fd87983dadc6afeea4207853f3c19 (diff)
Update to libevent-1.3b while retaining our local changes. beck@ OK
Diffstat (limited to 'lib/libevent/evbuffer.c')
-rw-r--r--lib/libevent/evbuffer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libevent/evbuffer.c b/lib/libevent/evbuffer.c
index ad3491f1960..62e28320a49 100644
--- a/lib/libevent/evbuffer.c
+++ b/lib/libevent/evbuffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evbuffer.c,v 1.9 2006/11/26 15:22:58 brad Exp $ */
+/* $OpenBSD: evbuffer.c,v 1.10 2007/03/19 15:12:49 millert Exp $ */
/*
* Copyright (c) 2002-2004 Niels Provos <provos@citi.umich.edu>
@@ -165,12 +165,20 @@ bufferevent_writecb(int fd, short event, void *arg)
if (EVBUFFER_LENGTH(bufev->output)) {
res = evbuffer_write(bufev->output, fd);
if (res == -1) {
+#ifndef WIN32
+/*todo. evbuffer uses WriteFile when WIN32 is set. WIN32 system calls do not
+ *set errno. thus this error checking is not portable*/
if (errno == EAGAIN ||
errno == EINTR ||
errno == EINPROGRESS)
goto reschedule;
/* error case */
what |= EVBUFFER_ERROR;
+
+#else
+ goto reschedule;
+#endif
+
} else if (res == 0) {
/* eof case */
what |= EVBUFFER_EOF;