diff options
author | Simo Sorce <idra@samba.org> | 2006-08-13 07:33:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:15:31 -0500 |
commit | faed8175063b16df94d5332581baf1af0562bb09 (patch) | |
tree | eb7c5b5fee25bf0e004f76ba40dad3785ef3ef9f /source4/nbt_server | |
parent | a9ad616a6820cb98f85e2543f65a2b711e080da7 (diff) | |
download | samba-faed8175063b16df94d5332581baf1af0562bb09.tar.gz samba-faed8175063b16df94d5332581baf1af0562bb09.tar.bz2 samba-faed8175063b16df94d5332581baf1af0562bb09.zip |
r17514: Simplify the way to set ldb errors and add another
helper function to set them.
(This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r-- | source4/nbt_server/wins/wins_ldb.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/nbt_server/wins/wins_ldb.c b/source4/nbt_server/wins/wins_ldb.c index c70bf652b7..5bd1783c69 100644 --- a/source4/nbt_server/wins/wins_ldb.c +++ b/source4/nbt_server/wins/wins_ldb.c @@ -42,7 +42,6 @@ static int wins_ldb_verify(struct ldb_module *module, struct ldb_request *req) struct winsdb_handle *h = talloc_get_type(ldb_get_opaque(module->ldb, "winsdb_handle"), struct winsdb_handle); const struct ldb_message *msg; - char *error = NULL; switch (req->operation) { case LDB_ADD: @@ -63,9 +62,7 @@ static int wins_ldb_verify(struct ldb_module *module, struct ldb_request *req) } if (!h) { - error = talloc_strdup(module, "WINS_LDB: INTERNAL ERROR: no winsdb_handle present!"); - ldb_debug(module->ldb, LDB_DEBUG_FATAL, "%s", error); - ldb_set_errstring(module->ldb, error); + ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, "%s", "WINS_LDB: INTERNAL ERROR: no winsdb_handle present!"); return LDB_ERR_OTHER; } @@ -76,8 +73,7 @@ static int wins_ldb_verify(struct ldb_module *module, struct ldb_request *req) return ldb_next_request(module, req); case WINSDB_HANDLE_CALLER_ADMIN: - error = talloc_strdup(module, "WINS_LDB: TODO verify add/modify for WINSDB_HANDLE_CALLER_ADMIN"); - ldb_debug(module->ldb, LDB_DEBUG_WARNING, "%s\n", error); + ldb_debug(module->ldb, LDB_DEBUG_WARNING, "%s\n", "WINS_LDB: TODO verify add/modify for WINSDB_HANDLE_CALLER_ADMIN"); return ldb_next_request(module, req); } |