/[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.70 by sysadm, Sun Oct 19 14:34:37 2025 UTC Revision 1.71 by sysadm, Mon Oct 20 01:55:50 2025 UTC
# Line 424  int bbsnet_connect(int n) Line 424  int bbsnet_connect(int n)
424          log_common("BBSNET connect to %s:%d from %s:%d by [%s]\n",          log_common("BBSNET connect to %s:%d from %s:%d by [%s]\n",
425                             remote_addr, remote_port, local_addr, local_port, BBS_username);                             remote_addr, remote_port, local_addr, local_port, BBS_username);
426    
427          snprintf(tocode, sizeof(tocode), "%s//IGNORE", bbsnet_conf[n].charset);          snprintf(tocode, sizeof(tocode), "%s%s", bbsnet_conf[n].charset,
428                             (strcasecmp(stdio_charset, bbsnet_conf[n].charset) == 0 ? "" : "//IGNORE"));
429          input_cd = iconv_open(tocode, stdio_charset);          input_cd = iconv_open(tocode, stdio_charset);
430          if (input_cd == (iconv_t)(-1))          if (input_cd == (iconv_t)(-1))
431          {          {
# Line 432  int bbsnet_connect(int n) Line 433  int bbsnet_connect(int n)
433                  goto cleanup;                  goto cleanup;
434          }          }
435    
436          snprintf(tocode, sizeof(tocode), "%s//TRANSLIT", stdio_charset);          snprintf(tocode, sizeof(tocode), "%s%s", stdio_charset,
437                             (strcasecmp(bbsnet_conf[n].charset, stdio_charset) == 0 ? "" : "//TRANSLIT"));
438          output_cd = iconv_open(tocode, bbsnet_conf[n].charset);          output_cd = iconv_open(tocode, bbsnet_conf[n].charset);
439          if (output_cd == (iconv_t)(-1))          if (output_cd == (iconv_t)(-1))
440          {          {
# Line 593  int bbsnet_connect(int n) Line 595  int bbsnet_connect(int n)
595                                  if (ret < 0)                                  if (ret < 0)
596                                  {                                  {
597                                          log_error("io_buf_conv(input, %d, %d, %d) error\n", input_buf_len, input_buf_offset, input_conv_len);                                          log_error("io_buf_conv(input, %d, %d, %d) error\n", input_buf_len, input_buf_offset, input_conv_len);
598                                            input_buf_len = input_buf_offset; // Discard invalid sequence
599                                  }                                  }
600                          }                          }
601    
# Line 688  int bbsnet_connect(int n) Line 691  int bbsnet_connect(int n)
691                                  if (ret < 0)                                  if (ret < 0)
692                                  {                                  {
693                                          log_error("io_buf_conv(output, %d, %d, %d) error\n", output_buf_len, output_buf_offset, output_conv_len);                                          log_error("io_buf_conv(output, %d, %d, %d) error\n", output_buf_len, output_buf_offset, output_conv_len);
694                                            output_buf_len = output_buf_offset; // Discard invalid sequence
695                                  }                                  }
696                          }                          }
697    
# Line 845  int bbs_net() Line 849  int bbs_net()
849          {          {
850                  ch = igetch(100);                  ch = igetch(100);
851    
852          if (ch != KEY_NULL && ch != KEY_TIMEOUT)                  if (ch != KEY_NULL && ch != KEY_TIMEOUT)
853          {                  {
854              BBS_last_access_tm = time(NULL);                          BBS_last_access_tm = time(NULL);
855          }                  }
856    
857                  switch (ch)                  switch (ch)
858                  {                  {


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

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