From b09e5c8304a3e0c8425062d6cbdb03238fc37ba2 Mon Sep 17 00:00:00 2001 From: Keebum Kim Date: Sat, 12 Jan 2013 15:16:10 +0900 Subject: [PATCH] Modify MsgHandle::write for prevent. --- proxy/MsgHandleControl.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/proxy/MsgHandleControl.cpp b/proxy/MsgHandleControl.cpp index 5e9bc14..756ce37 100755 --- a/proxy/MsgHandleControl.cpp +++ b/proxy/MsgHandleControl.cpp @@ -119,17 +119,13 @@ void MsgHandle::write(const char *pCmdData, int cmdSize, char **ppEvent) if (ret < 0) THROW(MsgException::IPC_ERROR, "IPC write error"); - while(1) - { - // Receive Result from MSG FW - read(ppEvent); + // Receive Result from MSG FW + read(ppEvent); - if(!CheckEventData(*ppEvent)) { - delete [] (*ppEvent); - } else { - break; - } + if (*ppEvent == NULL) { + THROW(MsgException::INVALID_RESULT, "event is NULL"); } + } -- 2.7.4