int ndeletes, ntotdeletes;
+ int rc;
+ char *extra = "";
+
connection_fake_init( &conn, &opbuf, ctx );
op = &opbuf.ob_op;
op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
filter_free_x( op, op->ors_filter );
+ rc = rs.sr_err;
switch ( rs.sr_err ) {
case LDAP_SUCCESS:
break;
case LDAP_NO_SUCH_OBJECT:
/* (ITS#5267) database not created yet? */
rs.sr_err = LDAP_SUCCESS;
+ extra = " (ignored)";
/* fallthru */
default:
- Log1( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
- "DDS expired objects lookup failed err=%d\n",
- rs.sr_err );
+ Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+ "DDS expired objects lookup failed err=%d%s\n",
+ rc, extra );
goto done;
}
slap_callback sc = { 0 };
SlapReply rs = { REP_RESULT };
+ int rc;
+ char *extra = "";
+
connection_fake_init( &conn, &opbuf, ctx );
op = &opbuf.ob_op;
op->o_callback = ≻
sc.sc_response = dds_count_cb;
sc.sc_private = &di->di_num_dynamicObjects;
+ di->di_num_dynamicObjects = 0;
op->o_bd->bd_info = (BackendInfo *)on->on_info;
(void)op->o_bd->bd_info->bi_op_search( op, &rs );
op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
filter_free_x( op, op->ors_filter );
- if ( rs.sr_err == LDAP_SUCCESS ) {
+ rc = rs.sr_err;
+ switch ( rs.sr_err ) {
+ case LDAP_SUCCESS:
Log1( LDAP_DEBUG_STATS, LDAP_LEVEL_INFO,
"DDS non-expired=%d\n",
di->di_num_dynamicObjects );
+ break;
- } else {
- Log1( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
- "DDS non-expired objects lookup failed err=%d\n",
- rs.sr_err );
+ case LDAP_NO_SUCH_OBJECT:
+ /* (ITS#5267) database not created yet? */
+ rs.sr_err = LDAP_SUCCESS;
+ extra = " (ignored)";
+ /* fallthru */
+
+ default:
+ Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+ "DDS non-expired objects lookup failed err=%d%s\n",
+ rc, extra );
+ break;
}
return rs.sr_err;