# HG changeset patch # User Herman Bloggs # Date 1034527085 0 # Node ID 11ab2a5f6677ba7325e1ed482a1855190babebf1 # Parent ae72be911db5223fc2b5dc45cde36deccdf28f8d [gaim-migrate @ 3796] win32 fix committer: Tailor Script diff -r ae72be911db5 -r 11ab2a5f6677 src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Sun Oct 13 16:37:33 2002 +0000 +++ b/src/protocols/jabber/jabber.c Sun Oct 13 16:38:05 2002 +0000 @@ -1964,15 +1964,28 @@ char buf[1024]; g_snprintf(buf, sizeof(buf), "GET /%s HTTP/1.1\r\nHost: %s\r\n\r\n", jft->url->page, jft->url->address); write(source, buf, strlen(buf)); +#ifndef _WIN32 fcntl(source, F_SETFL, O_NONBLOCK); +#else + { + u_long imode = 1; + ioctlsocket(source, FIONBIO, (u_long*)&imode); + } +#endif jft->sentreq = TRUE; jft->watcher = gaim_input_add(source, GAIM_INPUT_READ, jabber_http_recv_callback,data); return; } if(!jft->startsaving) { +#ifndef _WIN32 if(read(source, &test, sizeof(test)) > 0 || errno == EWOULDBLOCK) { - if(errno == EWOULDBLOCK) { + if(errno == EWOULDBLOCK) +#else + if(recv(source, &test, sizeof(test), 0) > 0 || WSAGetLastError() == WSAEWOULDBLOCK) { + if(WSAEWOULDBLOCK == WSAGetLastError()) +#endif + { errno = 0; return; }