/[LeafOK_CVS]/lbbs/src/bbs_net.c
ViewVC logotype

Diff of /lbbs/src/bbs_net.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.60 by sysadm, Sat Oct 4 15:55:26 2025 UTC Revision 1.61 by sysadm, Sun Oct 5 00:49:56 2025 UTC
# Line 213  int bbsnet_io_buf_conv(iconv_t cd, char Line 213  int bbsnet_io_buf_conv(iconv_t cd, char
213                  {                  {
214                          if (errno == EINVAL) // Incomplete                          if (errno == EINVAL) // Incomplete
215                          {                          {
216    #ifdef _DEBUG
217                                    log_error("iconv(inbytes=%d, outbytes=%d) error: EINVAL\n", in_bytes, out_bytes);
218    #endif
219                                  *p_buf_len = (int)(p_buf + *p_buf_len - in_buf);                                  *p_buf_len = (int)(p_buf + *p_buf_len - in_buf);
220                                  *p_buf_offset = 0;                                  *p_buf_offset = 0;
221                                  *p_conv_len = (int)(conv_size - out_bytes);                                  *p_conv_len = (int)(conv_size - out_bytes);
# Line 229  int bbsnet_io_buf_conv(iconv_t cd, char Line 232  int bbsnet_io_buf_conv(iconv_t cd, char
232                          {                          {
233                                  if (in_bytes > out_bytes || out_bytes <= 0)                                  if (in_bytes > out_bytes || out_bytes <= 0)
234                                  {                                  {
235                                          errno = E2BIG;                                          log_error("iconv(inbytes=%d, outbytes=%d) error: EILSEQ and E2BIG\n", in_bytes, out_bytes);
236                                          return -1;                                          return -2;
237                                  }                                  }
238    
239                                  *out_buf++ = *in_buf++;                                  *out_buf = *in_buf;
240                                    in_buf++;
241                                    out_buf++;
242                                  in_bytes--;                                  in_bytes--;
243                                  out_bytes--;                                  out_bytes--;
244    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1