Fix to return proper errors in case of sync-read failures 32/78432/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Tue, 5 Jul 2016 12:00:57 +0000 (21:00 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Tue, 5 Jul 2016 12:00:57 +0000 (21:00 +0900)
Change-Id: Ie53157c3e7ff84194ba636de130a255bf4ae805f
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/ClientRequest.cpp

index d3aefec..e625bf0 100644 (file)
@@ -75,7 +75,7 @@ bool ctx::ClientRequest::reply(int error)
 bool ctx::ClientRequest::reply(int error, ctx::Json& requestResult)
 {
        IF_FAIL_RETURN(__invocation, true);
-       IF_FAIL_RETURN(__type != REQ_READ_SYNC, true);
+       IF_FAIL_RETURN(error != ERR_NONE || __type != REQ_READ_SYNC, true);
 
        std::string result = requestResult.str();
        IF_FAIL_RETURN(!result.empty(), false);