]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#2335, RFC1798 sequence layout was wrong.
authorHoward Chu <hyc@openldap.org>
Fri, 28 Feb 2003 13:04:16 +0000 (13:04 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 28 Feb 2003 13:04:16 +0000 (13:04 +0000)
servers/slapd/connection.c
servers/slapd/result.c

index 64ad6a846d60f57c0d77723d5f73d05ce11db742..20da8a2e5cbbf9d14e759e065178bc0d76e75797 100644 (file)
@@ -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
index 4f438114548ce75a01c5f4e2bf0544c807bb807c..2e412aeb5f52eb1f6e14629d3ca1187446f98f2b 100644 (file)
@@ -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}" );
        }