mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
send_search_reference should propagate errors
This commit is contained in:
parent
fbed376e2d
commit
d6d31af4f0
@ -1359,11 +1359,15 @@ slap_send_search_reference( Operation *op, SlapReply *rs )
|
||||
bytes = send_ldap_ber( op->o_conn, ber );
|
||||
ber_free_buf( ber );
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &slap_counters.sc_sent_mutex );
|
||||
ldap_pvt_mp_add_ulong( slap_counters.sc_bytes, (unsigned long)bytes );
|
||||
ldap_pvt_mp_add_ulong( slap_counters.sc_refs, 1 );
|
||||
ldap_pvt_mp_add_ulong( slap_counters.sc_pdu, 1 );
|
||||
ldap_pvt_thread_mutex_unlock( &slap_counters.sc_sent_mutex );
|
||||
if ( bytes < 0 ) {
|
||||
rc = LDAP_UNAVAILABLE;
|
||||
} else {
|
||||
ldap_pvt_thread_mutex_lock( &slap_counters.sc_sent_mutex );
|
||||
ldap_pvt_mp_add_ulong( slap_counters.sc_bytes, (unsigned long)bytes );
|
||||
ldap_pvt_mp_add_ulong( slap_counters.sc_refs, 1 );
|
||||
ldap_pvt_mp_add_ulong( slap_counters.sc_pdu, 1 );
|
||||
ldap_pvt_thread_mutex_unlock( &slap_counters.sc_sent_mutex );
|
||||
}
|
||||
#ifdef LDAP_CONNECTIONLESS
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user