svn commit: samba r7726 - in branches/SAMBA_4_0/source: ldap_server
lib/ldb/ldb_ildap lib/ldb/tools
tridge at samba.org
tridge at samba.org
Sat Jun 18 13:18:44 GMT 2005
Author: tridge
Date: 2005-06-18 13:18:43 +0000 (Sat, 18 Jun 2005)
New Revision: 7726
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7726
Log:
- removed some unused variables
- handle ldb_errstring() calls on failed connect
Modified:
branches/SAMBA_4_0/source/ldap_server/ldap_rootdse.c
branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
branches/SAMBA_4_0/source/lib/ldb/tools/ldbmodify.c
branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c
Changeset:
Modified: branches/SAMBA_4_0/source/ldap_server/ldap_rootdse.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_rootdse.c 2005-06-18 13:15:09 UTC (rev 7725)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_rootdse.c 2005-06-18 13:18:43 UTC (rev 7726)
@@ -270,7 +270,7 @@
struct ldapsrv_reply *ent_r, *done_r;
struct ldb_context *ldb;
const char *errstr = NULL;
- int count, j, y;
+ int count, j;
const char **attrs = NULL;
if (r->scope != LDAP_SEARCH_SCOPE_BASE) {
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2005-06-18 13:15:09 UTC (rev 7725)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2005-06-18 13:18:43 UTC (rev 7726)
@@ -340,7 +340,11 @@
*/
static const char *ildb_errstring(struct ldb_module *module)
{
- struct ildb_private *ildb = module->private_data;
+ struct ildb_private *ildb = talloc_get_type(module->private_data,
+ struct ildb_private);
+ if (ildb == NULL) {
+ return "ildap not connected";
+ }
return ldap_errstr(ildb->ldap, ildb->last_rc);
}
@@ -427,6 +431,9 @@
return 0;
failed:
+ if (ldb->modules) {
+ ldb->modules->private_data = NULL;
+ }
talloc_free(ildb);
return -1;
}
Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbmodify.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/ldbmodify.c 2005-06-18 13:15:09 UTC (rev 7725)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/ldbmodify.c 2005-06-18 13:18:43 UTC (rev 7726)
@@ -93,7 +93,7 @@
{
struct ldb_context *ldb;
int count=0;
- int i, ret;
+ int i;
struct ldb_cmdline *options;
ldb = ldb_init(NULL);
Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c 2005-06-18 13:15:09 UTC (rev 7725)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c 2005-06-18 13:18:43 UTC (rev 7726)
@@ -353,7 +353,6 @@
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct ldb_context *ldb;
- int ret;
ldb = ldb_init(mem_ctx);
More information about the samba-cvs
mailing list