mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-20 22:03:45 -05:00
tentative fix of another issue related to ITS#3800; please review
This commit is contained in:
parent
6236574efc
commit
86e6207b63
1 changed files with 12 additions and 1 deletions
|
|
@ -262,6 +262,12 @@ do_abandon(
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef LDAP_R_COMPILE
|
||||
/* ld_abandoned is actually protected by the ld_res_mutex;
|
||||
* give up the ld_req_mutex and get the other */
|
||||
ldap_pvt_thread_mutex_unlock( &ld->ld_req_mutex );
|
||||
ldap_pvt_thread_mutex_lock( &ld->ld_res_mutex );
|
||||
#endif
|
||||
i = 0;
|
||||
if ( ld->ld_abandoned != NULL ) {
|
||||
for ( ; ld->ld_abandoned[i] != -1; i++ )
|
||||
|
|
@ -276,7 +282,7 @@ do_abandon(
|
|||
if ( ld->ld_abandoned == NULL ) {
|
||||
ld->ld_abandoned = old_abandon;
|
||||
ld->ld_errno = LDAP_NO_MEMORY;
|
||||
return( ld->ld_errno );
|
||||
goto done;
|
||||
}
|
||||
|
||||
ld->ld_abandoned[i] = msgid;
|
||||
|
|
@ -286,5 +292,10 @@ do_abandon(
|
|||
ld->ld_errno = LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
done:;
|
||||
#ifdef LDAP_R_COMPILE
|
||||
ldap_pvt_thread_mutex_unlock( &ld->ld_res_mutex );
|
||||
ldap_pvt_thread_mutex_lock( &ld->ld_req_mutex );
|
||||
#endif
|
||||
return( ld->ld_errno );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue