From 12aca057fe2fc0ced97f602a9dd07665532b4cf2 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Tue, 24 Jun 2014 11:11:55 +0100 Subject: [PATCH] Minor connection API fixes --- src/include/connection.h | 4 ++-- src/modules/rlm_ldap/ldap.c | 7 ++++--- src/modules/rlm_yubikey/validate.c | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/include/connection.h b/src/include/connection.h index 0e68f42..4d6b884 100644 --- a/src/include/connection.h +++ b/src/include/connection.h @@ -46,10 +46,10 @@ typedef struct fr_connection_pool_t fr_connection_pool_t; * * There is no delete callback, so operations such as closing sockets and * freeing library connection handles should be done by a destructor attached - * to memory allocated beneath parent. + * to memory allocated beneath ctx. * * @note A function pointer matching this prototype must be passed - * to fr_connection_pool. + * to fr_connection_pool_init. * * @param[in,out] ctx to allocate memory in. * @param[in] opaque pointer passed to fr_connection_pool_init. diff --git a/src/modules/rlm_ldap/ldap.c b/src/modules/rlm_ldap/ldap.c index 6fe2473..19f8591 100644 --- a/src/modules/rlm_ldap/ldap.c +++ b/src/modules/rlm_ldap/ldap.c @@ -1098,9 +1098,10 @@ static int rlm_ldap_rebind(LDAP *handle, LDAP_CONST char *url, UNUSED ber_tag_t */ static int _mod_conn_free(ldap_handle_t *conn) { - DEBUG3("rlm_ldap: Closing libldap handle %p", conn->handle); - - if (conn->handle) ldap_unbind_s(conn->handle); + if (conn->handle) { + DEBUG3("rlm_ldap: Closing libldap handle %p", conn->handle); + ldap_unbind_s(conn->handle); + } return 0; } diff --git a/src/modules/rlm_yubikey/validate.c b/src/modules/rlm_yubikey/validate.c index 2d2d648..9486f96 100644 --- a/src/modules/rlm_yubikey/validate.c +++ b/src/modules/rlm_yubikey/validate.c @@ -30,7 +30,6 @@ static int _mod_conn_free(ykclient_handle_t **yandle) * fr_connection_pool_init, and called when a new connection is required by the * connection pool API. * - * @see mod_conn_delete * @see fr_connection_pool_init * @see fr_connection_create_t * @see connection.c -- 2.1.4