*/
static int msg_delete_element(struct ldb_module *module,
struct ldb_message *msg,
+ const struct ldb_schema_attribute *a,
const char *name,
const struct ldb_val *val)
{
unsigned int i;
int found, ret;
struct ldb_message_element *el;
- const struct ldb_schema_attribute *a;
found = find_element(msg, name);
if (found == -1) {
i = (unsigned int) found;
el = &(msg->elements[i]);
- a = ldb_schema_attribute_by_name(ldb, el->name);
-
for (i=0;i<el->num_values;i++) {
bool matched;
if (a->syntax->operator_fn) {
for (j=0; j < msg->elements[i].num_values; j++) {
ret = msg_delete_element(module,
msg2,
+ a,
msg->elements[i].name,
&msg->elements[i].values[j]);
if (ret == LDB_ERR_NO_SUCH_ATTRIBUTE &&