diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-19 13:29:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:32 -0500 |
commit | 1601b8e9f9eecd59f82a2a18cd87438be41c611b (patch) | |
tree | 2d326b918229ad18ff4b43d7ab0c3fd53756bf23 /source4 | |
parent | 616fbc543c9262ef53fc3bb7217c9d52d9710f4b (diff) | |
download | samba-1601b8e9f9eecd59f82a2a18cd87438be41c611b.tar.gz samba-1601b8e9f9eecd59f82a2a18cd87438be41c611b.tar.bz2 samba-1601b8e9f9eecd59f82a2a18cd87438be41c611b.zip |
r7759: allow ldb_errstring() to be used when not connected
(This used to be commit 818ae965afad37216d804aa630359d875794612e)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index d2dbac95ea..450fa75d8e 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -172,6 +172,9 @@ int ldb_rename(struct ldb_context *ldb, const char *olddn, const char *newdn) */ const char *ldb_errstring(struct ldb_context *ldb) { + if (ldb->modules == NULL) { + return "ldb not connected"; + } return ldb->modules->ops->errstring(ldb->modules); } |