]> git.sur5r.net Git - openldap/commitdiff
Read LDAPResult.resultCode & ModifyRequest.modification.operation
authorHallvard Furuseth <hallvard@openldap.org>
Wed, 10 Aug 2005 00:54:38 +0000 (00:54 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Wed, 10 Aug 2005 00:54:38 +0000 (00:54 +0000)
and send SortResult.sortResult as BER ENUMERATED, not BER INTEGER.

libldap: ldap_parse_extended_result, try_read1msg, build_result_ber,
ldap_parse_sasl_bind_result.  slapd: do_modify, send_ldap_controls.

libraries/libldap/extended.c
libraries/libldap/result.c
libraries/libldap/sasl.c
servers/slapd/modify.c
servers/slapd/result.c

index f311557c5ae1be4eff8cdb128db0fcd45e715a89..99d29d8f62ec844feac77140b87362ae60f415c7 100644 (file)
@@ -210,7 +210,7 @@ ldap_parse_extended_result (
                return ld->ld_errno;
        }
 
-       rc = ber_scanf( ber, "{iaa" /*}*/, &errcode,
+       rc = ber_scanf( ber, "{eaa" /*}*/, &errcode,
                &ld->ld_matched, &ld->ld_error );
 
        if( rc == LBER_ERROR ) {
index 56eb3291c3c8038ba7f43d4448f7a5fae3d1e004..2652c81f2999a264ef9f096c61061c13fd6f6e7d 100644 (file)
@@ -555,7 +555,7 @@ nextresp2:
                        ber_len_t       len;
                        char            *lr_res_error = NULL;
 
-                       if ( ber_scanf( &tmpber, "{iaa",/*}*/ &lderr,
+                       if ( ber_scanf( &tmpber, "{eaa",/*}*/ &lderr,
                                    &lr->lr_res_matched, &lr_res_error )
                                    != LBER_ERROR )
                        {
@@ -636,7 +636,7 @@ nextresp2:
                                 */
                                if ( tag == LDAP_RES_SEARCH_RESULT )
                                        refer_cnt = 0;
-                       } else if ( ber_scanf( &tmpber, "{iaa}", &lderr,
+                       } else if ( ber_scanf( &tmpber, "{eaa}", &lderr,
                                &lr->lr_res_matched, &lr_res_error )
                                != LBER_ERROR )
                        {
@@ -978,7 +978,7 @@ build_result_ber( LDAP *ld, BerElement **bp, LDAPRequest *lr )
                return( LBER_ERROR );
        }
 
-       if ( ber_get_int( ber, &along ) == LBER_ERROR ) {
+       if ( ber_get_enum( ber, &along ) == LBER_ERROR ) {
                ld->ld_errno = LDAP_DECODING_ERROR;
                ber_free(ber, 1);
                return( LBER_ERROR );
index 91f30e6f675badbd8d04306ad605f7cc7d13c4b8..849a9fa3809c04d2001d3bc28f98f9a6efc6cd3d 100644 (file)
@@ -306,7 +306,7 @@ ldap_parse_sasl_bind_result(
        } else {
                ber_len_t len;
 
-               tag = ber_scanf( ber, "{iaa" /*}*/,
+               tag = ber_scanf( ber, "{eaa" /*}*/,
                        &errcode, &ld->ld_matched, &ld->ld_error );
 
                if( tag == LBER_ERROR ) {
index becbd71310ac5e33408cafe88cb74644c3ad78d0..7620c284a49dd09edd0bf215a06241eb8e8cd179 100644 (file)
@@ -90,7 +90,7 @@ do_modify(
 
                tmp.sml_nvalues = NULL;
 
-               if ( ber_scanf( op->o_ber, "{i{m[W]}}", &mop,
+               if ( ber_scanf( op->o_ber, "{e{m[W]}}", &mop,
                    &tmp.sml_type, &tmp.sml_values ) == LBER_ERROR )
                {
                        send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR,
index 081eae7b0ec6d8929f5c0536ae7a797e76275dd0..d1e79bf3396021f4edf08e868b3d673e4ed964d0 100644 (file)
@@ -266,7 +266,7 @@ send_ldap_controls( Operation *o, BerElement *ber, LDAPControl **c )
 
                ber_init2( sber, NULL, LBER_USE_DER );
 
-               ber_printf( sber, "{i}", LDAP_UNWILLING_TO_PERFORM );
+               ber_printf( sber, "{e}", LDAP_UNWILLING_TO_PERFORM );
 
                if( ber_flatten2( ber, &sorted.ldctl_value, 0 ) == -1 ) {
                        return -1;