From 9cb0386851d55676e6954c0ccf74f42df006a85e Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 1 Nov 2011 11:02:00 -0700 Subject: [PATCH] ITS#7062 call response callbacks even if connection was dropped --- servers/slapd/result.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.39.5