Skip to content

Commit

Permalink
Use non_socket_listener to detect non-socket listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Oct 19, 2023
1 parent dbb0fac commit eda10f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib/io/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/listen/ldap_sync/proto_ldap_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit eda10f8

Please sign in to comment.