From: Arran Cudbard-Bell Date: Sun, 19 Jul 2015 05:56:25 +0000 (-0400) Subject: Use inst->pool not inst->conn_pool X-Git-Tag: release_3_0_10~321 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb88ece5fda319d4e1babb1c10c774620fbc18e6;p=thirdparty%2Ffreeradius-server.git Use inst->pool not inst->conn_pool --- diff --git a/src/modules/rlm_rest/rest.h b/src/modules/rlm_rest/rest.h index 65eb85d80e1..e09f0193b27 100644 --- a/src/modules/rlm_rest/rest.h +++ b/src/modules/rlm_rest/rest.h @@ -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. diff --git a/src/modules/rlm_rest/rlm_rest.c b/src/modules/rlm_rest/rlm_rest.c index c586449ca38..0ffd071bbc8 100644 --- a/src/modules/rlm_rest/rlm_rest.c +++ b/src/modules/rlm_rest/rlm_rest.c @@ -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, §ion, 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(); diff --git a/src/modules/rlm_yubikey/validate.c b/src/modules/rlm_yubikey/validate.c index d6ebd835fb2..7dc13d888ac 100644 --- a/src/modules/rlm_yubikey/validate.c +++ b/src/modules/rlm_yubikey/validate.c @@ -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; }