about summary refs log tree commit diff
path: root/src/base
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2012-07-19 10:01:57 +0200
committeroy <Tom_Adams@web.de>2013-02-24 17:42:20 +0100
commit6c8e097bb25d343883dd292f0db2de684a35fc86 (patch)
tree1a3807f99fd450aff35694ae79b361c27bfa7b5d /src/base
parent521eaf038baeefe5aca026ba077c0ce7f72310b7 (diff)
downloadzcatch-6c8e097bb25d343883dd292f0db2de684a35fc86.tar.gz
zcatch-6c8e097bb25d343883dd292f0db2de684a35fc86.zip
fixed try_lock on windows
Diffstat (limited to 'src/base')
-rw-r--r--src/base/system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base/system.c b/src/base/system.c
index 1c4d3a48..f4ce8b37 100644
--- a/src/base/system.c
+++ b/src/base/system.c
@@ -477,7 +477,7 @@ int lock_try(LOCK lock)
 #if defined(CONF_FAMILY_UNIX)
 	return pthread_mutex_trylock((LOCKINTERNAL *)lock);
 #elif defined(CONF_FAMILY_WINDOWS)
-	return TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
+	return !TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
 #else
 	#error not implemented on this platform
 #endif