mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-16 15:56:15 -04:00
Merge remote-tracking branch 'origin/patches-2.0'
This commit is contained in:
commit
18f24ef4d5
@ -192,6 +192,9 @@
|
|||||||
/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
|
/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
|
||||||
/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
|
/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
|
||||||
|
#define _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/devpoll.h> header file. */
|
/* Define to 1 if you have the <sys/devpoll.h> header file. */
|
||||||
/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */
|
/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */
|
||||||
|
|
||||||
|
@ -64,6 +64,11 @@
|
|||||||
#include "util-internal.h"
|
#include "util-internal.h"
|
||||||
#include "iocp-internal.h"
|
#include "iocp-internal.h"
|
||||||
|
|
||||||
|
#ifndef SO_UPDATE_CONNECT_CONTEXT
|
||||||
|
/* Mingw is sometimes missing this */
|
||||||
|
#define SO_UPDATE_CONNECT_CONTEXT 0x7010
|
||||||
|
#endif
|
||||||
|
|
||||||
/* prototypes */
|
/* prototypes */
|
||||||
static int be_async_enable(struct bufferevent *, short);
|
static int be_async_enable(struct bufferevent *, short);
|
||||||
static int be_async_disable(struct bufferevent *, short);
|
static int be_async_disable(struct bufferevent *, short);
|
||||||
@ -404,11 +409,15 @@ connect_complete(struct event_overlapped *eo, ev_uintptr_t key,
|
|||||||
{
|
{
|
||||||
struct bufferevent_async *bev_a = upcast_connect(eo);
|
struct bufferevent_async *bev_a = upcast_connect(eo);
|
||||||
struct bufferevent *bev = &bev_a->bev.bev;
|
struct bufferevent *bev = &bev_a->bev.bev;
|
||||||
|
evutil_socket_t sock;
|
||||||
|
|
||||||
BEV_LOCK(bev);
|
BEV_LOCK(bev);
|
||||||
|
|
||||||
EVUTIL_ASSERT(bev_a->bev.connecting);
|
EVUTIL_ASSERT(bev_a->bev.connecting);
|
||||||
bev_a->bev.connecting = 0;
|
bev_a->bev.connecting = 0;
|
||||||
|
sock = _evbuffer_overlapped_get_fd(bev_a->bev.bev.input);
|
||||||
|
/* XXXX Handle error? */
|
||||||
|
setsockopt(sock, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0);
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
bufferevent_async_set_connected(bev);
|
bufferevent_async_set_connected(bev);
|
||||||
|
@ -88,7 +88,7 @@ AC_SUBST(LIBTOOL_DEPS)
|
|||||||
|
|
||||||
AM_CONDITIONAL([BUILD_REGRESS], [test "$enable_libevent_regress" = "yes"])
|
AM_CONDITIONAL([BUILD_REGRESS], [test "$enable_libevent_regress" = "yes"])
|
||||||
if test "$enable_libevent_regress" = "yes" ; then
|
if test "$enable_libevent_regress" = "yes" ; then
|
||||||
CHECK_REGRESS=regress
|
CHECK_REGRESS='regress$(EXEENT)'
|
||||||
else
|
else
|
||||||
CHECK_REGRESS=
|
CHECK_REGRESS=
|
||||||
fi
|
fi
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user