From: Howard Chu Date: Tue, 1 Nov 2011 18:02:00 +0000 (-0700) Subject: ITS#7062 call response callbacks even if connection was dropped X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9cb0386851d55676e6954c0ccf74f42df006a85e;p=openldap ITS#7062 call response callbacks even if connection was dropped --- diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 27a9db887b..13a70ed9e9 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -570,7 +570,8 @@ send_ldap_response( int rc = LDAP_SUCCESS; long bytes; - if (( rs->sr_err == SLAPD_ABANDON || op->o_abandon ) && !op->o_cancel ) { + /* op was actually aborted, bypass everything if client didn't Cancel */ + if (( rs->sr_err == SLAPD_ABANDON ) && !op->o_cancel ) { rc = SLAPD_ABANDON; goto clean2; } @@ -582,6 +583,12 @@ send_ldap_response( } } + /* op completed, connection aborted, bypass sending response */ + if ( op->o_abandon && !op->o_cancel ) { + rc = SLAPD_ABANDON; + goto clean2; + } + #ifdef LDAP_CONNECTIONLESS if (op->o_conn && op->o_conn->c_is_udp) ber = op->o_res_ber;