/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
if ( (id2entry = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, flags ))
== NULL ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_LDBM, CRIT,
- "Could not open/create id2entry%s\n", LDBM_SUFFIX, 0, 0 );
-#else
Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry" LDBM_SUFFIX "\n",
0, 0, 0 );
-#endif
return( -1 );
}
int rc, len;
ID id;
Operation op = {0};
+ Opheader ohdr = {0};
assert( slapMode & SLAP_TOOL_MODE );
assert( id2entry != NULL );
e->e_id = li->li_nextid++;
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_LDBM, ENTRY,
- "ldbm_tool_entry_put: (%s)%ld\n", e->e_dn, e->e_id ,0 );
-#else
Debug( LDAP_DEBUG_TRACE, "=> ldbm_tool_entry_put( %ld, \"%s\" )\n",
e->e_id, e->e_dn, 0 );
-#endif
if ( dn2id( be, &e->e_nname, &id ) ) {
/* something bad happened to ldbm cache */
}
if( id != NOID ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_LDBM, ENTRY,
- "ldbm_tool_entry_put: \"%s\" already exists (id=%ld)\n",
- e->e_dn, id, 0 );
-#else
Debug( LDAP_DEBUG_TRACE,
"<= ldbm_tool_entry_put: \"%s\" already exists (id=%ld)\n",
e->e_ndn, id, 0 );
-#endif
strncpy( text->bv_val, "already exists", text->bv_len );
return NOID;
}
+ op.o_hdr = &ohdr;
op.o_bd = be;
op.o_tmpmemctx = NULL;
op.o_tmpmfuncs = &ch_mfuncs;
int rc;
Entry *e;
Operation op = {0};
+ Opheader ohdr = {0};
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_tool_entry_reindex: ID=%ld\n",
- (long)id, 0, 0 );
-#else
Debug( LDAP_DEBUG_ARGS, "=> ldbm_tool_entry_reindex( %ld )\n",
(long) id, 0, 0 );
-#endif
e = ldbm_tool_entry_get( be, id );
if( e == NULL ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_LDBM, INFO,
- "ldbm_tool_entry_reindex: could not locate id %ld\n",
- (long)id, 0, 0 );
-#else
Debug( LDAP_DEBUG_ANY,
"ldbm_tool_entry_reindex:: could not locate id=%ld\n",
(long) id, 0, 0 );
-#endif
return -1;
}
*
*/
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_LDBM, ENTRY,
- "ldbm_tool_entry_reindex: (%s) %ld\n", e->e_dn, id, 0 );
-#else
Debug( LDAP_DEBUG_TRACE, "=> ldbm_tool_entry_reindex( %ld, \"%s\" )\n",
id, e->e_dn, 0 );
-#endif
dn2id_add( be, &e->e_nname, e->e_id );
+ op.o_hdr = &ohdr;
op.o_bd = be;
op.o_tmpmemctx = NULL;
op.o_tmpmfuncs = &ch_mfuncs;