dsdb: improve debug message
authorAndrew Tridgell <tridge@samba.org>
Wed, 19 Oct 2011 21:02:40 +0000 (08:02 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 19 Oct 2011 22:57:05 +0000 (00:57 +0200)
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

lib/ldb/common/ldb.c
lib/ldb/ldb_map/ldb_map_inbound.c
source4/dsdb/samdb/ldb_modules/new_partition.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/samdb/ldb_modules/subtree_rename.c

index cd6172a1e851cfd3bdb2c0664b06da4184a62a87..a223b87c45e905cf311acdb497c072020a7053ef 100644 (file)
@@ -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);
 }
 
index b61037222a8f261d4a9e6faad8d0e9b18d220a50..38dd5ac066d714e2d7661af592ef64120075ff38 100644 (file)
@@ -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);
        }
index 3f730f97db598a94d8b934218e8b8b739e8b2cd8..eaf7d43b167cc33fe18284d0a97cf505bb4ee02a 100644 (file)
@@ -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);
        }
index 2be0760d14a65ce4c0d11b0120991f267678429d..b3126c3e883798a8a56f493815bd2af44a742a7d 100644 (file)
@@ -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);
        }
index e0400fa8ed8da0f2b45977aa71a104c643444077..6c1452012ac49c507aa1a35bab37e688907d6021 100644 (file)
@@ -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);
        }
index a4714acb617b9f06cd4f7596a9e92219e7be774e..2b13e5533d0c69756466ca4cadec43f8cd30191a 100644 (file)
@@ -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);
        }