diff options
Diffstat (limited to 'lib/libevent/evbuffer.c')
-rw-r--r-- | lib/libevent/evbuffer.c | 10 |
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; |