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

Diff of /lbbs/src/section_list_display.c

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

Revision 1.78 by sysadm, Sun Nov 23 04:28:24 2025 UTC Revision 1.82 by sysadm, Thu Dec 18 02:56:01 2025 UTC
# Line 71  enum select_cmd_t Line 71  enum select_cmd_t
71          SEARCH_USER,          SEARCH_USER,
72  };  };
73    
74  static int section_list_draw_items(int page_id, ARTICLE *p_articles[], int article_count, int display_nickname, int ontop_start_offset)  static int section_list_draw_items(int page_id, const ARTICLE *p_articles[], int article_count, int display_nickname, int ontop_start_offset)
75  {  {
76          char str_time[LINE_BUFFER_LEN];          char str_time[LINE_BUFFER_LEN];
77          struct tm tm_sub;          struct tm tm_sub;
# Line 270  static enum select_cmd_t section_list_se Line 270  static enum select_cmd_t section_list_se
270                  if (ch != KEY_NULL && ch != KEY_TIMEOUT)                  if (ch != KEY_NULL && ch != KEY_TIMEOUT)
271                  {                  {
272                          BBS_last_access_tm = time(NULL);                          BBS_last_access_tm = time(NULL);
273    
274                            // Refresh current action
275                            if (user_online_update(NULL) < 0)
276                            {
277                                    log_error("user_online_update(NULL) error\n");
278                            }
279                  }                  }
280    
281                  switch (ch)                  switch (ch)
282                  {                  {
283                  case KEY_NULL: // broken pipe                  case KEY_NULL: // broken pipe
284                          log_error("KEY_NULL\n");                          log_debug("KEY_NULL\n");
285                          return EXIT_SECTION;                          return EXIT_SECTION;
286                  case KEY_TIMEOUT:                  case KEY_TIMEOUT:
287                          if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)                          if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
# Line 584  int section_list_display(const char *sna Line 590  int section_list_display(const char *sna
590          char stitle[BBS_section_title_max_len + 1];          char stitle[BBS_section_title_max_len + 1];
591          char master_list[(BBS_username_max_len + 1) * 3 + 1];          char master_list[(BBS_username_max_len + 1) * 3 + 1];
592          char page_info_str[LINE_BUFFER_LEN];          char page_info_str[LINE_BUFFER_LEN];
593          ARTICLE *p_articles[BBS_article_limit_per_page];          const ARTICLE *p_articles[BBS_article_limit_per_page];
594          int article_count;          int article_count;
595          int page_count;          int page_count;
596          int ontop_start_offset;          int ontop_start_offset;
# Line 1398  int section_list_ex_dir_display(SECTION_ Line 1404  int section_list_ex_dir_display(SECTION_
1404                          if (ch != KEY_NULL && ch != KEY_TIMEOUT)                          if (ch != KEY_NULL && ch != KEY_TIMEOUT)
1405                          {                          {
1406                                  BBS_last_access_tm = time(NULL);                                  BBS_last_access_tm = time(NULL);
1407    
1408                                    // Refresh current action
1409                                    if (user_online_update(NULL) < 0)
1410                                    {
1411                                            log_error("user_online_update(NULL) error\n");
1412                                    }
1413                          }                          }
1414    
1415                          switch (ch)                          switch (ch)
1416                          {                          {
1417                          case KEY_NULL: // broken pipe                          case KEY_NULL: // broken pipe
1418                                  log_error("KEY_NULL\n");                                  log_debug("KEY_NULL\n");
1419                                  loop = 0;                                  loop = 0;
1420                                  break;                                  break;
1421                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:


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

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