]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/init.c
Cleanup ISO C compatibility for recent commits
[openldap] / servers / slapd / back-monitor / init.c
index dfd1d861157570b29c008248980109a71feaaab3..c2b0b7ef23626d1479c011362d8a31c2b5ac0451 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2009 The OpenLDAP Foundation.
+ * Copyright 2001-2011 The OpenLDAP Foundation.
  * Portions Copyright 2001-2003 Pierangelo Masarati.
  * All rights reserved.
  *
@@ -830,7 +830,7 @@ monitor_search2ndn(
        OperationBuffer opbuf;
        Operation       *op;
        void    *thrctx;
-       SlapReply       rs = { 0 };
+       SlapReply       rs = { REP_RESULT };
        slap_callback   cb = { NULL, monitor_search2ndn_cb, NULL, NULL };
        int             rc;
 
@@ -1108,16 +1108,6 @@ done:;
 
                *elpp = (entry_limbo_t *)ch_malloc( sizeof( entry_limbo_t ) );
                if ( *elpp == NULL ) {
-                       el.el_e->e_private = NULL;
-                       entry_free( el.el_e );
-                       return -1;
-               }
-
-               if ( *elpp != NULL ) {
-                       el.el_next = NULL;
-                       **elpp = el;
-
-               } else {
                        if ( !BER_BVISNULL( &el.el_filter ) ) {
                                ch_free( el.el_filter.bv_val );
                        }
@@ -1129,6 +1119,9 @@ done:;
                        }
                        return -1;
                }
+
+               el.el_next = NULL;
+               **elpp = el;
        }
 
        return 0;
@@ -2051,7 +2044,7 @@ monitor_back_initialize(
 
        bi->bi_extended = 0;
 
-       bi->bi_entry_release_rw = 0;
+       bi->bi_entry_release_rw = monitor_back_release;
        bi->bi_chk_referrals = 0;
        bi->bi_operational = monitor_back_operational;
 
@@ -2061,6 +2054,7 @@ monitor_back_initialize(
        bi->bi_tool_entry_open = 0;
        bi->bi_tool_entry_close = 0;
        bi->bi_tool_entry_first = 0;
+       bi->bi_tool_entry_first_x = 0;
        bi->bi_tool_entry_next = 0;
        bi->bi_tool_entry_get = 0;
        bi->bi_tool_entry_put = 0;