mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[libevent] Add SOCK_SHIFT for curl and libevent
This commit is contained in:
parent
1f4ca1445d
commit
b1bf9e8dba
@ -87,6 +87,13 @@ do { \
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LIBEVENT) && defined(CONFIG_LIBCURL)
|
||||
|
||||
#ifdef CONFIG_OS_WIN32
|
||||
#define SOCK_SHIFT 1024
|
||||
#else
|
||||
#define SOCK_SHIFT 0
|
||||
#endif
|
||||
|
||||
/* Information associated with a specific easy handle */
|
||||
typedef struct _ConnInfo
|
||||
{
|
||||
@ -232,7 +239,7 @@ setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g)
|
||||
if (event_initialized(&f->ev)) {
|
||||
event_del(&f->ev);
|
||||
}
|
||||
event_assign(&f->ev, g->evbase, f->sockfd, kind, event_cb, g);
|
||||
event_assign(&f->ev, g->evbase, f->sockfd + SOCK_SHIFT, kind, event_cb, g);
|
||||
event_add(&f->ev, NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user