| 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); |
| 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; |
| 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 |
{ |
{ |
| 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(); |