From 3bfadf4d2329da54f2097e1f0fafba371347465f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 4 May 2013 20:36:29 -0300 Subject: Mapreg saving overhaul Server only saves variables that were changed, not all of them. Special Thanks to Yommy <3~! Signed-off-by: shennetsind --- src/common/console.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/common') 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; -- cgit v1.2.3-70-g09d2