]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/add.c
Fallout from ITS#4986 - remove unused param of select_backend()
[openldap] / servers / slapd / add.c
index 3fb10969e14f83b2f394619486c3870a44c4dd8d..3cbd561efeed71c5d3ad75adce22da97cc61bbe2 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -220,21 +220,18 @@ done:;
 int
 fe_op_add( Operation *op, SlapReply *rs )
 {
-       int             manageDSAit;
        Modifications   **modtail = &op->ora_modlist;
        int             rc = 0;
        BackendDB       *op_be, *bd = op->o_bd;
        char            textbuf[ SLAP_TEXT_BUFLEN ];
        size_t          textlen = sizeof( textbuf );
 
-       manageDSAit = get_manageDSAit( op );
-
        /*
         * We could be serving multiple database backends.  Select the
         * appropriate one, or send a referral to our "referral server"
         * if we don't hold it.
         */
-       op->o_bd = select_backend( &op->ora_e->e_nname, manageDSAit, 1 );
+       op->o_bd = select_backend( &op->ora_e->e_nname, 1 );
        if ( op->o_bd == NULL ) {
                op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
@@ -257,7 +254,7 @@ fe_op_add( Operation *op, SlapReply *rs )
        /* If we've got a glued backend, check the real backend */
        op_be = op->o_bd;
        if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
-               op->o_bd = select_backend( &op->ora_e->e_nname, manageDSAit, 0 );
+               op->o_bd = select_backend( &op->ora_e->e_nname, 0 );
        }
 
        /* check restrictions */
@@ -290,7 +287,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 +318,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 +601,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();