assert( daemon_base != NULL );
- dnsbase = evdns_base_new( daemon_base,
- EVDNS_BASE_INITIALIZE_NAMESERVERS |
- EVDNS_BASE_DISABLE_WHEN_INACTIVE );
+#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: "
"failed to set up for async name resolution\n" );
}
}
- event = evtimer_new( daemon_base, operations_timeout, event_self_cbarg() );
+ event = evtimer_new( daemon_base, operations_timeout, NULL );
if ( !event ) {
Debug( LDAP_DEBUG_ANY, "lloadd: "
"failed to allocate timeout event\n" );
void
operations_timeout( evutil_socket_t s, short what, void *arg )
{
- struct event *self = arg;
LloadBackend *b;
time_t threshold;
done:
Debug( LDAP_DEBUG_TRACE, "operations_timeout: "
"timeout task finished\n" );
- evtimer_add( self, lload_timeout_api );
+ evtimer_add( lload_timeout_event, lload_timeout_api );
}
void