[Fedora-directory-commits] ldapserver/ldap/servers/slapd add.c, 1.5.2.1, 1.5.2.2 bulk_import.c, 1.4, 1.4.2.1
Noriko Hosoi (nhosoi)
fedora-directory-commits at redhat.com
Fri Jan 25 02:07:39 UTC 2008
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2794/slapd
Modified Files:
Tag: Directory71RtmBranch
add.c bulk_import.c
Log Message:
Resolves: #430180 (original bug #429793)
Summary: RHDS7.1SP4: Replica crashes during online initialization with large
attribute value
Description: applied the patches to Directory71RtmBranch
Index: add.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/add.c,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -r1.5.2.1 -r1.5.2.2
--- add.c 2 Mar 2006 01:12:23 -0000 1.5.2.1
+++ add.c 25 Jan 2008 02:07:36 -0000 1.5.2.2
@@ -753,25 +753,19 @@
slapi_pblock_set(pb, SLAPI_BULK_IMPORT_STATE, &ret);
ret = (*be->be_wire_import)(pb);
if (ret != 0) {
- if (ret != LDAP_BUSY) {
- LDAPDebug(LDAP_DEBUG_ANY,
- "wire import: error during import (%d)\n",
- ret, 0, 0);
- } else {
- LDAPDebug(LDAP_DEBUG_TRACE,
- "wire import: asking client to wait before resuming (returning LDAP_BUSY)\n",
- 0, 0, 0);
- }
- send_ldap_result(pb,
- LDAP_BUSY == ret ? LDAP_BUSY : LDAP_OPERATIONS_ERROR,
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "wire import: error during import (%d)\n",
+ ret, 0, 0);
+ send_ldap_result(pb, LDAP_OPERATIONS_ERROR,
NULL, NULL, 0, NULL);
+ /* It's our responsibility to free the entry if
+ * be_wire_import doesn't succeed. */
slapi_entry_free(entry);
- if (LDAP_BUSY != ret) {
- /* turn off fast replica init -- import is now aborted */
- pb->pb_conn->c_bi_backend = NULL;
- pb->pb_conn->c_flags &= ~CONN_FLAG_IMPORT;
- }
+ /* turn off fast replica init -- import is now aborted */
+ pb->pb_conn->c_bi_backend = NULL;
+ pb->pb_conn->c_flags &= ~CONN_FLAG_IMPORT;
+
return;
}
Index: bulk_import.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/bulk_import.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- bulk_import.c 19 Apr 2005 22:07:36 -0000 1.4
+++ bulk_import.c 25 Jan 2008 02:07:36 -0000 1.4.2.1
@@ -171,10 +171,11 @@
rc = be->be_wire_import (pb);
if (rc != 0)
{
- if (rc != LDAP_BUSY)
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "slapi_start_bulk_import: "
+ /* The caller will free the entry (e), so we just
+ * leave it alone here. */
+ slapi_log_error(SLAPI_LOG_FATAL, NULL, "slapi_start_bulk_import: "
"failed; error = %d\n", rc);
- return (LDAP_BUSY == rc ? LDAP_BUSY : LDAP_OPERATIONS_ERROR);
+ return LDAP_OPERATIONS_ERROR;
}
return LDAP_SUCCESS;
More information about the Fedora-directory-commits
mailing list