]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Event list first to match the I/O callbacks
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 18 Jul 2017 16:58:58 +0000 (12:58 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 18 Jul 2017 16:58:58 +0000 (12:58 -0400)
src/include/connection.h
src/main/connection.c
src/modules/rlm_logtee/rlm_logtee.c
src/modules/rlm_radius/rlm_radius.c
src/modules/rlm_radius/rlm_radius_udp.c

index 25e5618f30b20160a2dd6d59f9012c804dc48c1d..e44ef78151556ee0d34a989c3039beb694dce37e 100644 (file)
@@ -57,14 +57,14 @@ typedef fr_connection_state_t (*fr_connection_init_t)(int *fd_out, void *uctx);
  * This should be used to add any additional I/O events for the file descriptor
  * to call other code if it becomes readable or writable.
  *
- * @param[in] fd       That was successfully opened.
  * @param[in] el       to use for inserting I/O events.
+ * @param[in] fd       That was successfully opened.
  * @param[in] uctx     User context.
  * @return
  *     - #FR_CONNECTION_STATE_CONNECTED        if the file descriptor is useable.
  *     - #FR_CONNECTION_STATE_FAILED           if the file descriptor is unusable.
  */
-typedef fr_connection_state_t (*fr_connection_open_t)(int fd, fr_event_list_t *el, void *uctx);
+typedef fr_connection_state_t (*fr_connection_open_t)(fr_event_list_t *el, int fd, void *uctx);
 
 /** Notification that a connection attempt has failed
  *
index ae4e8eea029aa95cf6f676dec676f426131b216b..ec6aef2a3e86035359b365196bc5df350f9f75e0 100644 (file)
@@ -235,7 +235,7 @@ static void _connection_writable(UNUSED fr_event_list_t *el, UNUSED int sock, UN
        fr_event_timer_delete(conn->el, &conn->connection_timer);
        fr_event_fd_delete(conn->el, conn->fd);
 
-       ret = conn->open(conn->fd, conn->el, conn->uctx);
+       ret = conn->open(conn->el, conn->fd, conn->uctx);
        switch (ret) {
        case FR_CONNECTION_STATE_CONNECTED:
                DEBUG2("Connection established");
index 446859faf773f1e65a632b79fdbfb8ce3c30d521..6b96f89c42aa780ca6914b63e24ae50444c94f70 100644 (file)
@@ -330,7 +330,7 @@ static void _logtee_conn_close(int fd, UNUSED void *uctx)
 /** Process notification that fd is open
  *
  */
-static fr_connection_state_t _logtee_conn_open(UNUSED int fd, UNUSED fr_event_list_t *el, void *uctx)
+static fr_connection_state_t _logtee_conn_open(UNUSED fr_event_list_t *el, UNUSED int fd, void *uctx)
 {
        rlm_logtee_thread_t     *t = talloc_get_type_abort(uctx, rlm_logtee_thread_t);
 
index dbd9fed9f615eb975c6dacae735ffcb7481848ce..a19ed76b5b17d43ac8f329e05afd8bc6a6c906b0 100644 (file)
@@ -628,7 +628,7 @@ static void mod_conn_close(int fd, void *uctx)
 /** Process notification that fd is open
  *
  */
-static fr_connection_state_t mod_radius_conn_open(int fd, fr_event_list_t *el, void *uctx)
+static fr_connection_state_t mod_radius_conn_open(fr_event_list_t *el, int fd, void *uctx)
 {
        rlm_radius_connection_t *c = talloc_get_type_abort(uctx, rlm_radius_connection_t);
        rlm_radius_thread_t     *t = c->thread;
@@ -638,7 +638,7 @@ static fr_connection_state_t mod_radius_conn_open(int fd, fr_event_list_t *el, v
        /*
         *      Tell the underlying transport that it's now open.
         */
-       state = inst->client_io->open(fd, el, c->client_io_ctx);
+       state = inst->client_io->open(el, fd, c->client_io_ctx);
        if (state != FR_CONNECTION_STATE_CONNECTED) {
                return state;
        }
index 7e9d9e79c5b7a74f57178ad831f7fb3ded531b53..75b8d06cb8bcc44433d69a5a9d5e7ebfff07ad1e 100644 (file)
@@ -45,28 +45,28 @@ RCSID("$Id$")
 #include "rlm_radius.h"
 
 typedef struct rlm_radius_udp_t {
-       fr_ipaddr_t     dst_ipaddr;             //!< IP of the home server
-       fr_ipaddr_t     src_ipaddr;             //!< IP we open our socket on
-       uint16_t        dst_port;               //!< port of the home server
-       char const      *secret;                //!< shared secret
+       fr_ipaddr_t             dst_ipaddr;             //!< IP of the home server
+       fr_ipaddr_t             src_ipaddr;             //!< IP we open our socket on
+       uint16_t                dst_port;               //!< port of the home server
+       char const              *secret;                //!< shared secret
 
-       char const      *interface;             //!< Interface to bind to.
+       char const              *interface;             //!< Interface to bind to.
 
-       uint32_t        recv_buff;              //!< How big the kernel's receive buffer should be.
-       uint32_t        send_buff;              //!< How big the kernel's send buffer should be.
+       uint32_t                recv_buff;              //!< How big the kernel's receive buffer should be.
+       uint32_t                send_buff;              //!< How big the kernel's send buffer should be.
 
-       uint32_t        max_packet_size;        //!< maximum packet size
+       uint32_t                max_packet_size;        //!< maximum packet size
 
-       bool            recv_buff_is_set;       //!< Whether we were provided with a recv_buf
-       bool            send_buff_is_set;       //!< Whether we were provided with a send_buf
+       bool                    recv_buff_is_set;       //!< Whether we were provided with a recv_buf
+       bool                    send_buff_is_set;       //!< Whether we were provided with a send_buf
 
-       bool            dst_ipaddr_is_set;      //!< ipaddr config item is set.
-       bool            dst_ipv4addr_is_set;    //!< ipv4addr config item is set.
-       bool            dst_ipv6addr_is_set;    //!< ipv6addr config item is set.
+       bool                    dst_ipaddr_is_set;      //!< ipaddr config item is set.
+       bool                    dst_ipv4addr_is_set;    //!< ipv4addr config item is set.
+       bool                    dst_ipv6addr_is_set;    //!< ipv6addr config item is set.
 
-       bool            src_ipaddr_is_set;      //!< src_ipaddr config item is set.
-       bool            src_ipv4addr_is_set;    //!< src_ipv4addr config item is set.
-       bool            src_ipv6addr_is_set;    //!< src_ipv6addr config item is set.
+       bool                    src_ipaddr_is_set;      //!< src_ipaddr config item is set.
+       bool                    src_ipv4addr_is_set;    //!< src_ipv4addr config item is set.
+       bool                    src_ipv6addr_is_set;    //!< src_ipv6addr config item is set.
 
 } rlm_radius_udp_t;
 
@@ -188,7 +188,7 @@ static void mod_close(int fd, void *io_ctx)
 /** Do more setup once the connection has been opened
  *
  */
-static fr_connection_state_t mod_open(UNUSED int fd, UNUSED fr_event_list_t *el, UNUSED void *io_ctx)
+static fr_connection_state_t mod_open(UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED void *io_ctx)
 {
 //     udp_io_ctx_t_t *io = talloc_get_type_abort(io_ctx, udp_io_ctx_t);