/[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.116 by sysadm, Sat Nov 29 01:55:00 2025 UTC Revision 1.117 by sysadm, Sun Nov 30 04:43:46 2025 UTC
# Line 118  int bbs_logout(void) Line 118  int bbs_logout(void)
118                  return -2;                  return -2;
119          }          }
120    
         if (user_online_del(db) < 0)  
         {  
                 return -3;  
         }  
   
121          mysql_close(db);          mysql_close(db);
122    
123          display_file(DATA_GOODBYE, 1);          display_file(DATA_GOODBYE, 1);
# Line 133  int bbs_logout(void) Line 128  int bbs_logout(void)
128          return 0;          return 0;
129  }  }
130    
131    int bbs_session_cleanup(void)
132    {
133            MYSQL *db;
134    
135            db = db_open();
136            if (db == NULL)
137            {
138                    return -1;
139            }
140    
141            if (user_online_del(db) < 0)
142            {
143                    return -2;
144            }
145    
146            mysql_close(db);
147    
148            return 0;
149    }
150    
151  int bbs_center()  int bbs_center()
152  {  {
153          int ch;          int ch;
# Line 406  int bbs_main() Line 421  int bbs_main()
421          // Main          // Main
422          bbs_center();          bbs_center();
423    
424            // Logout
425            bbs_logout();
426    
427          // Save section aid locations          // Save section aid locations
428          if (section_aid_locations_save(BBS_priv.uid) < 0)          if (section_aid_locations_save(BBS_priv.uid) < 0)
429          {          {
# Line 425  int bbs_main() Line 443  int bbs_main()
443          }          }
444    
445  cleanup:  cleanup:
446          // Logout          // Cleanup session
447          bbs_logout();          bbs_session_cleanup();
448    
449          // Cleanup iconv          // Cleanup iconv
450          io_conv_cleanup();          io_conv_cleanup();


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

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