s4:partition LDB module - extended operations - make the initialisation check consistent
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 6 Mar 2011 14:56:48 +0000 (15:56 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 10 Mar 2011 10:12:05 +0000 (11:12 +0100)
To the other operations.

source4/dsdb/samdb/ldb_modules/partition.c

index 1760fd7510d68625f4e452540df5c33ff98b3294..f75085e8a2f3d8aed9afe1e15427da811012f8fc 100644 (file)
@@ -1160,15 +1160,17 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque
 /* extended */
 static int partition_extended(struct ldb_module *module, struct ldb_request *req)
 {
-       struct partition_private_data *data;
+       struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
+                                                             struct partition_private_data);
        struct partition_context *ac;
        int ret;
 
-       data = talloc_get_type(ldb_module_get_private(module), struct partition_private_data);
+       /* if we aren't initialised yet go further */
        if (!data) {
                return ldb_next_request(module, req);
        }
 
+       /* see if we are still up-to-date */
        ret = partition_reload_if_required(module, data, req);
        if (ret != LDB_SUCCESS) {
                return ret;