in the entry in the slapd DB, a replace will be done with an empty list of
values).
- Once a modify takes place, the addpartial overlay will write changes to the
- replog (using the slap_replog_cb). If you are using syncrepl for
- replication, the syncprov overlay will properly process the change, provided
- that addpartial is the first overlay to run. Please see the CAVEATS for
- more specifics about this.
+ Once a modify takes place, the syncprov overlay will properly process the
+ change, provided that addpartial is the first overlay to run. Please see
+ the CAVEATS for more specifics about this.
The addpartial overlay makes it easy to replicate full entries to a slapd
instance without worrying about the differences between entries or even if
/**
- * $Id: addpartial-overlay.c 5376 2007-01-26 20:03:13Z dhawes $
+ * $Id: addpartial-overlay.c 6588 2007-11-07 18:29:25Z dhawes $
*
* Copyright (C) 2004 Virginia Tech, David Hawes.
* All rights reserved.
*
* Author: David H. Hawes, Jr.
* Email: dhawes@vt.edu
- * Version: $Revision: 5376 $
- * Updated: $Date: 2007-01-26 15:03:13 -0500 (Fri, 26 Jan 2007) $
+ * Version: $Revision: 6588 $
+ * Updated: $Date: 2007-11-07 13:29:25 -0500 (Wed, 07 Nov 2007) $
*
* addpartial-overlay
*
*/
#include "portable.h"
-#include <stdio.h>
-#include <ac/string.h>
-#include <ac/socket.h>
#include "slap.h"
-#include <unistd.h>
-#include <lutil.h>
static int addpartial_search_cb( Operation *op, SlapReply *rs);
static int collect_error_msg_cb( Operation *op, SlapReply *rs);
mod->sml_type.bv_len = strlen(mod->sml_type.bv_val);
mod->sml_values = attr->a_vals;
mod->sml_nvalues = attr->a_nvals;
+ mod->sml_numvals = attr->a_numvals;
*modtail = mod;
modtail = &mod->sml_next;
}
mod->sml_type.bv_len = strlen(mod->sml_type.bv_val);
mod->sml_values = attr->a_vals;
mod->sml_nvalues = attr->a_nvals;
+ mod->sml_numvals = attr->a_numvals;
*modtail = mod;
modtail = &mod->sml_next;
continue;
mod->sml_type.bv_len = strlen(mod->sml_type.bv_val);
mod->sml_values = attr->a_vals;
mod->sml_nvalues = attr->a_nvals;
+ mod->sml_numvals = attr->a_numvals;
*modtail = mod;
modtail = &mod->sml_next;
break;
mod->sml_type.bv_len = strlen(mod->sml_type.bv_val);
mod->sml_values = NULL;
mod->sml_nvalues = NULL;
+ mod->sml_numvals = 0;
*modtail = mod;
modtail = &mod->sml_next;
}
{
Modifications *m = NULL;
int modcount;
- slap_callback cb2 = { NULL, slap_replog_cb, NULL, NULL };
slap_callback nullcb = { NULL, collect_error_msg_cb,
NULL, NULL };
char textbuf[SLAP_TEXT_BUFLEN];
nop.o_tag = LDAP_REQ_MODIFY;
nop.orm_modlist = mods;
- cb2.sc_next = &nullcb;
- nop.o_callback = &cb2;
+ nop.o_callback = &nullcb;
nop.o_bd->bd_info = (BackendInfo *) on->on_info;
for(m = mods, modcount = 0; m; m = m->sml_next,
addpartial.on_bi.bi_type, 0, 0);
}
- if(found != NULL) ;
+ if(found != NULL)
entry_free(found);
}
else