]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#6138 use SLAPD_NO_REPLY for persistent searches
authorHoward Chu <hyc@openldap.org>
Tue, 27 Jul 2021 17:06:23 +0000 (18:06 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 3 Aug 2021 15:19:49 +0000 (15:19 +0000)
The particular code doesn't matter, any result besides
SLAP_CB_CONTINUE always halts overlay/response processing.

servers/slapd/overlays/syncprov.c
servers/slapd/slap.h

index 5eba1b3ff6fc14193493e648d8644a237022cba2..9a277ec40ad574cf1aa527185d33e43adbb33af0 100644 (file)
@@ -2890,9 +2890,6 @@ syncprov_detach_op( Operation *op, syncops *so, slap_overinst *on )
        op->o_conn->c_n_ops_completed--;
        LDAP_STAILQ_INSERT_TAIL( &op->o_conn->c_ops, op2, o_next );
        so->s_flags |= PS_IS_DETACHED;
-
-       /* Prevent anyone else from trying to send a result for this op */
-       op->o_abandon = 1;
 }
 
 static int
@@ -3032,9 +3029,8 @@ syncprov_search_response( Operation *op, SlapReply *rs )
                                if ( ss->ss_so->s_res )
                                        syncprov_qstart( ss->ss_so );
                                ldap_pvt_thread_mutex_unlock( &ss->ss_so->s_mutex );
+                               return SLAPD_NO_REPLY;
                        }
-
-                       return LDAP_SUCCESS;
                }
        }
 
index aa6a014079cea38ad49b406e97463983ec67ce96..bfb24500ab5e1fe03bba4971e5998dc8ee873bcb 100644 (file)
@@ -159,6 +159,9 @@ LDAP_BEGIN_DECL
 /* pseudo error code indicating async operation */
 #define SLAPD_ASYNCOP (-1027)
 
+/* pseudo error code to suppress frontend response */
+#define SLAPD_NO_REPLY (-1028)
+
 /* We assume "C" locale, that is US-ASCII */
 #define ASCII_SPACE(c) ( (c) == ' ' )
 #define ASCII_LOWER(c) ( (c) >= 'a' && (c) <= 'z' )