Mercurial > dovecot > original-hg > dovecot-1.2
diff src/auth/db-ldap.c @ 3657:0c10475d9968 HEAD
Separated passdb_module's interface and the actual data struct. Now it's
possible to have multiple passdbs of same type but with different settings.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 16 Oct 2005 17:06:59 +0300 |
parents | 5e78500f1aee |
children | 0a7beabfe332 |
line wrap: on
line diff
--- a/src/auth/db-ldap.c Sun Oct 16 15:49:14 2005 +0300 +++ b/src/auth/db-ldap.c Sun Oct 16 17:06:59 2005 +0300 @@ -413,9 +413,18 @@ void db_ldap_unref(struct ldap_connection *conn) { + struct ldap_connection **p; + + i_assert(conn->refcount >= 0); if (--conn->refcount > 0) return; - i_assert(conn->refcount == 0); + + for (p = &ldap_connections; *p != NULL; p = &(*p)->next) { + if (*p == conn) { + *p = conn->next; + break; + } + } ldap_conn_close(conn);