LDB:sample_module.c - remove code parts which generate warnings
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 6 Apr 2010 12:09:38 +0000 (14:09 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 6 Apr 2010 12:54:10 +0000 (14:54 +0200)
Btw: The use of the "ldb_msg_add_fmt" operation directly on the request message
object is strongly discouraged. Better is to make a shallow copy of this message
and attach it to a new child request which is handled by the following modules.

source4/lib/ldb/tests/sample_module.c

index bb7906e7ba0219183fb747e17c142cd24a66142e..f48a1ee53fc5933a744ab20ff53047aec7e135b6 100644 (file)
@@ -26,9 +26,6 @@
 int sample_add(struct ldb_module *mod, struct ldb_request *req)
 {
        struct ldb_control *control;
-       struct ldb_control *controls;
-       ldb_msg_add_fmt(req->op.add.message, "touchedBy", "sample");
-
 
        /* check if there's a relax control */
        control = ldb_request_get_control(req, LDB_CONTROL_RELAX_OID);
@@ -43,7 +40,6 @@ int sample_add(struct ldb_module *mod, struct ldb_request *req)
 int sample_modify(struct ldb_module *mod, struct ldb_request *req)
 {
        struct ldb_control *control;
-       struct ldb_control *controls;
 
        /* check if there's a relax control */
        control = ldb_request_get_control(req, LDB_CONTROL_RELAX_OID);