]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/result.c
allow to programmatically register new response code names
[openldap] / servers / slapd / result.c
index 7be8d952494c4f50a856de25e982e7e63e31f708..0afad284eb9bb18b506e7eb506fdef45406b4bb4 100644 (file)
@@ -742,9 +742,10 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
        }
 
        /* Every 64 entries, check for thread pool pause */
-       if (( rs->sr_nentries & 0x3f == 0x3f ) &&
+       if ( ( ( rs->sr_nentries & 0x3f ) == 0x3f ) &&
                ldap_pvt_thread_pool_query( &connection_pool,
-                       LDAP_PVT_THREAD_POOL_PARAM_PAUSING, &i ) == 0 && i ) {
+                       LDAP_PVT_THREAD_POOL_PARAM_PAUSING, &i ) == 0 && i )
+       {
                return LDAP_BUSY;
        }
 
@@ -897,12 +898,16 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                } else {
                        /* specific attrs requested */
                        if ( is_at_operational( desc->ad_type ) ) {
-                               if ( !SLAP_OPATTRS( rs->sr_attr_flags ) &&
-                                       !ad_inlist( desc, rs->sr_attrs ) )
-                               {
-                                       continue;
+                               /* if not explicitly requested */
+                               if ( !ad_inlist( desc, rs->sr_attrs )) {
+                                       /* if not all op attrs requested, skip */
+                                       if ( !SLAP_OPATTRS( rs->sr_attr_flags ))
+                                               continue;
+                                       /* if DSA-specific and replicating, skip */
+                                       if ( op->o_sync != SLAP_CONTROL_NONE &&
+                                               desc->ad_type->sat_usage == LDAP_SCHEMA_DSA_OPERATION )
+                                               continue;
                                }
-
                        } else {
                                if ( !userattrs && !ad_inlist( desc, rs->sr_attrs ) ) {
                                        continue;