summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-29 05:19:01 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-29 05:19:01 +0000
commit02720aae3af5cc563a8b6dd374b5aebd5a0da074 (patch)
tree59ebbe47fe076464218bbde1a5206768ae1d0601 /src/char_sql/char.c
parent893a5922031f91f0599480d2ffbf525b76803165 (diff)
downloadhercules-02720aae3af5cc563a8b6dd374b5aebd5a0da074.tar.gz
hercules-02720aae3af5cc563a8b6dd374b5aebd5a0da074.tar.bz2
hercules-02720aae3af5cc563a8b6dd374b5aebd5a0da074.tar.xz
hercules-02720aae3af5cc563a8b6dd374b5aebd5a0da074.zip
A few bug fixes
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@412 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 25141e08f..9505b2819 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2755,21 +2755,25 @@ void do_final(void) {
do_final_itemdb();
//check SQL save progress.
//wait until save char complete
- printf("waiting until char saving complete...\n");
- do {
- sleep (0);
- }while (save_flag != 0);
set_all_offline();
+ flush_fifos_for_final();
+
sprintf(tmp_sql,"DELETE FROM `ragsrvinfo");
- if (mysql_query(&mysql_handle, tmp_sql)) {
+ if (mysql_query(&mysql_handle, tmp_sql))
printf("DB server Error (insert `char`)- %s\n", mysql_error(&mysql_handle));
+
+ if(gm_account) {
+ free(gm_account);
+ gm_account = 0;
}
- if(gm_account) free(gm_account);
+ if(char_dat) {
+ free(char_dat);
+ char_dat = 0;
+ }
- if(char_dat) free(char_dat);
delete_session(login_fd);
delete_session(char_fd);