diff options
author | Kevin Rocard <kevinx.rocard@intel.com> | 2014-04-25 15:11:12 +0200 |
---|---|---|
committer | Mattijs Korpershoek <mattijsx.korpershoek@intel.com> | 2014-06-25 10:52:29 +0200 |
commit | e874c2575c1203648e71426cd34f747cbd34b2b4 (patch) | |
tree | e0d57fb36c4c77aeaca67f0f8b06d527fb82afbc /remote-process | |
parent | ef8d727ca0eb346af951d15d84ba6f2b9564adf5 (diff) | |
download | external_parameter-framework-e874c2575c1203648e71426cd34f747cbd34b2b4.zip external_parameter-framework-e874c2575c1203648e71426cd34f747cbd34b2b4.tar.gz external_parameter-framework-e874c2575c1203648e71426cd34f747cbd34b2b4.tar.bz2 |
remote-proccessor detect partial message reception
BZ: 190038
Client disconnection during message reception is normal if no part of the
message as been receive yet.
Client disconnection in the middle of a packet reception is not normal
but was not differentiated from the behaviour described above.
Do not consider client disconnection on first read as an error.
Consider it as an error on the followings.
Change-Id: I34b50ba0af800f9e1fcdb51996b1b2f02a23cb3f
Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
Diffstat (limited to 'remote-process')
-rw-r--r-- | remote-process/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/remote-process/main.cpp b/remote-process/main.cpp index 85514ca..bcf825b 100644 --- a/remote-process/main.cpp +++ b/remote-process/main.cpp @@ -100,7 +100,8 @@ bool sendAndDisplayCommand(CConnectionSocket &connectionSocket, CRequestMessage { string strError; - if (!requestMessage.serialize(&connectionSocket, true, strError)) { + if (requestMessage.serialize(&connectionSocket, true, strError) + != CRequestMessage::success) { cerr << "Unable to send command to target: " << strError << endl; return false; @@ -108,7 +109,8 @@ bool sendAndDisplayCommand(CConnectionSocket &connectionSocket, CRequestMessage ///// Get answer CAnswerMessage answerMessage; - if (!answerMessage.serialize(&connectionSocket, false, strError)) { + if (answerMessage.serialize(&connectionSocket, false, strError) + != CRequestMessage::success) { cerr << "Unable to received answer from target: " << strError << endl; return false; |