adjusted to the new internal *_getsock() concept for providing info internally

about what sockets to wait for what action on
This commit is contained in:
Daniel Stenberg 2006-04-11 07:23:30 +00:00
parent c1e307f585
commit 0542002d7a
1 changed files with 11 additions and 9 deletions

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -715,20 +715,22 @@ CURLcode Curl_is_resolved(struct connectdata *conn,
return CURLE_OK; return CURLE_OK;
} }
CURLcode Curl_resolv_fdset(struct connectdata *conn, int Curl_resolv_getsock(struct connectdata *conn,
fd_set *read_fd_set, curl_socket_t *socks,
fd_set *write_fd_set, int numsocks)
int *max_fdp)
{ {
const struct thread_data *td = const struct thread_data *td =
(const struct thread_data *) conn->async.os_specific; (const struct thread_data *) conn->async.os_specific;
if (td && td->dummy_sock != CURL_SOCKET_BAD) { if (td && td->dummy_sock != CURL_SOCKET_BAD) {
FD_SET(td->dummy_sock,write_fd_set); if(numsocks) {
*max_fdp = (int)td->dummy_sock; /* return one socket waiting for writable, even though this is just
a dummy */
socks[0] = td->dummy_sock;
return GETSOCK_WRITESOCK(0);
}
} }
(void) read_fd_set; return 0;
return CURLE_OK;
} }
#ifdef CURLRES_IPV4 #ifdef CURLRES_IPV4