summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorsmokexyz <sagunkho@hotmail.com>2017-05-31 08:57:05 +0800
committerGitHub <noreply@github.com>2017-05-31 08:57:05 +0800
commit47a1e679cd35dc2e524fbeb31891d85e497821ce (patch)
tree5359f1cef645f89bfdd7d783b8e4d1176e192c5d /src/char/char.c
parentb950a589e59e2bf074f67c75aaacf3f82424d4fe (diff)
parent4b208e41d1d5cc995c2816e8f34c1ad8b0a7327d (diff)
downloadhercules-47a1e679cd35dc2e524fbeb31891d85e497821ce.tar.gz
hercules-47a1e679cd35dc2e524fbeb31891d85e497821ce.tar.bz2
hercules-47a1e679cd35dc2e524fbeb31891d85e497821ce.tar.xz
hercules-47a1e679cd35dc2e524fbeb31891d85e497821ce.zip
Merge pull request #1757 from HerculesWS/storagefix
Fix a race condition when saving the storage on logout
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 5a5a0d7f2..f6556073e 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -288,16 +288,12 @@ void char_set_char_offline(int char_id, int account_id)
else
{
struct mmo_charstatus* cp = (struct mmo_charstatus*) idb_get(chr->char_db_,char_id);
- struct storage_data *stor = (struct storage_data *) idb_get(inter_storage->account_storage, account_id);
inter_guild->CharOffline(char_id, cp?cp->guild_id:-1);
if (cp)
idb_remove(chr->char_db_,char_id);
- if (stor) /* Remove inter-storage data. */
- inter_storage->delete_account_storage(account_id);
-
if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `online`='0' WHERE `char_id`='%d' LIMIT 1", char_db, char_id) )
Sql_ShowDebug(inter->sql_handle);
}