diff options
author | shennetsind <ind@henn.et> | 2013-05-04 20:36:29 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-04 20:36:29 -0300 |
commit | 3bfadf4d2329da54f2097e1f0fafba371347465f (patch) | |
tree | 6164b506bb8591979c77d459ad3b7d6f521d424b /src/common | |
parent | 18b1965ce16909613f0a53515d40553742082ce2 (diff) | |
download | hercules-3bfadf4d2329da54f2097e1f0fafba371347465f.tar.gz hercules-3bfadf4d2329da54f2097e1f0fafba371347465f.tar.bz2 hercules-3bfadf4d2329da54f2097e1f0fafba371347465f.tar.xz hercules-3bfadf4d2329da54f2097e1f0fafba371347465f.zip |
Mapreg saving overhaul
Server only saves variables that were changed, not all of them. Special Thanks to Yommy <3~!
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/console.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/common/console.c b/src/common/console.c index c228ab790..248dd7b45 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -337,15 +337,16 @@ int console_parse_timer(int tid, unsigned int tick, int id, intptr_t data) { return 0; } void console_parse_final(void) { - InterlockedDecrement(&console->ptstate); - racond_signal(console->ptcond); - - /* wait for thread to close */ - rathread_wait(console->pthread, NULL); - - racond_destroy(console->ptcond); - ramutex_destroy(console->ptmutex); - + if( console->ptstate ) { + InterlockedDecrement(&console->ptstate); + racond_signal(console->ptcond); + + /* wait for thread to close */ + rathread_wait(console->pthread, NULL); + + racond_destroy(console->ptcond); + ramutex_destroy(console->ptmutex); + } } void console_parse_init(void) { cinput.count = 0; |