return 1;
}
- if (conn->c_protocol == LDAP_VERSION2) {
+ if (op->o_protocol == LDAP_VERSION2) {
rc = ber_printf(op->o_res_ber, "{is{" /*}}*/, op->o_msgid, "");
if (rc == -1) {
#ifdef NEW_LOGGING
rc = ber_printf( ber, /*"{"*/ "N}" );
}
+#ifdef LDAP_CONNECTIONLESS
+ if( conn->c_is_udp && op->o_protocol == LDAP_VERSION2 && rc != -1 ) {
+ rc = ber_printf( ber, /*"{"*/ "N}" );
+ }
+#endif
+
if ( rc == -1 ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
rc = send_ldap_controls( ber, ctrls );
}
+#ifdef LDAP_CONNECTIONLESS
+ if( conn->c_is_udp && op->o_protocol == LDAP_VERSION2 ) {
+ ; /* empty, skip following if */
+ } else
+#endif
if( rc != -1 ) {
rc = ber_printf( ber, /*{*/ "N}" );
}