From d9aafbdb56ece490e7ba07be64cfb3ac330904a3 Mon Sep 17 00:00:00 2001 From: Joohyun Kim Date: Mon, 27 May 2013 16:24:44 +0900 Subject: [PATCH] Fix initialize issue on SerialPort Change-Id: I82faa31e2e3433eaccbfe90885801e976bd99c2f Signed-off-by: Joohyun Kim --- src/io/FIo_SerialPortImpl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/io/FIo_SerialPortImpl.cpp b/src/io/FIo_SerialPortImpl.cpp index a51f730..cedd85e 100644 --- a/src/io/FIo_SerialPortImpl.cpp +++ b/src/io/FIo_SerialPortImpl.cpp @@ -260,6 +260,7 @@ _SerialPortImpl::OnDataReceived(const ArrayList& data) pBuffer = (ByteBuffer*)data.GetAt(SERIAL_DATA_BODY); if (pBuffer != null) { + pBuffer->Flip(); ArrayList* pData = const_cast(&data); pData->Remove(*pBuffer); _SerialPortEventArg* pEventArg= new (std::nothrow) _SerialPortEventArg(pBuffer); @@ -272,7 +273,7 @@ _SerialPortImpl::OnDataReceived(const ArrayList& data) } else if (pCommand->Equals(SERIAL_COMMAND_ERROR, true)) { - _SerialPortEventArg* pEventArg= new (std::nothrow) _SerialPortEventArg(pBuffer); + _SerialPortEventArg* pEventArg= new (std::nothrow) _SerialPortEventArg(null); if(pEventArg != null) { SysLog(NID_IO, "_SerialPortImpl::OnDataReceived Event Fire"); -- 2.7.4