Diff for /servers/slapd/back-sock/compare.c between versions 1.4.2.5 and 1.4.2.6

version 1.4.2.5, 2011/01/28 18:49:16 version 1.4.2.6, 2011/01/28 18:50:05
Line 27 Line 27
   
 #include "slap.h"  #include "slap.h"
 #include "back-sock.h"  #include "back-sock.h"
   #include "ldif.h"
   
 int  int
 sock_back_compare(  sock_back_compare(
Line 37  sock_back_compare( Line 38  sock_back_compare(
         AttributeDescription *entry = slap_schema.si_ad_entry;          AttributeDescription *entry = slap_schema.si_ad_entry;
         Entry e;          Entry e;
         FILE                    *fp;          FILE                    *fp;
           char *text;
   
         e.e_id = NOID;          e.e_id = NOID;
         e.e_name = op->o_req_dn;          e.e_name = op->o_req_dn;
Line 60  sock_back_compare( Line 62  sock_back_compare(
                 return( -1 );                  return( -1 );
         }          }
   
         /*  
          * FIX ME:  This should use LDIF routines so that binary  
          *      values are properly dealt with  
          */  
   
         /* write out the request to the compare process */          /* write out the request to the compare process */
         fprintf( fp, "COMPARE\n" );          fprintf( fp, "COMPARE\n" );
         fprintf( fp, "msgid: %ld\n", (long) op->o_msgid );          fprintf( fp, "msgid: %ld\n", (long) op->o_msgid );
         sock_print_conn( fp, op->o_conn, si );          sock_print_conn( fp, op->o_conn, si );
         sock_print_suffixes( fp, op->o_bd );          sock_print_suffixes( fp, op->o_bd );
         fprintf( fp, "dn: %s\n", op->o_req_dn.bv_val );          fprintf( fp, "dn: %s\n", op->o_req_dn.bv_val );
         fprintf( fp, "%s: %s\n\n",          /* could be binary */
                 op->oq_compare.rs_ava->aa_desc->ad_cname.bv_val,          text = ldif_put_wrap( LDIF_PUT_VALUE,
                 op->oq_compare.rs_ava->aa_value.bv_val /* could be binary! */ );                  op->orc_ava->aa_desc->ad_cname.bv_val,
         fclose( fp );                  op->orc_ava->aa_value.bv_val,
                   op->orc_ava->aa_value.bv_len, LDIF_LINE_WIDTH_MAX );
           if ( text ) {
                   fprintf( fp, "%s\n", text );
                   ber_memfree( text );
           } else {
                   fprintf( fp, "\n\n" );
           }
   
         /* read in the result and send it along */          /* read in the result and send it along */
         sock_read_and_send_results( op, rs, fp );          sock_read_and_send_results( op, rs, fp );

Removed from v.1.4.2.5  
changed lines
  Added in v.1.4.2.6


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org