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

Diff of /lbbs/src/login.c

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

Revision 1.54 by sysadm, Wed Oct 1 02:21:15 2025 UTC Revision 1.55 by sysadm, Wed Oct 1 02:48:54 2025 UTC
# Line 526  int user_online_update(const char *actio Line 526  int user_online_update(const char *actio
526          MYSQL *db = NULL;          MYSQL *db = NULL;
527          char sql[SQL_BUFFER_LEN];          char sql[SQL_BUFFER_LEN];
528    
529          if (strcmp(BBS_current_action, action) == 0 &&          if ((action == NULL || strcmp(BBS_current_action, action) == 0) &&
530                  time(NULL) - BBS_current_action_tm < BBS_current_action_refresh_interval) // No change                  time(NULL) - BBS_current_action_tm < BBS_current_action_refresh_interval) // No change
531          {          {
532                  return 0;                  return 0;
533          }          }
534    
535          strncpy(BBS_current_action, action, sizeof(BBS_current_action) - 1);          if (action != NULL)
536          BBS_current_action[sizeof(BBS_current_action) - 1] = '\0';          {
537                    strncpy(BBS_current_action, action, sizeof(BBS_current_action) - 1);
538                    BBS_current_action[sizeof(BBS_current_action) - 1] = '\0';
539            }
540    
541          BBS_current_action_tm = time(NULL);          BBS_current_action_tm = time(NULL);
542    
543          db = db_open();          db = db_open();


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

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