]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/add.c
Add trickle-sync for quick mode
[openldap] / servers / slapd / add.c
index db9b809752342a1baf28f6fe5afdf6c8dadb1d6d..02b721f3257dd3e50eeaafcd46af698499e6b2b3 100644 (file)
@@ -290,7 +290,6 @@ fe_op_add( Operation *op, SlapReply *rs )
                int repl_user = be_isupdate( op );
                if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user ) {
                        int             update = !BER_BVISEMPTY( &op->o_bd->be_update_ndn );
-                       slap_callback   cb = { NULL, slap_replog_cb, NULL, NULL };
 
                        op->o_bd = op_be;
 
@@ -322,9 +321,6 @@ fe_op_add( Operation *op, SlapReply *rs )
                                        send_ldap_result( op, rs );
                                        goto done;
                                }
-
-                               cb.sc_next = op->o_callback;
-                               op->o_callback = &cb;
                        }
 
                        rc = op->o_bd->be_add( op, rs );
@@ -608,10 +604,9 @@ int slap_add_opattrs(
                }
                ptr = ber_bvchr( &csn, '#' );
                if ( ptr ) {
-                       timestamp.bv_len = ptr - csn.bv_val;
-                       if ( timestamp.bv_len >= sizeof(timebuf) )      /* ?!? */
-                               timestamp.bv_len = sizeof(timebuf) - 1;
+                       timestamp.bv_len = STRLENOF("YYYYMMDDHHMMSSZ");
                        AC_MEMCPY( timebuf, csn.bv_val, timestamp.bv_len );
+                       timebuf[timestamp.bv_len-1] = 'Z';
                        timebuf[timestamp.bv_len] = '\0';
                } else {
                        time_t now = slap_get_time();