diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2013-02-04 19:27:13 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2013-02-04 19:27:13 +0000 |
commit | db8b865d20076ba51626da16bb3a2e080b7d1104 (patch) | |
tree | f3b1f1c79136c17156eb55eb2c48c64446e79140 /cups/request.c | |
parent | 0cb67df36975d4467f5247a561e4c3e04da41dc2 (diff) | |
download | cups-db8b865d20076ba51626da16bb3a2e080b7d1104.tar.gz |
Merge changes from CUPS 1.7svn-r10861.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@4167 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/request.c')
-rw-r--r-- | cups/request.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cups/request.c b/cups/request.c index c1fbb5a04..4da103331 100644 --- a/cups/request.c +++ b/cups/request.c @@ -3,7 +3,7 @@ * * IPP utilities for CUPS. * - * Copyright 2007-2012 by Apple Inc. + * Copyright 2007-2013 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -46,6 +46,9 @@ #ifndef O_BINARY # define O_BINARY 0 #endif /* O_BINARY */ +#ifndef MSG_DONTWAIT +# define MSG_DONTWAIT 0 +#endif /* !MSG_DONTWAIT */ /* @@ -1015,8 +1018,13 @@ _cupsConnect(void) char ch; /* Connection check byte */ +#ifdef WIN32 + if (recv(cg->http->fd, &ch, 1, MSG_PEEK) < 0 && + WSAGetLastError() != WSAEWOULDBLOCK) +#else if (recv(cg->http->fd, &ch, 1, MSG_PEEK | MSG_DONTWAIT) < 0 && errno != EWOULDBLOCK) +#endif /* WIN32 */ { /* * Nope, close the connection... |