Author: mkhl Date: 2006-07-23 21:27:44 +0000 (Sun, 23 Jul 2006) New Revision: 17211
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17211 Log: More const declarations for map_context structures. Martin Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map.c Changeset: Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map.c =================================================================== --- branches/SOC/mkhl/ldb-map/modules/ldb_map.c 2006-07-23 20:04:42 UTC (rev 17210) +++ branches/SOC/mkhl/ldb-map/modules/ldb_map.c 2006-07-23 21:27:44 UTC (rev 17211) @@ -237,7 +237,7 @@ ldb_next_remote_request(struct ldb_module *module, struct ldb_request *request) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); struct ldb_message *msg; switch (request->operation) { @@ -281,7 +281,7 @@ /* Find an objectClass by the local name. */ static const struct ldb_map_objectclass * -find_local_oc(struct ldb_map_context *data, +find_local_oc(const struct ldb_map_context *data, const char *name) { int i; @@ -296,7 +296,7 @@ static const struct ldb_map_objectclass * -find_remote_oc(struct ldb_map_context *data, +find_remote_oc(const struct ldb_map_context *data, const char *name) { int i; @@ -312,7 +312,7 @@ /* Find an attribute by the local name. */ static const struct ldb_map_attribute * -find_local_attr(struct ldb_map_context *data, +find_local_attr(const struct ldb_map_context *data, const char *name) { int i; @@ -328,7 +328,7 @@ /* Find an attribute by the remote name. */ static const struct ldb_map_attribute * -find_remote_attr(struct ldb_map_context *data, +find_remote_attr(const struct ldb_map_context *data, const char *name) { int i, j; @@ -369,7 +369,7 @@ check_dn_local(struct ldb_module *module, const struct ldb_dn *dn) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); return ldb_dn_compare_base(module->ldb, data->local_base_dn, dn) == 0; } @@ -377,7 +377,7 @@ /* True if attr has an associated mapping that does not ignore it */ static BOOL -check_attr_mapped(struct ldb_map_context *data, +check_attr_mapped(const struct ldb_map_context *data, const char* attr) { const struct ldb_map_attribute *map; @@ -396,7 +396,7 @@ check_attrs_mapped(struct ldb_module *module, const char * const *attrs) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); BOOL ret; int i; @@ -415,7 +415,7 @@ check_msg_mapped(struct ldb_module *module, const struct ldb_message *msg) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); BOOL ret; int i; @@ -435,7 +435,7 @@ const struct ldb_message *msg, const char *attr) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); const struct ldb_map_attribute *map; map = find_remote_attr(data, attr); @@ -459,7 +459,7 @@ void *mem_ctx, const char * const *attrs) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); const char **result; int i, last; @@ -501,7 +501,7 @@ void *mem_ctx, const char * const *attrs) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); const struct ldb_map_attribute *map; const char *name; const char **result; @@ -578,7 +578,7 @@ void *mem_ctx, const struct ldb_message *msg) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); const struct ldb_map_attribute *map; const char **result; int i, j, last; @@ -665,7 +665,7 @@ const struct ldb_message *msg, const char *name) { - struct ldb_map_context *map = map_get_context(module); + const struct ldb_map_context *map = map_get_context(module); const struct ldb_message_element *oc; const struct ldb_map_objectclass *class; int i, j; @@ -794,7 +794,7 @@ void *mem_ctx, const struct ldb_dn *dn) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); struct ldb_dn *newdn; const struct ldb_map_attribute *map; enum ldb_map_attr_type map_type; @@ -873,7 +873,7 @@ void *mem_ctx, const struct ldb_dn *dn) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); struct ldb_dn *newdn; const struct ldb_map_attribute *map; enum ldb_map_attr_type map_type; @@ -998,7 +998,7 @@ void *mem_ctx, const struct ldb_val *val) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); struct ldb_val newval; const struct ldb_map_objectclass *map; const char *name; @@ -1025,7 +1025,7 @@ void *mem_ctx, const struct ldb_val *val) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); struct ldb_val newval; const struct ldb_map_objectclass *map; const char *name; @@ -1175,7 +1175,7 @@ struct ldb_parse_tree **new, const struct ldb_parse_tree *tree) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); if (tree == NULL) return LDB_SUCCESS; @@ -1634,7 +1634,7 @@ struct ldb_message *remote, const struct ldb_message *msg) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); /* names of remote attributes the original message can map */ /* const char * const names[]; */ const struct ldb_map_attribute *map; @@ -1770,7 +1770,7 @@ struct ldb_message *local, struct ldb_message *remote) { - struct ldb_map_context *data = map_get_context(module); + const struct ldb_map_context *data = map_get_context(module); const struct ldb_map_attribute *map; int i, ret;