/[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.71 by sysadm, Mon Oct 20 01:55:50 2025 UTC Revision 1.73 by sysadm, Mon Oct 20 04:17:36 2025 UTC
# Line 536  int bbsnet_connect(int n) Line 536  int bbsnet_connect(int n)
536                                          }                                          }
537                                          else if (ret == 0)                                          else if (ret == 0)
538                                          {                                          {
539                                                    // Send NO-OP to remote server
540                                                    input_buf[input_buf_len] = '\0';
541                                                    input_buf_len++;
542                                                    BBS_last_access_tm = time(NULL);
543    
544                                                  stdin_read_wait = 0;                                                  stdin_read_wait = 0;
545                                                  break; // Check whether channel is still open                                                  break; // Check whether channel is still open
546                                          }                                          }
# Line 591  int bbsnet_connect(int n) Line 596  int bbsnet_connect(int n)
596                  {                  {
597                          if (input_buf_offset < input_buf_len)                          if (input_buf_offset < input_buf_len)
598                          {                          {
599                                    // For debug
600    #ifdef _DEBUG
601                                    for (int j = input_buf_offset; j < input_buf_len; j++)
602                                    {
603                                            log_error("Debug input: <--[%u]\n", (input_buf[j] + 256) % 256);
604                                    }
605    #endif
606    
607                                  ret = io_buf_conv(input_cd, input_buf, &input_buf_len, &input_buf_offset, input_conv, sizeof(input_conv), &input_conv_len);                                  ret = io_buf_conv(input_cd, input_buf, &input_buf_len, &input_buf_offset, input_conv, sizeof(input_conv), &input_conv_len);
608                                  if (ret < 0)                                  if (ret < 0)
609                                  {                                  {
610                                          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);
611                                          input_buf_len = input_buf_offset; // Discard invalid sequence                                          input_buf_len = input_buf_offset; // Discard invalid sequence
612                                  }                                  }
613    
614                                    // For debug
615    #ifdef _DEBUG
616                                    for (int j = input_conv_offset; j < input_conv_len; j++)
617                                    {
618                                            log_error("Debug input_conv: <--[%u]\n", (input_conv[j] + 256) % 256);
619                                    }
620    #endif
621                          }                          }
622    
623                          while (input_conv_offset < input_conv_len && !SYS_server_exit)                          while (input_conv_offset < input_conv_len && !SYS_server_exit)
# Line 781  cleanup: Line 802  cleanup:
802                             tm_used->tm_mday - 1, tm_used->tm_hour, tm_used->tm_min,                             tm_used->tm_mday - 1, tm_used->tm_hour, tm_used->tm_min,
803                             tm_used->tm_sec);                             tm_used->tm_sec);
804    
805            BBS_last_access_tm = time(NULL);
806    
807          return 0;          return 0;
808  }  }
809    


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

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