manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1651921 - in /manifoldcf/trunk: CHANGES.txt framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java
Date Thu, 15 Jan 2015 01:11:07 GMT
Author: kwright
Date: Thu Jan 15 01:11:07 2015
New Revision: 1651921

URL: http://svn.apache.org/r1651921
Log:
Fix for CONNECTORS-1145.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1651921&r1=1651920&r2=1651921&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Jan 15 01:11:07 2015
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.1-dev =====================
 
+CONNECTORS-1145: File locking hangs when saving output connection.
+(Andreas Baumann, Michael Wilken, Karl Wright)
+
 CONNECTORS-1140: Improve Japanese documentation.
 (KOIZUMI Satoru)
 

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java?rev=1651921&r1=1651920&r2=1651921&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java
Thu Jan 15 01:11:07 2015
@@ -120,13 +120,14 @@ public class FileLockObject extends Lock
       try
       {
         int status = readFile();
-        if (status >= STATUS_WRITELOCKED)
+        if (status == STATUS_WRITELOCKED || status > 0)
         {
           throw new LockException(LOCKEDANOTHERJVM);
         }
         if (status == 0)
           status = STATUS_WRITELOCKED;
-        writeFile(status-1);
+        status--;
+        writeFile(status);
       }
       finally
       {



Mime
View raw message