svn commit: samba r18908 - in
branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
idra at samba.org
idra at samba.org
Mon Sep 25 22:53:04 GMT 2006
Author: idra
Date: 2006-09-25 22:53:03 +0000 (Mon, 25 Sep 2006)
New Revision: 18908
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18908
Log:
Store the schema structure into an opaque pointer so that it can be reused by multiple connections
Modified:
branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema.c
Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema.c 2006-09-25 20:59:48 UTC (rev 18907)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema.c 2006-09-25 22:53:03 UTC (rev 18908)
@@ -496,8 +496,8 @@
data->class[i]->defobjcat = talloc_strdup(data->class[i],
ldb_msg_find_attr_as_string(res->msgs[i],
"defaultObjectCategory", NULL));
- SCHEMA_CHECK_VALUE(data->class[i]->defobjcat, NULL, module);
-
+/* SCHEMA_CHECK_VALUE(data->class[i]->defobjcat, NULL, module);
+*/
/* the following attributes are all optional */
data->class[i]->systemOnly = ldb_msg_find_attr_as_bool(res->msgs[i], "systemOnly", False);
@@ -1028,9 +1028,9 @@
if (!temp->next) break;
if (temp->next->role != SCHEMA_CT_STRUCTURAL) break;
}
- oc = talloc_strdup(msg, temp->class->defobjcat);
+/* oc = talloc_strdup(msg, temp->class->defobjcat);
ret = ldb_msg_add_string(msg, "objectCategory", oc);
-
+*/
sctx->down_req->op.add.message = msg;
return LDB_SUCCESS;
@@ -1250,13 +1250,19 @@
struct ldb_result *res;
int ret;
- /* need to let the partiorion module to register first */
+ /* need to let the partition module to register first */
ret = ldb_next_init(module);
if (ret != LDB_SUCCESS) {
return ret;
}
- data = talloc_zero(module, struct schema_private_data);
+ data = ldb_get_opaque(module->ldb, "schema_instance");
+ if (data) {
+ module->private_data = data;
+ return LDB_SUCCESS;
+ }
+
+ data = talloc_zero(module->ldb, struct schema_private_data);
if (data == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -1299,6 +1305,8 @@
}
module->private_data = data;
+ ldb_set_opaque(module->ldb, "schema_instance", data);
+
return LDB_SUCCESS;
}
More information about the samba-cvs
mailing list