fix select
git-svn-id: file:///raid/svn-personal/tewi/trunk@88 8739d7e6-ffea-ec47-b151-bdff447c6205
This commit is contained in:
parent
d5c293a80b
commit
79b158cd1e
|
@ -71,7 +71,11 @@ int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req) {
|
||||||
#ifndef NO_SSL
|
#ifndef NO_SSL
|
||||||
if(ssl == NULL || !SSL_has_pending(ssl)) {
|
if(ssl == NULL || !SSL_has_pending(ssl)) {
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __HAIKU__
|
||||||
|
int n = select(32, &fds, NULL, NULL, &tv);
|
||||||
|
#else
|
||||||
int n = select(FD_SETSIZE, &fds, NULL, NULL, &tv);
|
int n = select(FD_SETSIZE, &fds, NULL, NULL, &tv);
|
||||||
|
#endif
|
||||||
if(n <= 0) {
|
if(n <= 0) {
|
||||||
cm_log("HTTP", "Timeout, disconncting");
|
cm_log("HTTP", "Timeout, disconncting");
|
||||||
free(header);
|
free(header);
|
||||||
|
|
|
@ -79,7 +79,7 @@ int tw_wildcard_match(const char* wildcard, const char* target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void close_socket(int sock) {
|
void close_socket(int sock) {
|
||||||
#if defined(__MINGW32__) || defined(__HAIKU__)
|
#if defined(__MINGW32__)
|
||||||
closesocket(sock);
|
closesocket(sock);
|
||||||
#else
|
#else
|
||||||
close(sock);
|
close(sock);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user