From: Nick Porter Date: Thu, 19 Oct 2023 13:32:26 +0000 (+0100) Subject: Use non_socket_listener to detect non-socket listeners X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eda10f8e251407701bfcfbe167e712d901cc69c8;p=thirdparty%2Ffreeradius-server.git Use non_socket_listener to detect non-socket listeners --- diff --git a/src/lib/io/network.c b/src/lib/io/network.c index fdf88bb02c3..a7449a918db 100644 --- a/src/lib/io/network.c +++ b/src/lib/io/network.c @@ -1316,11 +1316,8 @@ static int fr_network_listen_add_self(fr_network_t *nr, fr_listen_t *listen) /* * Non-socket listeners just get told about the event * list, and nothing else. - * In very specific cases a listener app_io may only - * have a close, so look for both open and close to - * determine what this is. */ - if (listen->non_socket_listener || (!listen->app_io->open && !listen->app_io->close)) { + if (listen->non_socket_listener) { fr_assert(listen->app_io->event_list_set != NULL); fr_assert(!listen->app_io->read); fr_assert(!listen->app_io->write); diff --git a/src/listen/ldap_sync/proto_ldap_sync.c b/src/listen/ldap_sync/proto_ldap_sync.c index 4ef2f195f4a..63bd6a547a4 100644 --- a/src/listen/ldap_sync/proto_ldap_sync.c +++ b/src/listen/ldap_sync/proto_ldap_sync.c @@ -254,6 +254,7 @@ static int mod_open(void *instance, fr_schedule_t *sc, UNUSED CONF_SECTION *conf li->app = &proto_ldap_sync; li->app_instance = instance; li->server_cs = inst->server_cs; + li->non_socket_listener = true; /* * Set configurable parameters for message ring buffer.