ldap/servers/slapd/back-ldbm/import.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
New commits: commit 6939b2d3b0db4bd5abea981217e539179be228a8 Author: Rich Megginson rmeggins@redhat.com Date: Wed Feb 22 16:26:05 2012 -0700
Trac Ticket #298 - crash when replicating orphaned tombstone entry
https://fedorahosted.org/389/ticket/298
Fix description: The previous fix for 4. Reducing repeated "WARNING: bad entry: ID ##" messages. introduced a regression that caused the import to crash. This fixes the crash by restoring the bad entry ID logic. Reviewed by: nhosoi (Thanks!)
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c index 4958dc0..e3966ff 100644 --- a/ldap/servers/slapd/back-ldbm/import.c +++ b/ldap/servers/slapd/back-ldbm/import.c @@ -106,13 +106,17 @@ FifoItem *import_fifo_fetch(ImportJob *job, ID id, int worker) } else { return NULL; } - if (fi->entry && fi->bad && (FIFOITEM_BAD == fi->bad)) { - fi->bad = FIFOITEM_BAD_PRINTED; + if (fi->entry) { if (worker) { - import_log_notice(job, "WARNING: bad entry: ID %d", id); - return NULL; + if (fi->bad) { + if (fi->bad == FIFOITEM_BAD) { + fi->bad = FIFOITEM_BAD_PRINTED; + import_log_notice(job, "WARNING: bad entry: ID %d", id); + } + return NULL; + } + PR_ASSERT(fi->entry->ep_refcnt > 0); } - PR_ASSERT(fi->entry->ep_refcnt > 0); } return fi; }
389-commits@lists.fedoraproject.org