Skip to content
Snippets Groups Projects
Commit 6fb50094 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Experimental fix to ITS#179 fix.

parent 48d5465a
No related branches found
No related tags found
No related merge requests found
......@@ -115,15 +115,7 @@ int ldbm_modify_internal(
}
ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
/* modify indexes */
if ( index_add_mods( be, modlist, e->e_id ) != 0 ) {
attrs_free( e->e_attrs );
e->e_attrs = save_attrs;
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, NULL, NULL, NULL );
return -1;
}
/* remove old indices */
if( save_attrs != NULL ) {
for ( ml = modlist; ml != NULL; ml = ml->ml_next ) {
mod = &ml->ml_mod;
......@@ -145,6 +137,14 @@ int ldbm_modify_internal(
attrs_free( save_attrs );
}
/* modify indexes */
if ( index_add_mods( be, modlist, e->e_id ) != 0 ) {
/* our indices are likely hosed */
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, NULL, NULL, NULL );
return -1;
}
/* check for abandon */
ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
if ( op->o_abandon ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment