Rename mod_socket_create/delete to mod_conn_create/delete
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 23 Jun 2014 12:27:30 +0000 (13:27 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 23 Jun 2014 13:54:24 +0000 (14:54 +0100)
src/modules/rlm_yubikey/validate.c

index 67b0d7d..814494e 100644 (file)
 #ifdef HAVE_YKCLIENT
 #include <freeradius-devel/connection.h>
 
+/** Frees a ykclient handle
+ *
+ * @param[in] instance configuration data.
+ * @param[in] handle rlm_yubikey_handle_t to close and free.
+ * @return returns true.
+ */
+static int mod_conn_delete(UNUSED void *instance, void *handle)
+{
+       ykclient_handle_t *yandle = handle;
+
+       ykclient_handle_done(&yandle);
+
+       return true;
+}
+
 /** Creates a new connection handle for use by the FR connection API.
  *
  * Matches the fr_connection_create_t function prototype, is passed to
@@ -27,7 +42,7 @@
  * @return connection handle or NULL if the connection failed or couldn't
  *     be initialised.
  */
-static void *mod_socket_create(void *instance)
+static void *mod_conn_create(void *instance)
 {
        rlm_yubikey_t *inst = instance;
        ykclient_rc status;
@@ -43,21 +58,6 @@ static void *mod_socket_create(void *instance)
        return yandle;
 }
 
-/** Frees a ykclient handle
- *
- * @param[in] instance configuration data.
- * @param[in] handle rlm_yubikey_handle_t to close and free.
- * @return returns true.
- */
-static int mod_socket_delete(UNUSED void *instance, void *handle)
-{
-       ykclient_handle_t *yandle = handle;
-
-       ykclient_handle_done(&yandle);
-
-       return true;
-}
-
 int rlm_yubikey_ykclient_init(CONF_SECTION *conf, rlm_yubikey_t *inst)
 {
        ykclient_rc status;
@@ -137,7 +137,7 @@ init:
        }
 
        snprintf(prefix, sizeof(prefix), "rlm_yubikey (%s)", inst->name);
-       inst->conn_pool = fr_connection_pool_init(conf, inst, mod_socket_create, NULL, mod_socket_delete, prefix);
+       inst->conn_pool = fr_connection_pool_init(conf, inst, mod_conn_create, NULL, mod_conn_delete, prefix);
        if (!inst->conn_pool) {
                ykclient_done(&inst->ykc);