mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:33:37 +03:00
tiny-curl: patch set applied on 8.4.0
This commit is contained in:
parent
d755a5f7c0
commit
172e54cda1
22 changed files with 1845 additions and 56 deletions
16
lib/multi.c
16
lib/multi.c
|
|
@ -354,7 +354,7 @@ static size_t hash_fd(void *key, size_t key_length, size_t slots_num)
|
|||
curl_socket_t fd = *((curl_socket_t *) key);
|
||||
(void) key_length;
|
||||
|
||||
return (fd % slots_num);
|
||||
return ((long)fd % slots_num); /* weirdo FreeRTOS hack */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1086,8 +1086,8 @@ static int multi_getsock(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
CURLMcode curl_multi_fdset(struct Curl_multi *multi,
|
||||
fd_set *read_fd_set, fd_set *write_fd_set,
|
||||
fd_set *exc_fd_set, int *max_fd)
|
||||
curl_fd_set *read_fd_set, curl_fd_set *write_fd_set,
|
||||
curl_fd_set *exc_fd_set, int *max_fd)
|
||||
{
|
||||
/* Scan through all the easy handles to get the file descriptors set.
|
||||
Some easy handles may not have connected to the remote host yet,
|
||||
|
|
@ -1118,11 +1118,13 @@ CURLMcode curl_multi_fdset(struct Curl_multi *multi,
|
|||
/* pretend it doesn't exist */
|
||||
continue;
|
||||
if(bitmap & GETSOCK_READSOCK(i))
|
||||
FD_SET(sockbunch[i], read_fd_set);
|
||||
CURL_FD_SET(sockbunch[i], read_fd_set, eSELECT_READ);
|
||||
if(bitmap & GETSOCK_WRITESOCK(i))
|
||||
FD_SET(sockbunch[i], write_fd_set);
|
||||
CURL_FD_SET(sockbunch[i], write_fd_set, eSELECT_WRITE);
|
||||
#ifndef FreeRTOS
|
||||
if((int)sockbunch[i] > this_max_fd)
|
||||
this_max_fd = (int)sockbunch[i];
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
break;
|
||||
|
|
@ -1169,8 +1171,8 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
|
|||
unsigned int curlfds;
|
||||
long timeout_internal;
|
||||
int retcode = 0;
|
||||
struct pollfd a_few_on_stack[NUM_POLLS_ON_STACK];
|
||||
struct pollfd *ufds = &a_few_on_stack[0];
|
||||
struct curl_pollfd a_few_on_stack[NUM_POLLS_ON_STACK];
|
||||
struct curl_pollfd *ufds = &a_few_on_stack[0];
|
||||
bool ufds_malloc = FALSE;
|
||||
#ifdef USE_WINSOCK
|
||||
WSANETWORKEVENTS wsa_events;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue