From: Ondřej Kuzník Date: Tue, 4 May 2021 12:01:46 +0000 (+0100) Subject: ITS#8747 Remove c_private from LloadConnection X-Git-Tag: OPENLDAP_REL_ENG_2_6_0~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e4d7ffe79426d0d5e26306106eb0e6467f6fa43;p=thirdparty%2Fopenldap.git ITS#8747 Remove c_private from LloadConnection --- diff --git a/servers/lloadd/client.c b/servers/lloadd/client.c index c9c60aa473..9fa38636e2 100644 --- a/servers/lloadd/client.c +++ b/servers/lloadd/client.c @@ -391,7 +391,6 @@ fail: LloadConnection * client_init( ber_socket_t s, - LloadListener *listener, const char *peername, struct event_base *base, int flags ) @@ -401,8 +400,6 @@ client_init( event_callback_fn read_cb = connection_read_cb, write_cb = connection_write_cb; - assert( listener != NULL ); - if ( (c = lload_connection_init( s, peername, flags) ) == NULL ) { return NULL; } @@ -456,7 +453,6 @@ client_init( } c->c_write_event = event; - c->c_private = listener; c->c_destroy = client_destroy; c->c_unlink = client_unlink; c->c_pdu_cb = handle_one_request; diff --git a/servers/lloadd/daemon.c b/servers/lloadd/daemon.c index 2338f8365d..f60db22c67 100644 --- a/servers/lloadd/daemon.c +++ b/servers/lloadd/daemon.c @@ -931,7 +931,7 @@ lload_listener( #ifdef HAVE_TLS if ( sl->sl_is_tls ) cflag |= CONN_IS_TLS; #endif - c = client_init( s, sl, peername, lload_daemon[tid].base, cflag ); + c = client_init( s, peername, lload_daemon[tid].base, cflag ); if ( !c ) { Debug( LDAP_DEBUG_ANY, "lload_listener: " diff --git a/servers/lloadd/lload.h b/servers/lloadd/lload.h index be54d070b9..5ba8c6abd3 100644 --- a/servers/lloadd/lload.h +++ b/servers/lloadd/lload.h @@ -410,8 +410,6 @@ struct LloadConnection { * - Upstream: b->b_mutex */ LDAP_CIRCLEQ_ENTRY(LloadConnection) c_next; - - void *c_private; }; enum op_state { diff --git a/servers/lloadd/proto-lload.h b/servers/lloadd/proto-lload.h index 00ca0d16ff..ffa15de365 100644 --- a/servers/lloadd/proto-lload.h +++ b/servers/lloadd/proto-lload.h @@ -60,7 +60,7 @@ LDAP_SLAPD_F (int) request_abandon( LloadConnection *c, LloadOperation *op ); LDAP_SLAPD_F (int) request_process( LloadConnection *c, LloadOperation *op ); LDAP_SLAPD_F (int) handle_one_request( LloadConnection *c ); LDAP_SLAPD_F (void) client_tls_handshake_cb( evutil_socket_t s, short what, void *arg ); -LDAP_SLAPD_F (LloadConnection *) client_init( ber_socket_t s, LloadListener *url, const char *peername, struct event_base *base, int use_tls ); +LDAP_SLAPD_F (LloadConnection *) client_init( ber_socket_t s, const char *peername, struct event_base *base, int use_tls ); LDAP_SLAPD_F (void) client_reset( LloadConnection *c ); LDAP_SLAPD_F (void) client_destroy( LloadConnection *c ); LDAP_SLAPD_F (void) clients_destroy( int gentle );