Re: [xml] [patch] Windows&connect-select
- From: Coren <einprogress e201 hadiko de>
- To: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] [patch] Windows&connect-select
- Date: Sat, 31 Jan 2004 20:20:52 +0100
Daniel Veillard wrote:
Okay, but sent patches as attachment, not in the messages, they
get garbled by mail transport....
MTA is innocent, but MUA... Mozilla really needs a "raw mode" of
editing, where it doesn't try to "help" me - I know where I want
spaces and CR/LFs. :(
Same patch, attached instead...
Peter
P.S.: I am on the list, no need to CC: me. :)
--- nanohttp.c.bak Thu Jan 29 21:03:09 2004
+++ nanohttp.c Thu Jan 29 21:15:19 2004
@@ -872,6 +872,9 @@
xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
{
fd_set wfd;
+#ifdef _WINSOCKAPI_
+ fd_set xfd;
+#endif
struct timeval tv;
int status;
int addrlen;
@@ -954,8 +957,15 @@
FD_ZERO(&wfd);
FD_SET(s, &wfd);
+
+#ifdef _WINSOCKAPI_
+ FD_ZERO(&xfd);
+ FD_SET(s, &xfd);
+ switch(select(s+1, NULL, &wfd, &xfd, &tv))
+#else
switch(select(s+1, NULL, &wfd, NULL, &tv))
+#endif
{
case 0:
/* Time out */
@@ -969,7 +979,11 @@
return(-1);
}
- if ( FD_ISSET(s, &wfd) ) {
+ if ( FD_ISSET(s, &wfd)
+#ifdef _WINSOCKAPI_
+ || FD_ISSET(s, &xfd)
+#endif
+ ) {
SOCKLEN_T len;
len = sizeof(status);
#ifdef SO_ERROR
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]