]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rename variable "listen" to "li"
authorAlan T. DeKok <aland@freeradius.org>
Thu, 20 Sep 2018 16:27:56 +0000 (12:27 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 20 Sep 2018 17:06:00 +0000 (13:06 -0400)
so that it doesn't conflict with the function listen()

12 files changed:
src/lib/io/base.h
src/lib/io/master.c
src/modules/proto_control/proto_control_tcp.c
src/modules/proto_control/proto_control_unix.c
src/modules/proto_detail/proto_detail.c
src/modules/proto_detail/proto_detail_file.c
src/modules/proto_detail/proto_detail_work.c
src/modules/proto_dhcpv4/proto_dhcpv4_udp.c
src/modules/proto_ldap_sync/proto_ldap_sync.c
src/modules/proto_radius/proto_radius_tcp.c
src/modules/proto_radius/proto_radius_udp.c
src/modules/proto_vmps/proto_vmps_udp.c

index ad298418ccce33a9785105d267503102b4599698..59274a00736b354ce3b96099f28e07cc19b053fa 100644 (file)
@@ -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.
  *
index 56065ad33b194d49470f8e9dd4bf6ed6bb8d7e1a..177ff1898cb3e224bbd0385a3f11de95ccc0fcb7 100644 (file)
@@ -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;
        }
 
index 37d0eecc0a17eab41e4873726c5c1b42a6621295..b479626dd983776807eca1945ac667ba36fdf88e 100644 (file)
@@ -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;
 
index 69238316ccd8f7182ed1549832c47cd40a4e5f28..7e6c72703b81e6b0f3027081691ce23ead2e2d22 100644 (file)
@@ -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
index 4be474ef57f69985280e5b7fe391e4e260006f7f..d82323e7b74f1f84fbd8a61d964432e7b741d890 100644 (file)
@@ -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;
index 871d2ecf2175cf9835401890e45d1236a10ac6d7..375b0a358baf1ad24dde73276d703700b7addf5d 100644 (file)
@@ -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;
        }
 
index 2fa4bce4c98ddcd3683933e5035f41d4fe48c6dc..9b2fc6b6ca24325137ef56f8ac6ba1d0bd85fa73 100644 (file)
@@ -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;
 }
index 6539f6433156d9dea1a6e109bbfdc9bc5abc3174..4a410ffd587680c55ad7945c121adeec507e938b 100644 (file)
@@ -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;
 
index d532ac9c913195353d5184740143af4cc14467c3..fabf0f4d1fa1864dac8d6344b587938b8bf4b4c5 100644 (file)
@@ -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)
 {
index 701212da76270282fc73e30294fe79d9eb772a63..1499358e0085a9c8dede296f60b84f205e3081a4 100644 (file)
@@ -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;
 
index c3a5993ba6300f7e0abc613e435a4220ef11800f..743b0efdadaba47346972e653b7cb460b6322cfc 100644 (file)
@@ -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;
 
index 7b7d56788b5bc7a7864c54316edfaeecbd3dc83e..6e17f26e6e53602bce776d539169c351c77af920 100644 (file)
@@ -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;