summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-10-20 08:02:40 +1100
committerAndrew Tridgell <tridge@samba.org>2011-10-20 00:57:05 +0200
commit3712006faacbc468d7df3d577c796508e533617c (patch)
tree5c0fe3e6f1378804d299179355ceb6ee64027c92
parentce45ae122ee7f5f10c003dd5832a43fa1d65804d (diff)
downloadsamba-3712006faacbc468d7df3d577c796508e533617c.tar.gz
samba-3712006faacbc468d7df3d577c796508e533617c.tar.bz2
samba-3712006faacbc468d7df3d577c796508e533617c.zip
dsdb: improve debug message
show the reply type in "Invalid reply type" messages Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Oct 20 00:57:05 CEST 2011 on sn-devel-104
-rw-r--r--lib/ldb/common/ldb.c6
-rw-r--r--lib/ldb/ldb_map/ldb_map_inbound.c6
-rw-r--r--source4/dsdb/samdb/ldb_modules/new_partition.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c3
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_rename.c2
6 files changed, 10 insertions, 11 deletions
diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c
index cd6172a1e8..a223b87c45 100644
--- a/lib/ldb/common/ldb.c
+++ b/lib/ldb/common/ldb.c
@@ -1069,7 +1069,7 @@ int ldb_modify_default_callback(struct ldb_request *req, struct ldb_reply *ares)
return ldb_request_done(req, LDB_SUCCESS);
default:
talloc_free(ares);
- ldb_set_errstring(req->handle->ldb, "Invalid reply type!");
+ ldb_asprintf_errstring(req->handle->ldb, "Invalid LDB reply type %d", ares->type);
return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR);
}
@@ -1093,7 +1093,7 @@ int ldb_op_default_callback(struct ldb_request *req, struct ldb_reply *ares)
if (ares->type != LDB_REPLY_DONE) {
talloc_free(ares);
- ldb_set_errstring(req->handle->ldb, "Invalid reply type!");
+ ldb_asprintf_errstring(req->handle->ldb, "Invalid LDB reply type %d", ares->type);
return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR);
}
@@ -1399,7 +1399,7 @@ int ldb_extended_default_callback(struct ldb_request *req,
}
talloc_free(ares);
- ldb_set_errstring(req->handle->ldb, "Invalid reply type!");
+ ldb_asprintf_errstring(req->handle->ldb, "Invalid LDB reply type %d", ares->type);
return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR);
}
diff --git a/lib/ldb/ldb_map/ldb_map_inbound.c b/lib/ldb/ldb_map/ldb_map_inbound.c
index b61037222a..38dd5ac066 100644
--- a/lib/ldb/ldb_map/ldb_map_inbound.c
+++ b/lib/ldb/ldb_map/ldb_map_inbound.c
@@ -309,7 +309,7 @@ static int map_op_local_callback(struct ldb_request *req,
}
if (ares->type != LDB_REPLY_DONE) {
- ldb_set_errstring(ldb, "Invalid reply type!");
+ ldb_asprintf_errstring(ldb, "Invalid LDB reply type %d", ares->type);
return ldb_module_done(ac->req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
@@ -343,7 +343,7 @@ static int map_op_remote_callback(struct ldb_request *req,
}
if (ares->type != LDB_REPLY_DONE) {
- ldb_set_errstring(ldb, "Invalid reply type!");
+ ldb_asprintf_errstring(ldb, "Invalid LDB reply type %d", ares->type);
return ldb_module_done(ac->req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
@@ -802,7 +802,7 @@ static int map_rename_local_callback(struct ldb_request *req,
}
if (ares->type != LDB_REPLY_DONE) {
- ldb_set_errstring(ldb, "Invalid reply type!");
+ ldb_asprintf_errstring(ldb, "Invalid LDB reply type %d", ares->type);
return ldb_module_done(ac->req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
diff --git a/source4/dsdb/samdb/ldb_modules/new_partition.c b/source4/dsdb/samdb/ldb_modules/new_partition.c
index 3f730f97db..eaf7d43b16 100644
--- a/source4/dsdb/samdb/ldb_modules/new_partition.c
+++ b/source4/dsdb/samdb/ldb_modules/new_partition.c
@@ -65,7 +65,7 @@ static int np_part_mod_callback(struct ldb_request *req, struct ldb_reply *ares)
}
if (ares->type != LDB_REPLY_DONE) {
- ldb_set_errstring(ldb, "Invalid reply type!");
+ ldb_asprintf_errstring(ldb, "Invalid LDB reply type %d", ares->type);
return ldb_module_done(ac->req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 2be0760d14..b3126c3e88 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -3983,7 +3983,7 @@ static int replmd_replicated_uptodate_modify_callback(struct ldb_request *req,
}
if (ares->type != LDB_REPLY_DONE) {
- ldb_set_errstring(ldb, "Invalid reply type\n!");
+ ldb_asprintf_errstring(ldb, "Invalid LDB reply type %d", ares->type);
return ldb_module_done(ar->req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index e0400fa8ed..6c1452012a 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -517,8 +517,7 @@ static int samldb_add_entry_callback(struct ldb_request *req,
ares->response, ares->error);
}
if (ares->type != LDB_REPLY_DONE) {
- ldb_set_errstring(ldb,
- "Invalid reply type!\n");
+ ldb_asprintf_errstring(ldb, "Invalid LDB reply type %d", ares->type);
return ldb_module_done(ac->req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
index a4714acb61..2b13e5533d 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -95,7 +95,7 @@ static int subtree_rename_callback(struct ldb_request *req,
}
if (ares->type != LDB_REPLY_DONE) {
- ldb_set_errstring(ldb, "Invalid reply type!\n");
+ ldb_asprintf_errstring(ldb, "Invalid LDB reply type %d", ares->type);
return ldb_module_done(ac->req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}