From 8d15eee4f3d8355e47ee5f103d0ce46646eb7295 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Thu, 20 Sep 2018 12:27:56 -0400 Subject: [PATCH] rename variable "listen" to "li" so that it doesn't conflict with the function listen() --- src/lib/io/base.h | 12 ++-- src/lib/io/master.c | 62 +++++++++---------- src/modules/proto_control/proto_control_tcp.c | 12 ++-- .../proto_control/proto_control_unix.c | 12 ++-- src/modules/proto_detail/proto_detail.c | 36 +++++------ src/modules/proto_detail/proto_detail_file.c | 54 ++++++++-------- src/modules/proto_detail/proto_detail_work.c | 12 ++-- src/modules/proto_dhcpv4/proto_dhcpv4_udp.c | 12 ++-- src/modules/proto_ldap_sync/proto_ldap_sync.c | 14 ++--- src/modules/proto_radius/proto_radius_tcp.c | 12 ++-- src/modules/proto_radius/proto_radius_udp.c | 12 ++-- src/modules/proto_vmps/proto_vmps_udp.c | 12 ++-- 12 files changed, 131 insertions(+), 131 deletions(-) diff --git a/src/lib/io/base.h b/src/lib/io/base.h index ad298418ccc..59274a00736 100644 --- a/src/lib/io/base.h +++ b/src/lib/io/base.h @@ -79,28 +79,28 @@ typedef struct fr_channel_t fr_channel_t; * * No data will be read from or written to the fd, except by the io_data callbacks here. * - * @param[in] listen the listener for this socket + * @param[in] li the listener for this socket * @return * - 0 on success * - <0 on error */ -typedef int (*fr_io_open_t)(fr_listen_t *listen); +typedef int (*fr_io_open_t)(fr_listen_t *li); /** Return a selectable file descriptor for this I/O path * * Return the file descriptor associated with this I/O path. * - * @param[in] listen the listener for this socket + * @param[in] li the listener for this socket */ -typedef int (*fr_io_get_fd_t)(fr_listen_t const *listen); +typedef int (*fr_io_get_fd_t)(fr_listen_t const *li); /** Set a selectable file descriptor for this I/O path * * - * @param[in] listen the listener for this socket + * @param[in] li the listener for this socket * @param[in] fd the FD to set */ -typedef int (*fr_io_set_fd_t)(fr_listen_t *listen, int fd); +typedef int (*fr_io_set_fd_t)(fr_listen_t *li, int fd); /** Decode a raw packet and convert it into a request. * diff --git a/src/lib/io/master.c b/src/lib/io/master.c index 56065ad33b1..177ff1898cb 100644 --- a/src/lib/io/master.c +++ b/src/lib/io/master.c @@ -389,7 +389,7 @@ static fr_io_connection_t *fr_io_connection_alloc(fr_io_instance_t *inst, fr_io_ int rcode; fr_io_connection_t *connection; dl_instance_t *dl_inst = NULL; - fr_listen_t *listen; + fr_listen_t *li; RADCLIENT *radclient; /* @@ -541,15 +541,15 @@ static fr_io_connection_t *fr_io_connection_alloc(fr_io_instance_t *inst, fr_io_ /* * Get the child listener. */ - MEM(listen = connection->child = talloc(connection, fr_listen_t)); - memcpy(listen, inst->listen, sizeof(*listen)); + MEM(li = connection->child = talloc(connection, fr_listen_t)); + memcpy(li, inst->listen, sizeof(*li)); /* * Glue in the actual app_io */ - listen->app_io = inst->child->app_io; - listen->app_io_instance = dl_inst->data; - listen->thread_instance = listen->app_io_instance; + li->app_io = inst->child->app_io; + li->app_io_instance = dl_inst->data; + li->thread_instance = li->app_io_instance; /* * There isn't a need to re-parse the @@ -574,7 +574,7 @@ static fr_io_connection_t *fr_io_connection_alloc(fr_io_instance_t *inst, fr_io_ /* * Create the listener, based on our listener. */ - MEM(listen = connection->listen = talloc(connection, fr_listen_t)); + MEM(li = connection->listen = talloc(connection, fr_listen_t)); /* * Note that our instance is effectively 'const'. @@ -582,14 +582,14 @@ static fr_io_connection_t *fr_io_connection_alloc(fr_io_instance_t *inst, fr_io_ * i.e. we can't add things to it. Instead, we have to * put all variable data into the connection. */ - memcpy(listen, inst->listen, sizeof(*listen)); + memcpy(li, inst->listen, sizeof(*li)); /* * Glue in the connection to the listener. */ - rad_assert(listen->app_io == &fr_master_app_io); - listen->app_io_instance = connection; - listen->thread_instance = listen->app_io_instance; + rad_assert(li->app_io == &fr_master_app_io); + li->app_io_instance = connection; + li->thread_instance = li->app_io_instance; /* * Instantiate the child, and open the socket. @@ -1561,14 +1561,14 @@ static int mod_inject(void *instance, uint8_t *buffer, size_t buffer_len, fr_tim /** Open a new listener * */ -static int mod_open(fr_listen_t *listen) +static int mod_open(fr_listen_t *li) { fr_io_instance_t *inst; fr_io_connection_t *connection; fr_listen_t *child; int rcode; - get_inst(listen->app_io_instance, &inst, &connection, &child); + get_inst(li->app_io_instance, &inst, &connection, &child); /* * One connection can't open another one. @@ -1585,13 +1585,13 @@ static int mod_open(fr_listen_t *listen) /** Get the file descriptor for this socket. * */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { fr_io_instance_t *inst; fr_io_connection_t *connection; fr_listen_t *child; - get_inst(listen->app_io_instance, &inst, &connection, &child); + get_inst(li->app_io_instance, &inst, &connection, &child); return inst->app_io->fd(child); } @@ -2602,26 +2602,26 @@ fr_trie_t *fr_master_io_network(TALLOC_CTX *ctx, int af, fr_ipaddr_t *allow, fr_ int fr_master_io_listen(TALLOC_CTX *ctx, fr_io_instance_t *io, fr_schedule_t *sc, size_t default_message_size, size_t num_messages) { - fr_listen_t *listen, *child; + fr_listen_t *li, *child; /* * Build the #fr_listen_t. This describes the complete * path data takes from the socket to the decoder and * back again. */ - listen = talloc_zero(ctx, fr_listen_t); + li = talloc_zero(ctx, fr_listen_t); - listen->app = io->app; - listen->app_instance = io->app_instance; - listen->server_cs = io->server_cs; + li->app = io->app; + li->app_instance = io->app_instance; + li->server_cs = io->server_cs; /* * Set configurable parameters for message ring buffer. */ - listen->default_message_size = default_message_size; - listen->num_messages = num_messages; + li->default_message_size = default_message_size; + li->num_messages = num_messages; - io->listen = listen; + io->listen = li; io->sc = sc; /* @@ -2635,16 +2635,16 @@ int fr_master_io_listen(TALLOC_CTX *ctx, fr_io_instance_t *io, fr_schedule_t *sc /* * Set the listener to call our master trampoline function. */ - listen->app_io = &fr_master_app_io; - listen->app_io_instance = io; - listen->thread_instance = listen->app_io_instance; + li->app_io = &fr_master_app_io; + li->app_io_instance = io; + li->thread_instance = li->app_io_instance; /* * Create the child listener, so that it can later be * passed to the app_io functions. */ - child = io->child = talloc_zero(listen, fr_listen_t); - memcpy(child, listen, sizeof(*child)); + child = io->child = talloc_zero(li, fr_listen_t); + memcpy(child, li, sizeof(*child)); /* * Reset these fields to point to the actual data. @@ -2658,7 +2658,7 @@ int fr_master_io_listen(TALLOC_CTX *ctx, fr_io_instance_t *io, fr_schedule_t *sc */ if (io->app_io->open(child) < 0) { cf_log_err(io->app_io_conf, "Failed opening %s interface", io->app_io->name); - talloc_free(listen); + talloc_free(li); return -1; } @@ -2666,8 +2666,8 @@ int fr_master_io_listen(TALLOC_CTX *ctx, fr_io_instance_t *io, fr_schedule_t *sc * Add the socket to the scheduler, which might * end up in a different thread. */ - if (!fr_schedule_listen_add(sc, listen)) { - talloc_free(listen); + if (!fr_schedule_listen_add(sc, li)) { + talloc_free(li); return -1; } diff --git a/src/modules/proto_control/proto_control_tcp.c b/src/modules/proto_control/proto_control_tcp.c index 37d0eecc0a1..b479626dd98 100644 --- a/src/modules/proto_control/proto_control_tcp.c +++ b/src/modules/proto_control/proto_control_tcp.c @@ -222,9 +222,9 @@ static void mod_network_get(void *instance, int *ipproto, bool *dynamic_clients, /** Open a TCP listener for control sockets * */ -static int mod_open(fr_listen_t *listener) +static int mod_open(fr_listen_t *li) { - proto_control_tcp_t *inst = talloc_get_type_abort(listener->app_io_instance, proto_control_tcp_t); + proto_control_tcp_t *inst = talloc_get_type_abort(li->app_io_instance, proto_control_tcp_t); int sockfd = 0; uint16_t port = inst->port; @@ -275,9 +275,9 @@ static int mod_open(fr_listen_t *listener) /** Get the file descriptor for this socket. * */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { - proto_control_tcp_t const *inst = talloc_get_type_abort_const(listen->thread_instance, proto_control_tcp_t); + proto_control_tcp_t const *inst = talloc_get_type_abort_const(li->thread_instance, proto_control_tcp_t); return inst->sockfd; } @@ -285,9 +285,9 @@ static int mod_fd(fr_listen_t const *listen) /** Set the file descriptor for this socket. * */ -static int mod_fd_set(fr_listen_t *listen, int fd) +static int mod_fd_set(fr_listen_t *li, int fd) { - proto_control_tcp_t *inst = talloc_get_type_abort(listen->thread_instance, proto_control_tcp_t); + proto_control_tcp_t *inst = talloc_get_type_abort(li->thread_instance, proto_control_tcp_t); inst->sockfd = fd; diff --git a/src/modules/proto_control/proto_control_unix.c b/src/modules/proto_control/proto_control_unix.c index 69238316ccd..7e6c72703b8 100644 --- a/src/modules/proto_control/proto_control_unix.c +++ b/src/modules/proto_control/proto_control_unix.c @@ -945,9 +945,9 @@ static int fr_server_domain_socket_perm(char const *path, uid_t uid, gid_t gid) /** Open a UNIX listener for control sockets * */ -static int mod_open(fr_listen_t *listen) +static int mod_open(fr_listen_t *li) { - proto_control_unix_t *inst = talloc_get_type_abort(listen->app_io_instance, proto_control_unix_t); + proto_control_unix_t *inst = talloc_get_type_abort(li->app_io_instance, proto_control_unix_t); int sockfd = 0; CONF_ITEM *ci; @@ -992,9 +992,9 @@ static int mod_open(fr_listen_t *listen) /** Get the file descriptor for this socket. * */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { - proto_control_unix_t const *inst = talloc_get_type_abort_const(listen->thread_instance, proto_control_unix_t); + proto_control_unix_t const *inst = talloc_get_type_abort_const(li->thread_instance, proto_control_unix_t); return inst->sockfd; } @@ -1022,9 +1022,9 @@ static int getpeereid(int s, uid_t *euid, gid_t *egid) /** Set the file descriptor for this socket. * */ -static int mod_fd_set(fr_listen_t *listen, int fd) +static int mod_fd_set(fr_listen_t *li, int fd) { - proto_control_unix_t *inst = talloc_get_type_abort(listen->thread_instance, proto_control_unix_t); + proto_control_unix_t *inst = talloc_get_type_abort(li->thread_instance, proto_control_unix_t); #ifndef HAVE_FUNOPEN cookie_io_functions_t io; #endif diff --git a/src/modules/proto_detail/proto_detail.c b/src/modules/proto_detail/proto_detail.c index 4be474ef57f..d82323e7b74 100644 --- a/src/modules/proto_detail/proto_detail.c +++ b/src/modules/proto_detail/proto_detail.c @@ -427,7 +427,7 @@ static void mod_entry_point_set(void const *instance, REQUEST *request) */ static int mod_open(void *instance, fr_schedule_t *sc, CONF_SECTION *conf) { - fr_listen_t *listen; + fr_listen_t *li; proto_detail_t *inst = talloc_get_type_abort(instance, proto_detail_t); /* @@ -435,28 +435,28 @@ static int mod_open(void *instance, fr_schedule_t *sc, CONF_SECTION *conf) * path, data takes from the socket to the decoder and * back again. */ - listen = talloc_zero(inst, fr_listen_t); + li = talloc_zero(inst, fr_listen_t); - listen->app_io = inst->app_io; - listen->app_io_instance = inst->app_io_instance; - listen->thread_instance = listen->app_io_instance; + li->app_io = inst->app_io; + li->app_io_instance = inst->app_io_instance; + li->thread_instance = li->app_io_instance; - listen->app = &proto_detail; - listen->app_instance = instance; - listen->server_cs = inst->server_cs; + li->app = &proto_detail; + li->app_instance = instance; + li->server_cs = inst->server_cs; /* * Set configurable parameters for message ring buffer. */ - listen->default_message_size = inst->max_packet_size; - listen->num_messages = inst->num_messages; + li->default_message_size = inst->max_packet_size; + li->num_messages = inst->num_messages; /* * Open the file. */ - if (inst->app_io->open(listen) < 0) { + if (inst->app_io->open(li) < 0) { cf_log_err(conf, "Failed opening %s interface", inst->app_io->name); - talloc_free(listen); + talloc_free(li); return -1; } @@ -465,24 +465,24 @@ static int mod_open(void *instance, fr_schedule_t *sc, CONF_SECTION *conf) * directly. */ if (strcmp(inst->io_submodule->module->name, "proto_detail_work") == 0) { - if (!fr_schedule_listen_add(sc, listen)) { - talloc_free(listen); + if (!fr_schedule_listen_add(sc, li)) { + talloc_free(li); return -1; } - inst->listen = listen; + inst->listen = li; return 0; } /* * Watch the directory for changes. */ - if (!fr_schedule_directory_add(sc, listen)) { - talloc_free(listen); + if (!fr_schedule_directory_add(sc, li)) { + talloc_free(li); return -1; } - inst->listen = listen; /* Probably won't need it, but doesn't hurt */ + inst->listen = li; /* Probably won't need it, but doesn't hurt */ inst->sc = sc; return 0; diff --git a/src/modules/proto_detail/proto_detail_file.c b/src/modules/proto_detail/proto_detail_file.c index 871d2ecf217..375b0a358ba 100644 --- a/src/modules/proto_detail/proto_detail_file.c +++ b/src/modules/proto_detail/proto_detail_file.c @@ -110,9 +110,9 @@ static void mod_vnode_extend(void *instance, UNUSED uint32_t fflags) /** Open a detail listener * */ -static int mod_open(fr_listen_t *listen) +static int mod_open(fr_listen_t *li) { - proto_detail_file_t *inst = talloc_get_type_abort(listen->app_io_instance, proto_detail_file_t); + proto_detail_file_t *inst = talloc_get_type_abort(li->app_io_instance, proto_detail_file_t); int oflag; #ifdef O_EVTONLY @@ -137,9 +137,9 @@ static int mod_open(fr_listen_t *listen) /** Get the file descriptor for this IO instance */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { - proto_detail_file_t const *inst = talloc_get_type_abort_const(listen->thread_instance, proto_detail_file_t); + proto_detail_file_t const *inst = talloc_get_type_abort_const(li->thread_instance, proto_detail_file_t); return inst->fd; } @@ -225,7 +225,7 @@ static int work_exists(proto_detail_file_t *inst, int fd) { bool opened = false; proto_detail_work_t *work; - fr_listen_t *listen = NULL; + fr_listen_t *li = NULL; struct stat st; fr_event_vnode_func_t funcs = { .delete = mod_vnode_delete }; @@ -287,7 +287,7 @@ static int work_exists(proto_detail_file_t *inst, int fd) return 1; } - MEM(listen = talloc_zero(NULL, fr_listen_t)); + MEM(li = talloc_zero(NULL, fr_listen_t)); /* * Create a new listener, and insert it into the @@ -297,18 +297,18 @@ static int work_exists(proto_detail_file_t *inst, int fd) * This listener is parented from the worker. So that * when the worker goes away, so does the listener. */ - listen->app_io = inst->parent->work_io; + li->app_io = inst->parent->work_io; - listen->app = inst->parent->self; - listen->app_instance = inst->parent; - listen->server_cs = inst->parent->server_cs; + li->app = inst->parent->self; + li->app_instance = inst->parent; + li->server_cs = inst->parent->server_cs; /* * The worker may be in a different thread, so avoid * talloc threading issues by using a NULL TALLOC_CTX. */ - MEM(listen->app_io_instance = work = talloc(listen, proto_detail_work_t)); - listen->thread_instance = listen->app_io_instance; + MEM(li->app_io_instance = work = talloc(li, proto_detail_work_t)); + li->thread_instance = li->app_io_instance; memcpy(work, inst->parent->work_submodule->data, sizeof(*work)); @@ -320,7 +320,7 @@ static int work_exists(proto_detail_file_t *inst, int fd) inst->name, inst->filename_work, fr_syserror(errno)); close(fd); - talloc_free(listen); + talloc_free(li); return -1; } @@ -352,8 +352,8 @@ static int work_exists(proto_detail_file_t *inst, int fd) /* * Set configurable parameters for message ring buffer. */ - listen->default_message_size = inst->parent->max_packet_size; - listen->num_messages = inst->parent->num_messages; + li->default_message_size = inst->parent->max_packet_size; + li->num_messages = inst->parent->num_messages; PTHREAD_MUTEX_LOCK(&inst->parent->worker_mutex); inst->parent->num_workers++; @@ -362,31 +362,31 @@ static int work_exists(proto_detail_file_t *inst, int fd) /* * Instantiate the new worker. */ - if (listen->app_io->instantiate && - (listen->app_io->instantiate(work, + if (li->app_io->instantiate && + (li->app_io->instantiate(work, inst->parent->work_io_conf) < 0)) { - ERROR("Failed instantiating %s", listen->app_io->name); + ERROR("Failed instantiating %s", li->app_io->name); goto error; } /* * Limit the number of messages, retransmission, etc. */ - if (work->max_outstanding < listen->num_messages) { - listen->num_messages = work->max_outstanding; + if (work->max_outstanding < li->num_messages) { + li->num_messages = work->max_outstanding; } if (work->max_outstanding < 1) work->max_outstanding = 1; /* * Open the detail.work file. */ - if (listen->app_io->open(listen->app_io_instance) < 0) { - ERROR("Failed opening %s", listen->app_io->name); + if (li->app_io->open(li->app_io_instance) < 0) { + ERROR("Failed opening %s", li->app_io->name); goto error; } opened = true; - if (!fr_schedule_listen_add(inst->parent->sc, listen)) { + if (!fr_schedule_listen_add(inst->parent->sc, li)) { error: if (fr_event_fd_delete(inst->el, inst->vnode_fd, FR_EVENT_FILTER_VNODE) < 0) { PERROR("Failed removing DELETE callback when opening work file"); @@ -395,13 +395,13 @@ static int work_exists(proto_detail_file_t *inst, int fd) inst->vnode_fd = -1; if (opened) { - (void) listen->app_io->close(listen->app_io_instance); - listen = NULL; + (void) li->app_io->close(li->app_io_instance); + li = NULL; } detach: - if (listen) (void) listen->app_io->detach(listen->app_io_instance); - talloc_free(listen); + if (li) (void) li->app_io->detach(li->app_io_instance); + talloc_free(li); return -1; } diff --git a/src/modules/proto_detail/proto_detail_work.c b/src/modules/proto_detail/proto_detail_work.c index 2fa4bce4c98..9b2fc6b6ca2 100644 --- a/src/modules/proto_detail/proto_detail_work.c +++ b/src/modules/proto_detail/proto_detail_work.c @@ -670,9 +670,9 @@ free_track: /** Open a detail listener * */ -static int mod_open(fr_listen_t *listen) +static int mod_open(fr_listen_t *li) { - proto_detail_work_t *inst = talloc_get_type_abort(listen->app_io_instance, proto_detail_work_t); + proto_detail_work_t *inst = talloc_get_type_abort(li->app_io_instance, proto_detail_work_t); /* * Open the file if we haven't already been given one. @@ -743,9 +743,9 @@ static int mod_close(void *instance) inst->fd = -1; if (inst->free_on_close) { - fr_listen_t *listen = talloc_get_type_abort(talloc_parent(inst), fr_listen_t); + fr_listen_t *li = talloc_get_type_abort(talloc_parent(inst), fr_listen_t); - talloc_free(listen); + talloc_free(li); } return 0; @@ -768,9 +768,9 @@ static void mod_revoke(UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int fla /** Get the file descriptor for this IO instance * */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { - proto_detail_work_t const *inst = talloc_get_type_abort_const(listen->thread_instance, proto_detail_work_t); + proto_detail_work_t const *inst = talloc_get_type_abort_const(li->thread_instance, proto_detail_work_t); return inst->fd; } diff --git a/src/modules/proto_dhcpv4/proto_dhcpv4_udp.c b/src/modules/proto_dhcpv4/proto_dhcpv4_udp.c index 6539f643315..4a410ffd587 100644 --- a/src/modules/proto_dhcpv4/proto_dhcpv4_udp.c +++ b/src/modules/proto_dhcpv4/proto_dhcpv4_udp.c @@ -475,9 +475,9 @@ static void mod_network_get(void *instance, int *ipproto, bool *dynamic_clients, /** Open a UDP listener for DHCPV4 * */ -static int mod_open(fr_listen_t *listen) +static int mod_open(fr_listen_t *li) { - proto_dhcpv4_udp_t *inst = talloc_get_type_abort(listen->app_io_instance, proto_dhcpv4_udp_t); + proto_dhcpv4_udp_t *inst = talloc_get_type_abort(li->app_io_instance, proto_dhcpv4_udp_t); int sockfd = 0; uint16_t port = inst->port; @@ -542,9 +542,9 @@ static int mod_open(fr_listen_t *listen) /** Get the file descriptor for this socket. */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { - proto_dhcpv4_udp_t const *inst = talloc_get_type_abort_const(listen->thread_instance, proto_dhcpv4_udp_t); + proto_dhcpv4_udp_t const *inst = talloc_get_type_abort_const(li->thread_instance, proto_dhcpv4_udp_t); return inst->sockfd; } @@ -553,9 +553,9 @@ static int mod_fd(fr_listen_t const *listen) /** Set the file descriptor for this socket. * */ -static int mod_fd_set(fr_listen_t *listen, int fd) +static int mod_fd_set(fr_listen_t *li, int fd) { - proto_dhcpv4_udp_t *inst = talloc_get_type_abort(listen->thread_instance, proto_dhcpv4_udp_t); + proto_dhcpv4_udp_t *inst = talloc_get_type_abort(li->thread_instance, proto_dhcpv4_udp_t); inst->sockfd = fd; diff --git a/src/modules/proto_ldap_sync/proto_ldap_sync.c b/src/modules/proto_ldap_sync/proto_ldap_sync.c index d532ac9c913..fabf0f4d1fa 100644 --- a/src/modules/proto_ldap_sync/proto_ldap_sync.c +++ b/src/modules/proto_ldap_sync/proto_ldap_sync.c @@ -248,7 +248,7 @@ static int fr_dict_enum_from_name_number(fr_dict_attr_t const *da, FR_NAME_NUMBE /** Describe the socket we opened to the LDAP server * - * @param[in] listen abstracting the connection to the server. + * @param[in] li abstracting the connection to the server. * @param[out] buffer Where to write text describing the socket. * @param[in] bufsize the length of data written to buffe.r * @return 1. @@ -475,7 +475,7 @@ static void request_queued(REQUEST *request, fr_state_signal_t action) * Sets various fields in the request->packet with information from the file descriptor * we received from libldap. * - * @param[in] listen The common listener encapsulating the libldap fd. + * @param[in] li The common listener encapsulating the libldap fd. * @param[in] inst of the proto_ldap_sync module. * @param[in] sync_id the unique identifier of the sync. * @return @@ -796,7 +796,7 @@ static RADCLIENT *proto_ldap_fake_client_alloc(proto_ldap_inst_t *inst) * * @param[in] ctx to allocate cookie buffer in. * @param[out] cookie Where to write the cookie we loaded. - * @param[in] listen structure encapsulating the LDAP + * @param[in] li structure encapsulating the LDAP * @param[in] config of the sync we're loading the cookie for. * @return * - -1 on failure. @@ -887,7 +887,7 @@ finish: * circumstances. This needs to be fixed, but is waiting on v4.0.0 * re-architecture. * - * @param[in] listen encapsulating the libldap socket. + * @param[in] li encapsulating the libldap socket. * @return * - 1 on success. * - 0 on failure. @@ -952,7 +952,7 @@ static int proto_ldap_socket_recv(rad_listen_t *listen) * @note This is performed synchronously. * * @param[in] cs specifying the listener configuration. - * @param[in] listen structure encapsulating the libldap socket. + * @param[in] li structure encapsulating the libldap socket. * @return * - 0 on success. * - -1 on error. @@ -1074,7 +1074,7 @@ static int proto_ldap_socket_open(UNUSED CONF_SECTION *cs, rad_listen_t *listen) /** Parse socket configuration * * @param[in] cs specifying the listener configuration. - * @param[in] listen structure encapsulating the libldap socket. + * @param[in] li structure encapsulating the libldap socket. * @return * - 0 on success. * - -1 on error. @@ -1197,7 +1197,7 @@ static int ldap_compile_section(CONF_SECTION *server_cs, char const *name1, char /** Compile the various recv/load/store sections * * @param[in] server_cs The virtual server containing the sections to compile. - * @param[in] listen_cs The listen config section. + * @param[in] li_cs The listen config section. */ static int proto_ldap_listen_compile(CONF_SECTION *server_cs, UNUSED CONF_SECTION *listen_cs) { diff --git a/src/modules/proto_radius/proto_radius_tcp.c b/src/modules/proto_radius/proto_radius_tcp.c index 701212da762..1499358e008 100644 --- a/src/modules/proto_radius/proto_radius_tcp.c +++ b/src/modules/proto_radius/proto_radius_tcp.c @@ -305,9 +305,9 @@ static void mod_network_get(void *instance, int *ipproto, bool *dynamic_clients, /** Open a TCP listener for RADIUS * */ -static int mod_open(fr_listen_t *listener) +static int mod_open(fr_listen_t *li) { - proto_radius_tcp_t *inst = talloc_get_type_abort(listener->app_io_instance, proto_radius_tcp_t); + proto_radius_tcp_t *inst = talloc_get_type_abort(li->app_io_instance, proto_radius_tcp_t); int sockfd = 0; uint16_t port = inst->port; @@ -358,18 +358,18 @@ static int mod_open(fr_listen_t *listener) /** Get the file descriptor for this socket. * */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { - proto_radius_tcp_t const *inst = talloc_get_type_abort_const(listen->thread_instance, proto_radius_tcp_t); + proto_radius_tcp_t const *inst = talloc_get_type_abort_const(li->thread_instance, proto_radius_tcp_t); return inst->sockfd; } /** Set the file descriptor for this socket. */ -static int mod_fd_set(fr_listen_t *listen, int fd) +static int mod_fd_set(fr_listen_t *li, int fd) { - proto_radius_tcp_t *inst = talloc_get_type_abort(listen->thread_instance, proto_radius_tcp_t); + proto_radius_tcp_t *inst = talloc_get_type_abort(li->thread_instance, proto_radius_tcp_t); inst->sockfd = fd; diff --git a/src/modules/proto_radius/proto_radius_udp.c b/src/modules/proto_radius/proto_radius_udp.c index c3a5993ba63..743b0efdada 100644 --- a/src/modules/proto_radius/proto_radius_udp.c +++ b/src/modules/proto_radius/proto_radius_udp.c @@ -314,9 +314,9 @@ static void mod_network_get(void *instance, int *ipproto, bool *dynamic_clients, /** Open a UDP listener for RADIUS * */ -static int mod_open(fr_listen_t *listen) +static int mod_open(fr_listen_t *li) { - proto_radius_udp_t *inst = talloc_get_type_abort(listen->app_io_instance, proto_radius_udp_t); + proto_radius_udp_t *inst = talloc_get_type_abort(li->app_io_instance, proto_radius_udp_t); int sockfd = 0; uint16_t port = inst->port; @@ -393,9 +393,9 @@ static int mod_open(fr_listen_t *listen) /** Get the file descriptor for this socket. */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { - proto_radius_udp_t const *inst = talloc_get_type_abort_const(listen->thread_instance, proto_radius_udp_t); + proto_radius_udp_t const *inst = talloc_get_type_abort_const(li->thread_instance, proto_radius_udp_t); return inst->sockfd; } @@ -403,9 +403,9 @@ static int mod_fd(fr_listen_t const *listen) /** Set the file descriptor for this socket. * */ -static int mod_fd_set(fr_listen_t *listen, int fd) +static int mod_fd_set(fr_listen_t *li, int fd) { - proto_radius_udp_t *inst = talloc_get_type_abort(listen->thread_instance, proto_radius_udp_t); + proto_radius_udp_t *inst = talloc_get_type_abort(li->thread_instance, proto_radius_udp_t); inst->sockfd = fd; diff --git a/src/modules/proto_vmps/proto_vmps_udp.c b/src/modules/proto_vmps/proto_vmps_udp.c index 7b7d56788b5..6e17f26e6e5 100644 --- a/src/modules/proto_vmps/proto_vmps_udp.c +++ b/src/modules/proto_vmps/proto_vmps_udp.c @@ -313,9 +313,9 @@ static void mod_network_get(void *instance, int *ipproto, bool *dynamic_clients, /** Open a UDP listener for VMPS * */ -static int mod_open(fr_listen_t *listen) +static int mod_open(fr_listen_t *li) { - proto_vmps_udp_t *inst = talloc_get_type_abort(listen->app_io_instance, proto_vmps_udp_t); + proto_vmps_udp_t *inst = talloc_get_type_abort(li->app_io_instance, proto_vmps_udp_t); int sockfd = 0; uint16_t port = inst->port; @@ -371,9 +371,9 @@ static int mod_open(fr_listen_t *listen) /** Get the file descriptor for this socket. * */ -static int mod_fd(fr_listen_t const *listen) +static int mod_fd(fr_listen_t const *li) { - proto_vmps_udp_t const *inst = talloc_get_type_abort_const(listen->thread_instance, proto_vmps_udp_t); + proto_vmps_udp_t const *inst = talloc_get_type_abort_const(li->thread_instance, proto_vmps_udp_t); return inst->sockfd; } @@ -381,9 +381,9 @@ static int mod_fd(fr_listen_t const *listen) /** Set the file descriptor for this socket. * */ -static int mod_fd_set(fr_listen_t *listen, int fd) +static int mod_fd_set(fr_listen_t *li, int fd) { - proto_vmps_udp_t *inst = talloc_get_type_abort(listen->thread_instance, proto_vmps_udp_t); + proto_vmps_udp_t *inst = talloc_get_type_abort(li->thread_instance, proto_vmps_udp_t); inst->sockfd = fd; -- 2.47.3