+ return 1;
+ }
+
+ if (op->o_protocol == LDAP_VERSION2) {
+ rc = ber_printf(op->o_res_ber, "{is{" /*}}*/, op->o_msgid, "");
+ if (rc == -1) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( CONNECTION, INFO,
+ "connection_input: conn %lu put outer sequence failed\n",
+ conn->c_connid, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY, "ber_write failed\n", 0, 0, 0 );
+#endif
+ return rc;
+ }
+ }
+ }
+#endif /* LDAP_CONNECTIONLESS */
+
+ rc = 0;
+
+ /* Don't process requests when the conn is in the middle of a
+ * Bind, or if it's closing. Also, don't let any single conn
+ * use up all the available threads, and don't execute if we're
+ * currently blocked on output. And don't execute if there are
+ * already pending ops, let them go first.
+ *
+ * But always allow Abandon through; it won't cost much.
+ */
+ if ( tag != LDAP_REQ_ABANDON && (conn->c_conn_state == SLAP_C_BINDING
+ || conn->c_conn_state == SLAP_C_CLOSING
+ || conn->c_n_ops_executing >= connection_pool_max/2
+ || conn->c_n_ops_pending
+ || conn->c_writewaiter))