/[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.49 by sysadm, Mon Jun 16 14:30:44 2025 UTC Revision 1.50 by sysadm, Tue Jun 17 02:06:48 2025 UTC
# Line 408  int bbsnet_connect(int n) Line 408  int bbsnet_connect(int n)
408                  goto cleanup;                  goto cleanup;
409          }          }
410    
411          BBS_last_access_tm = t_used = time(0);          BBS_last_access_tm = t_used = time(NULL);
412          loop = 1;          loop = 1;
413    
414          while (loop && !SYS_server_exit)          while (loop && !SYS_server_exit)
# Line 433  int bbsnet_connect(int n) Line 433  int bbsnet_connect(int n)
433                  }                  }
434                  else if (nfds == 0) // timeout                  else if (nfds == 0) // timeout
435                  {                  {
436                          if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME)                          if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)
437                          {                          {
438                                  break;                                  break;
439                          }                          }
# Line 500  int bbsnet_connect(int n) Line 500  int bbsnet_connect(int n)
500                                          else                                          else
501                                          {                                          {
502                                                  input_buf_len += ret;                                                  input_buf_len += ret;
503                                                  BBS_last_access_tm = time(0);                                                  BBS_last_access_tm = time(NULL);
504                                                  continue;                                                  continue;
505                                          }                                          }
506                                  }                                  }
# Line 668  cleanup: Line 668  cleanup:
668                  log_error("Close socket failed\n");                  log_error("Close socket failed\n");
669          }          }
670    
671          t_used = time(0) - t_used;          t_used = time(NULL) - t_used;
672          tm_used = gmtime(&t_used);          tm_used = gmtime(&t_used);
673    
674          log_common("BBSNET disconnect, %d days %d hours %d minutes %d seconds used\n",          log_common("BBSNET disconnect, %d days %d hours %d minutes %d seconds used\n",
# Line 734  int bbs_net() Line 734  int bbs_net()
734    
735          load_bbsnet_conf(CONF_BBSNET);          load_bbsnet_conf(CONF_BBSNET);
736    
737          BBS_last_access_tm = time(0);          BBS_last_access_tm = time(NULL);
738    
739          clearscr();          clearscr();
740          bbsnet_refresh();          bbsnet_refresh();
# Line 751  int bbs_net() Line 751  int bbs_net()
751                  case Ctrl('C'): // user cancel                  case Ctrl('C'): // user cancel
752                          goto cleanup;                          goto cleanup;
753                  case KEY_TIMEOUT:                  case KEY_TIMEOUT:
754                          if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME)                          if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)
755                          {                          {
756                                  goto cleanup;                                  goto cleanup;
757                          }                          }
# Line 800  int bbs_net() Line 800  int bbs_net()
800                          bbsnet_selchange();                          bbsnet_selchange();
801                          break;                          break;
802                  }                  }
803                  BBS_last_access_tm = time(0);                  BBS_last_access_tm = time(NULL);
804          }          }
805    
806  cleanup:  cleanup:


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

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