From: Howard Chu Date: Fri, 28 Feb 2003 13:04:16 +0000 (+0000) Subject: Fix ITS#2335, RFC1798 sequence layout was wrong. X-Git-Tag: NO_SLAP_OP_BLOCKS~246 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0423ec0bd613c97fcbe9610fcc241aab3ee769ad;p=openldap Fix ITS#2335, RFC1798 sequence layout was wrong. --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 64ad6a846d..20da8a2e5c 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1462,7 +1462,7 @@ connection_input( 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 diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 4f43811454..2e412aeb5f 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -328,6 +328,12 @@ send_ldap_response( 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, @@ -1250,6 +1256,11 @@ slap_send_search_entry( 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}" ); }