Repository: cloudstack
Updated Branches:
  refs/heads/master 9866c648e -> 0ca3b4a4e


Fixed coverity reported concurrency issue

Signed-off-by: Santhosh Edukulla <santhosh.eduku...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0ca3b4a4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0ca3b4a4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0ca3b4a4

Branch: refs/heads/master
Commit: 0ca3b4a4e4786676e13ec67c2cbc17b530917765
Parents: 9866c64
Author: Santhosh Edukulla <santhosh.eduku...@gmail.com>
Authored: Tue Aug 5 17:28:37 2014 +0530
Committer: Santhosh Edukulla <santhosh.eduku...@gmail.com>
Committed: Wed Aug 6 10:15:39 2014 +0530

----------------------------------------------------------------------
 .../org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0ca3b4a4/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java
----------------------------------------------------------------------
diff --git 
a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java 
b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java
index 7ccd8bb..a3dea79 100644
--- 
a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java
+++ 
b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java
@@ -193,9 +193,8 @@ public class RpcClientCallImpl implements RpcClientCall {
 
     @SuppressWarnings("unchecked")
     public void complete(String result) {
-        _responseResult = result;
-
         synchronized (_responseLock) {
+            _responseResult = result;
             _responseDone = true;
             _responseLock.notifyAll();
         }
@@ -213,11 +212,10 @@ public class RpcClientCallImpl implements RpcClientCall {
     }
 
     public void complete(RpcException e) {
-        _responseResult = e;
 
         synchronized (_responseLock) {
+            _responseResult = e;
             _responseDone = true;
-
             _responseLock.notifyAll();
         }
 

Reply via email to