httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/i18n/unix xlate.c
Date Fri, 02 Jun 2000 22:34:59 GMT
trawick     00/06/02 15:34:59

  Modified:    src/lib/apr/i18n/unix xlate.c
  Log:
  ap_xlate_conv_buffer(): don't treat it as an error if
  we run out of output buffer in a multi-byte translation
  (single-byte translation doesn't treat it as an error).
  
  Revision  Changes    Path
  1.6       +5 -1      apache-2.0/src/lib/apr/i18n/unix/xlate.c
  
  Index: xlate.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/i18n/unix/xlate.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- xlate.c	2000/05/24 11:45:44	1.5
  +++ xlate.c	2000/06/02 22:34:58	1.6
  @@ -250,7 +250,11 @@
           
           translated = iconv(convset->ich, (const char **)&inbufptr, 
                              inbytes_left, &outbufptr, outbytes_left);
  -        if (translated == (size_t)-1) {
  +        /* If everything went fine but we ran out of buffer, don't
  +         * report it as an error.  Caller needs to look at the two
  +         * bytes-left values anyway.
  +         */
  +        if (translated == (size_t)-1 && *outbytes_left) {
               return errno;
           }
       }
  
  
  

Mime
View raw message