]> git.sur5r.net Git - openldap/commitdiff
ITS#3186 don't print error when empty DN "" is the only thing missing
authorHoward Chu <hyc@openldap.org>
Sat, 12 Jun 2004 05:29:55 +0000 (05:29 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 12 Jun 2004 05:29:55 +0000 (05:29 +0000)
servers/slapd/back-bdb/tools.c

index 226866431c33e1012c903aa968d3bcf77b7963d0..0ae213d0329ab338aae29c37e7be7e51dbc13314 100644 (file)
@@ -68,12 +68,19 @@ int bdb_tool_entry_close(
 
        if( nholes ) {
                unsigned i;
-               fprintf( stderr, "Error, entries missing!\n");
+               int fail=0, warn=1;
                for (i=0; i<nholes; i++) {
-                       fprintf(stderr, "  entry %ld: %s\n",
-                               holes[i].id, holes[i].dn.bv_val);
+                       if (holes[i].dn.bv_len) {
+                               fail=1;
+                               if (warn) {
+                                       fprintf( stderr, "Error, entries missing!\n");
+                                       warn=0;
+                               }
+                               fprintf(stderr, "  entry %ld: %s\n",
+                                       holes[i].id, holes[i].dn.bv_val);
+                       }
                }
-               return -1;
+               if (fail) return -1;
        }
                        
        return 0;