Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
orbea -
OpenLDAP
Commits
5fa0a651
Commit
5fa0a651
authored
Feb 08, 2021
by
Ondřej Kuzník
Committed by
Quanah Gibson-Mount
Feb 24, 2021
Browse files
revert: libevent 2.0 support
parent
a3c49b87
Changes
4
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
5fa0a651
...
...
@@ -2146,11 +2146,12 @@ if test $ol_enable_balancer != no ; then
[have_libevent=yes
LEVENT_LIBS="$LEVENT_LIBS -levent"],
[have_libevent=no])])
AC_CHECK_LIB(event, libevent_global_shutdown, [], [have_libevent=no])
if test $have_libevent = yes ; then
AC_DEFINE(HAVE_LIBEVENT, 1, [define if you have -levent])
else
AC_MSG_ERROR([You need libevent 2.
0
or later with DNS support to build the load balancer])
AC_MSG_ERROR([You need libevent 2.
1
or later with DNS support to build the load balancer])
fi
fi
...
...
servers/lloadd/daemon.c
View file @
5fa0a651
...
...
@@ -1266,10 +1266,6 @@ lloadd_daemon( struct event_base *daemon_base )
assert
(
daemon_base
!=
NULL
);
#ifndef EVDNS_BASE_INITIALIZE_NAMESERVERS
/* libevent 2.0 support */
#define EVDNS_BASE_INITIALIZE_NAMESERVERS 1
#endif
/* !EVDNS_BASE_INITIALIZE_NAMESERVERS */
dnsbase
=
evdns_base_new
(
daemon_base
,
EVDNS_BASE_INITIALIZE_NAMESERVERS
);
if
(
!
dnsbase
)
{
Debug
(
LDAP_DEBUG_ANY
,
"lloadd startup: "
...
...
@@ -1326,7 +1322,7 @@ lloadd_daemon( struct event_base *daemon_base )
}
}
event
=
evtimer_new
(
daemon_base
,
operations_timeout
,
NULL
);
event
=
evtimer_new
(
daemon_base
,
operations_timeout
,
event_self_cbarg
()
);
if
(
!
event
)
{
Debug
(
LDAP_DEBUG_ANY
,
"lloadd: "
"failed to allocate timeout event
\n
"
);
...
...
servers/lloadd/libevent_support.c
View file @
5fa0a651
...
...
@@ -167,7 +167,5 @@ lload_libevent_init( void )
void
lload_libevent_destroy
(
void
)
{
#if ( EVENT__NUMERIC_VERSION >= 0x02010000 )
libevent_global_shutdown
();
#endif
}
servers/lloadd/operation.c
View file @
5fa0a651
...
...
@@ -614,6 +614,7 @@ connection_timeout( LloadConnection *upstream, void *arg )
void
operations_timeout
(
evutil_socket_t
s
,
short
what
,
void
*
arg
)
{
struct
event
*
self
=
arg
;
LloadBackend
*
b
;
time_t
threshold
;
...
...
@@ -652,7 +653,7 @@ operations_timeout( evutil_socket_t s, short what, void *arg )
done:
Debug
(
LDAP_DEBUG_TRACE
,
"operations_timeout: "
"timeout task finished
\n
"
);
evtimer_add
(
lload_timeout_event
,
lload_timeout_api
);
evtimer_add
(
self
,
lload_timeout_api
);
}
void
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment