Diff for /libraries/liblber/dtest.c between versions 1.28 and 1.38

version 1.28, 2002/04/02 16:40:04 version 1.38, 2007/01/02 19:00:57
Line 1 Line 1
 /* dtest.c - lber decoding test program */  /* dtest.c - lber decoding test program */
 /* $OpenLDAP: pkg/ldap/libraries/liblber/dtest.c,v 1.27 2002/01/04 20:17:36 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/libraries/liblber/dtest.c,v 1.37 2006/01/03 22:12:07 kurt Exp $ */
 /*  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.   *
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file   * Copyright 1998-2007 The OpenLDAP Foundation.
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted only as authorized by the OpenLDAP
    * Public License.
    *
    * A copy of this license is available in the file LICENSE in the
    * top-level directory of the distribution or, alternatively, at
    * <http://www.OpenLDAP.org/license.html>.
  */   */
 /* Portions  /* Portions Copyright (c) 1990 Regents of the University of Michigan.
  * Copyright (c) 1990 Regents of the University of Michigan.  
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms are permitted   * Redistribution and use in source and binary forms are permitted
Line 15 Line 23
  * software without specific prior written permission. This software   * software without specific prior written permission. This software
  * is provided ``as is'' without express or implied warranty.   * is provided ``as is'' without express or implied warranty.
  */   */
   /* ACKNOWLEDGEMENTS:
    * This work was originally developed by the University of Michigan
    * (as part of U-MICH LDAP).
    */
   
 #include "portable.h"  #include "portable.h"
   
Line 24 Line 36
 #include <ac/string.h>  #include <ac/string.h>
 #include <ac/socket.h>  #include <ac/socket.h>
 #include <ac/unistd.h>  #include <ac/unistd.h>
   #include <ac/errno.h>
   
 #ifdef HAVE_CONSOLE_H  #ifdef HAVE_CONSOLE_H
 #include <console.h>  #include <console.h>
Line 73  main( int argc, char **argv ) Line 86  main( int argc, char **argv )
                 return( EXIT_FAILURE );                  return( EXIT_FAILURE );
         }          }
   
         tag = ber_get_next( sb, &len, ber);          for (;;) {
         if( tag == LBER_ERROR ) {                  tag = ber_get_next( sb, &len, ber);
                   if( tag != LBER_ERROR ) break;
   
                   if( errno == EWOULDBLOCK ) continue;
                   if( errno == EAGAIN ) continue;
   
                 perror( "ber_get_next" );                  perror( "ber_get_next" );
                 return( EXIT_FAILURE );                  return( EXIT_FAILURE );
         }          }
   
         printf("decode: message tag 0x%lx and length %ld\n",          printf("decode: message tag 0x%lx and length %ld\n",
                 (unsigned long) tag, (long) len );                  (unsigned long) tag, (long) len );
   
         for( s = argv[1]; *s; s++ ) {          for( s = argv[1]; *s; s++ ) {
                 char buf[128];                  char buf[128];

Removed from v.1.28  
changed lines
  Added in v.1.38


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