]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use inst->pool not inst->conn_pool
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 19 Jul 2015 05:56:25 +0000 (01:56 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 19 Jul 2015 06:00:51 +0000 (02:00 -0400)
src/modules/rlm_rest/rest.h
src/modules/rlm_rest/rlm_rest.c
src/modules/rlm_yubikey/validate.c

index 65eb85d80e1c2bc0f6d3088bf37a3caf9af3f525..e09f0193b276e44f9e23e7d2e6cdad78f99e4389 100644 (file)
@@ -153,7 +153,7 @@ typedef struct rlm_rest_t {
        struct timeval          connect_timeout_tv;     //!< Connection timeout timeval.
        long                    connect_timeout;        //!< Connection timeout ms.
 
-       fr_connection_pool_t    *conn_pool;     //!< Pointer to the connection pool.
+       fr_connection_pool_t    *pool;          //!< Pointer to the connection pool.
 
        rlm_rest_section_t      authorize;      //!< Configuration specific to authorisation.
        rlm_rest_section_t      authenticate;   //!< Configuration specific to authentication.
index c586449ca38a0f64adaee98e0649d671a3fa2a96..0ffd071bbc884623e05eb3fb1340fd9ab94494fb 100644 (file)
@@ -235,7 +235,7 @@ static ssize_t rest_xlat(void *instance, REQUEST *request,
 
        RDEBUG("Expanding URI components");
 
-       handle = fr_connection_get(inst->conn_pool);
+       handle = fr_connection_get(inst->pool);
        if (!handle) return -1;
 
        /*
@@ -336,7 +336,7 @@ error:
 finish:
        rlm_rest_cleanup(instance, &section, handle);
 
-       fr_connection_release(inst->conn_pool, handle);
+       fr_connection_release(inst->pool, handle);
 
        return outlen;
 }
@@ -359,7 +359,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, REQUEST *reque
 
        if (!section->name) return RLM_MODULE_NOOP;
 
-       handle = fr_connection_get(inst->conn_pool);
+       handle = fr_connection_get(inst->pool);
        if (!handle) return RLM_MODULE_FAIL;
 
        ret = rlm_rest_perform(instance, section, handle, request, NULL, NULL);
@@ -427,7 +427,7 @@ finish:
 
        rlm_rest_cleanup(instance, section, handle);
 
-       fr_connection_release(inst->conn_pool, handle);
+       fr_connection_release(inst->pool, handle);
 
        return rcode;
 }
@@ -464,7 +464,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, REQUEST *re
                return RLM_MODULE_INVALID;
        }
 
-       handle = fr_connection_get(inst->conn_pool);
+       handle = fr_connection_get(inst->pool);
        if (!handle) return RLM_MODULE_FAIL;
 
        ret = rlm_rest_perform(instance, section, handle, request, username->vp_strvalue, password->vp_strvalue);
@@ -532,7 +532,7 @@ finish:
 
        rlm_rest_cleanup(instance, section, handle);
 
-       fr_connection_release(inst->conn_pool, handle);
+       fr_connection_release(inst->pool, handle);
 
        return rcode;
 }
@@ -552,7 +552,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, REQUEST *requ
 
        if (!section->name) return RLM_MODULE_NOOP;
 
-       handle = fr_connection_get(inst->conn_pool);
+       handle = fr_connection_get(inst->pool);
        if (!handle) return RLM_MODULE_FAIL;
 
        ret = rlm_rest_perform(inst, section, handle, request, NULL, NULL);
@@ -588,7 +588,7 @@ finish:
 
        rlm_rest_cleanup(inst, section, handle);
 
-       fr_connection_release(inst->conn_pool, handle);
+       fr_connection_release(inst->pool, handle);
 
        return rcode;
 }
@@ -608,7 +608,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, REQUEST *reque
 
        if (!section->name) return RLM_MODULE_NOOP;
 
-       handle = fr_connection_get(inst->conn_pool);
+       handle = fr_connection_get(inst->pool);
        if (!handle) return RLM_MODULE_FAIL;
 
        ret = rlm_rest_perform(inst, section, handle, request, NULL, NULL);
@@ -644,7 +644,7 @@ finish:
 
        rlm_rest_cleanup(inst, section, handle);
 
-       fr_connection_release(inst->conn_pool, handle);
+       fr_connection_release(inst->pool, handle);
 
        return rcode;
 }
@@ -837,8 +837,8 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
 
        inst->connect_timeout = ((inst->connect_timeout_tv.tv_usec * 1000) +
                                 (inst->connect_timeout_tv.tv_sec / 1000));
-       inst->conn_pool = fr_connection_pool_module_init(conf, inst, mod_conn_create, mod_conn_alive, NULL);
-       if (!inst->conn_pool) return -1;
+       inst->pool = fr_connection_pool_module_init(conf, inst, mod_conn_create, mod_conn_alive, NULL);
+       if (!inst->pool) return -1;
 
        return 0;
 }
@@ -851,7 +851,7 @@ static int mod_detach(void *instance)
 {
        rlm_rest_t *inst = instance;
 
-       fr_connection_pool_free(inst->conn_pool);
+       fr_connection_pool_free(inst->pool);
 
        /* Free any memory used by libcurl */
        rest_cleanup();
index d6ebd835fb25fddd8f511706acd070fcd3617c03..7dc13d888aca10a83e9d8c455a1dd5c90ede433f 100644 (file)
@@ -132,8 +132,8 @@ init:
        }
 
        snprintf(prefix, sizeof(prefix), "rlm_yubikey (%s)", inst->name);
-       inst->conn_pool = fr_connection_pool_module_init(conf, inst, mod_conn_create, NULL, prefix);
-       if (!inst->conn_pool) {
+       inst->pool = fr_connection_pool_module_init(conf, inst, mod_conn_create, NULL, prefix);
+       if (!inst->pool) {
                ykclient_done(&inst->ykc);
 
                return -1;
@@ -144,7 +144,7 @@ init:
 
 int rlm_yubikey_ykclient_detach(rlm_yubikey_t *inst)
 {
-       fr_connection_pool_free(inst->conn_pool);
+       fr_connection_pool_free(inst->pool);
        ykclient_done(&inst->ykc);
        ykclient_global_done();
 
@@ -157,7 +157,7 @@ rlm_rcode_t rlm_yubikey_validate(rlm_yubikey_t *inst, REQUEST *request,  char co
        ykclient_rc status;
        ykclient_handle_t *yandle;
 
-       yandle = fr_connection_get(inst->conn_pool);
+       yandle = fr_connection_get(inst->pool);
        if (!yandle) return RLM_MODULE_FAIL;
 
        /*
@@ -194,7 +194,7 @@ rlm_rcode_t rlm_yubikey_validate(rlm_yubikey_t *inst, REQUEST *request,  char co
                }
        }
 
-       fr_connection_release(inst->conn_pool, yandle);
+       fr_connection_release(inst->pool, yandle);
 
        return rcode;
 }