s4-ldb Add LDB_REQ_SET_LOCATION to help track handler use
authorAndrew Bartlett <abartlet@samba.org>
Mon, 18 Oct 2010 11:13:20 +0000 (22:13 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 18 Oct 2010 11:54:46 +0000 (11:54 +0000)
This greatly assists in debugging what is going on with the
ldb handle, as it indicates where it was created.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Oct 18 11:54:46 UTC 2010 on sn-devel-104

source4/lib/ldb/ldb_map/ldb_map.c
source4/lib/ldb/ldb_map/ldb_map_inbound.c
source4/lib/ldb/ldb_map/ldb_map_outbound.c
source4/lib/ldb/modules/paged_searches.c

index 483222ec2044d417720879f3af08d4820fd5b2d1..61d0d4cdf363d10f2d728b8b29d0ef29a14db6fe 100644 (file)
@@ -891,6 +891,7 @@ struct ldb_request *map_search_base_req(struct map_context *ac, struct ldb_dn *d
                                        NULL,
                                        context, callback,
                                        ac->req);
+       LDB_REQ_SET_LOCATION(req);
        if (ret != LDB_SUCCESS) {
                return NULL;
        }
@@ -938,6 +939,7 @@ struct ldb_request *map_build_fixup_req(struct map_context *ac,
                                ac, msg, NULL,
                                context, callback,
                                ac->req);
+       LDB_REQ_SET_LOCATION(req);
        if (ret != LDB_SUCCESS) {
                goto failed;
        }
index cdc88afbc51615bc9c41ff24814662cc912f7179..83eec1d5558c754672c700ba5221cc022037dc4d 100644 (file)
@@ -414,6 +414,7 @@ int map_add(struct ldb_module *module, struct ldb_request *req)
                                req->controls,
                                ac, map_op_remote_callback,
                                req);
+       LDB_REQ_SET_LOCATION(ac->remote_req);
        if (ret != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
@@ -451,6 +452,7 @@ static int map_add_do_local(struct map_context *ac)
                                ac,
                                map_op_local_callback,
                                ac->req);
+       LDB_REQ_SET_LOCATION(local_req);
        if (ret != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
@@ -522,6 +524,7 @@ int map_modify(struct ldb_module *module, struct ldb_request *req)
                                req->controls,
                                ac, map_op_remote_callback,
                                req);
+       LDB_REQ_SET_LOCATION(ac->remote_req);
        if (ret != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
@@ -571,6 +574,7 @@ static int map_modify_do_local(struct map_context *ac)
                                        ac,
                                        map_op_local_callback,
                                        ac->req);
+               LDB_REQ_SET_LOCATION(local_req);
                if (ret != LDB_SUCCESS) {
                        return LDB_ERR_OPERATIONS_ERROR;
                }
@@ -582,6 +586,7 @@ static int map_modify_do_local(struct map_context *ac)
                                        ac,
                                        map_op_local_callback,
                                        ac->req);
+               LDB_REQ_SET_LOCATION(local_req);
                if (ret != LDB_SUCCESS) {
                        return LDB_ERR_OPERATIONS_ERROR;
                }
@@ -628,6 +633,7 @@ int map_delete(struct ldb_module *module, struct ldb_request *req)
                                   ac,
                                   map_op_remote_callback,
                                   req);
+       LDB_REQ_SET_LOCATION(ac->remote_req);
        if (ret != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
@@ -670,6 +676,7 @@ static int map_delete_do_local(struct map_context *ac)
                                   ac,
                                   map_op_local_callback,
                                   ac->req);
+       LDB_REQ_SET_LOCATION(local_req);
        if (ret != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
@@ -721,6 +728,7 @@ int map_rename(struct ldb_module *module, struct ldb_request *req)
                                   req->controls,
                                   ac, map_op_remote_callback,
                                   req);
+       LDB_REQ_SET_LOCATION(ac->remote_req);
        if (ret != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
@@ -764,6 +772,7 @@ static int map_rename_do_local(struct map_context *ac)
                                   ac,
                                   map_rename_local_callback,
                                   ac->req);
+       LDB_REQ_SET_LOCATION(local_req);
        if (ret != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
index 40be94c894bbfb2d881dcfde26bf6fbd6acb6ff2..ebed0d2bf943038f16fb8cf61f6e6b47922ef893 100644 (file)
@@ -1208,6 +1208,7 @@ int map_search(struct ldb_module *module, struct ldb_request *req)
                                      req->controls,
                                      ac, map_remote_search_callback,
                                      req);
+       LDB_REQ_SET_LOCATION(remote_req);
        if (ret != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
index 39780cb6994104cac5a839bd3301a1ea601eb4ce..bd2ea0942ef5d751e4c2b875a348c10a4e5d9c93 100644 (file)
@@ -270,6 +270,7 @@ static int ps_search(struct ldb_module *module, struct ldb_request *req)
                                        ac,
                                        ps_callback,
                                        ac->req);
+       LDB_REQ_SET_LOCATION(ac->down_req);
        if (ret != LDB_SUCCESS) {
                return ret;
        }
@@ -351,6 +352,7 @@ static int ps_init(struct ldb_module *module)
                                   attrs, NULL,
                                   data, check_supported_paged,
                                   NULL);
+       LDB_REQ_SET_LOCATION(req);
        if (ret != LDB_SUCCESS) {
                return ret;
        }