diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-29 05:19:01 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-29 05:19:01 +0000 |
commit | 02720aae3af5cc563a8b6dd374b5aebd5a0da074 (patch) | |
tree | 59ebbe47fe076464218bbde1a5206768ae1d0601 /src/char_sql | |
parent | 893a5922031f91f0599480d2ffbf525b76803165 (diff) | |
download | hercules-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')
-rw-r--r-- | src/char_sql/char.c | 18 |
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); |