[libgda] Ldap provider: set error in gda_ldap_rebind()
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Ldap provider: set error in gda_ldap_rebind()
- Date: Sat, 28 Apr 2012 17:28:40 +0000 (UTC)
commit 87513044c620e4b68ee6907e0386545773c2babb
Author: Vivien Malerba <malerba gnome-db org>
Date: Sat Apr 28 19:18:37 2012 +0200
Ldap provider: set error in gda_ldap_rebind()
providers/ldap/gda-ldap-provider.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/providers/ldap/gda-ldap-provider.c b/providers/ldap/gda-ldap-provider.c
index fe8c09c..811d112 100644
--- a/providers/ldap/gda-ldap-provider.c
+++ b/providers/ldap/gda-ldap-provider.c
@@ -680,6 +680,8 @@ gda_ldap_rebind (LdapConnectionData *cdata, GError **error)
int limit = cdata->time_limit;
res = ldap_set_option (cdata->handle, LDAP_OPT_TIMELIMIT, &limit);
if (res != LDAP_SUCCESS) {
+ g_set_error (error, GDA_CONNECTION_ERROR, GDA_CONNECTION_OPEN_ERROR,
+ "%s", ldap_err2string (res));
ldap_unbind_ext (ld, NULL, NULL);
return FALSE;
}
@@ -688,6 +690,8 @@ gda_ldap_rebind (LdapConnectionData *cdata, GError **error)
limit = cdata->size_limit;
res = ldap_set_option (cdata->handle, LDAP_OPT_SIZELIMIT, &limit);
if (res != LDAP_SUCCESS) {
+ g_set_error (error, GDA_CONNECTION_ERROR, GDA_CONNECTION_OPEN_ERROR,
+ "%s", ldap_err2string (res));
ldap_unbind_ext (ld, NULL, NULL);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]