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

Diff of /lbbs/src/bbs_main.c

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

Revision 1.77 by sysadm, Sat Jul 5 01:02:34 2025 UTC Revision 1.81 by sysadm, Thu Oct 16 10:11:01 2025 UTC
# Line 14  Line 14 
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
16    
17    #include "article_favor.h"
18  #include "article_view_log.h"  #include "article_view_log.h"
19  #include "bbs.h"  #include "bbs.h"
20  #include "bbs_cmd.h"  #include "bbs_cmd.h"
# Line 180  int bbs_logout(void) Line 181  int bbs_logout(void)
181                  return -1;                  return -1;
182          }          }
183    
184          if (user_online_del(db) < 0)          if (user_online_exp(db) < 0)
185          {          {
186                  return -2;                  return -2;
187          }          }
188    
189            if (user_online_del(db) < 0)
190            {
191                    return -3;
192            }
193    
194          mysql_close(db);          mysql_close(db);
195    
196          display_file(DATA_GOODBYE, 1);          display_file(DATA_GOODBYE, 1);
197    
198          log_common("User logout\n");          log_common("User [%s] logout\n", BBS_username);
199    
200          return 0;          return 0;
201  }  }
# Line 339  int bbs_main() Line 345  int bbs_main()
345                  goto cleanup;                  goto cleanup;
346          }          }
347    
348            // Load article favorite
349            if (article_favor_load(BBS_priv.uid, &BBS_article_favor, 0) < 0)
350            {
351                    log_error("article_favor_load() error\n");
352                    goto cleanup;
353            }
354    
355          // Init editor memory pool          // Init editor memory pool
356          if (editor_memory_pool_init() < 0)          if (editor_memory_pool_init() < 0)
357          {          {
# Line 363  int bbs_main() Line 376  int bbs_main()
376                  log_error("article_view_log_save_inc() error\n");                  log_error("article_view_log_save_inc() error\n");
377          }          }
378    
379            // Save incremental article favorite
380            if (article_favor_save_inc(&BBS_article_favor) < 0)
381            {
382                    log_error("article_favor_save_inc() error\n");
383            }
384    
385  cleanup:  cleanup:
386          // Cleanup editor memory pool          // Cleanup editor memory pool
387          editor_memory_pool_cleanup();          editor_memory_pool_cleanup();
# Line 370  cleanup: Line 389  cleanup:
389          // Unload article view log          // Unload article view log
390          article_view_log_unload(&BBS_article_view_log);          article_view_log_unload(&BBS_article_view_log);
391    
392            // Unload article favor
393            article_favor_unload(&BBS_article_favor);
394    
395          // Detach menu in shared memory          // Detach menu in shared memory
396          detach_menu_shm(&bbs_menu);          detach_menu_shm(&bbs_menu);
397            detach_menu_shm(&top10_menu);
398    
399          // Detach data pools shm          // Detach data pools shm
400          detach_section_list_shm();          detach_section_list_shm();


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

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