Browse code

fix db locking under win32 (bb#265)

git-svn: trunk@2685

Tomasz Kojm authored on 2007/02/09 08:46:37
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Fri Feb  9 00:41:31 CET 2007 (tk)
2
+---------------------------------
3
+  * libclamav/lockdb.c: fix db locking under win32 (bb#265)
4
+
1 5
 Thu Feb  8 23:47:17 CET 2007 (acab)
2 6
 -----------------------------------
3 7
   * libclamav/mew.c: fixed warnings and portability issues
... ...
@@ -231,7 +231,7 @@ static int cli_lockdb(const char *dbdirpath, int wait, int writelock)
231 231
 	umask(old_mask);
232 232
     }
233 233
 #else
234
-    if(!lock->lock_fd) {
234
+    if(lock->lock_fd != -1) {
235 235
 	/* Create a security descriptor which allows any process to acquire the Mutex */
236 236
 	InitializeSecurityDescriptor(&sdDesc, SECURITY_DESCRIPTOR_REVISION);
237 237
 	SetSecurityDescriptorDacl(&sdDesc, TRUE, NULL, FALSE);