[dovecot-cvs] dovecot/src/auth db-ldap.c,1.59,1.60
tss at dovecot.org
tss at dovecot.org
Tue Jan 16 13:25:43 UTC 2007
- Previous message: [dovecot-cvs] dovecot/src/auth auth-cache.c, 1.17.2.3, 1.17.2.4 auth-request.c, 1.58.2.16, 1.58.2.17 auth-request.h, 1.27.2.2, 1.27.2.3 userdb-ldap.c, 1.40.2.3, 1.40.2.4 userdb-passwd-file.c, 1.22.2.1, 1.22.2.2 userdb-passwd.c, 1.18.2.1, 1.18.2.2 userdb-sql.c, 1.14.2.3, 1.14.2.4 userdb-vpopmail.c, 1.21.2.1, 1.21.2.2 userdb.h, 1.25.2.1, 1.25.2.2
- Next message: [dovecot-cvs] dovecot/src/auth db-ldap.c,1.41.2.15,1.41.2.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv18960
Modified Files:
db-ldap.c
Log Message:
Last change for making ldap_bind() error handling better was actually
broken.
Index: db-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/db-ldap.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- db-ldap.c 9 Jan 2007 11:40:07 -0000 1.59
+++ db-ldap.c 16 Jan 2007 13:25:40 -0000 1.60
@@ -127,7 +127,7 @@
i_fatal("LDAP: Unknown scope option '%s'", str);
}
-const char *ldap_get_error(struct ldap_connection *conn)
+static int ldap_get_errno(struct ldap_connection *conn)
{
int ret, err;
@@ -135,10 +135,15 @@
if (ret != LDAP_SUCCESS) {
i_error("LDAP: Can't get error number: %s",
ldap_err2string(ret));
- return "??";
+ return -1;
}
- return ldap_err2string(err);
+ return err;
+}
+
+const char *ldap_get_error(struct ldap_connection *conn)
+{
+ return ldap_err2string(ldap_get_errno(conn));
}
void db_ldap_add_delayed_request(struct ldap_connection *conn,
@@ -410,7 +415,7 @@
msgid = ldap_bind(conn->ld, conn->set.dn, conn->set.dnpass,
LDAP_AUTH_SIMPLE);
if (msgid == -1) {
- db_ldap_connect_finish(conn, ldap_get_error(conn));
+ db_ldap_connect_finish(conn, ldap_get_errno(conn));
i_free(ldap_request);
return -1;
}
- Previous message: [dovecot-cvs] dovecot/src/auth auth-cache.c, 1.17.2.3, 1.17.2.4 auth-request.c, 1.58.2.16, 1.58.2.17 auth-request.h, 1.27.2.2, 1.27.2.3 userdb-ldap.c, 1.40.2.3, 1.40.2.4 userdb-passwd-file.c, 1.22.2.1, 1.22.2.2 userdb-passwd.c, 1.18.2.1, 1.18.2.2 userdb-sql.c, 1.14.2.3, 1.14.2.4 userdb-vpopmail.c, 1.21.2.1, 1.21.2.2 userdb.h, 1.25.2.1, 1.25.2.2
- Next message: [dovecot-cvs] dovecot/src/auth db-ldap.c,1.41.2.15,1.41.2.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list