Minor connection API fixes
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 24 Jun 2014 10:11:55 +0000 (11:11 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 24 Jun 2014 10:12:00 +0000 (11:12 +0100)
src/include/connection.h
src/modules/rlm_ldap/ldap.c
src/modules/rlm_yubikey/validate.c

index 0e68f42..4d6b884 100644 (file)
@@ -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.
index 6fe2473..19f8591 100644 (file)
@@ -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;
 }
index 2d2d648..9486f96 100644 (file)
@@ -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