meier/master #13
@ -305,10 +305,6 @@ ReturnValue_t UartComIF::requestReceiveMessage(CookieIF *cookie, size_t requestL
|
|||||||
std::string deviceFile;
|
std::string deviceFile;
|
||||||
UartDeviceMapIter uartDeviceMapIter;
|
UartDeviceMapIter uartDeviceMapIter;
|
||||||
|
|
||||||
if(requestLen == 0) {
|
|
||||||
return RETURN_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
UartCookie* uartCookie = dynamic_cast<UartCookie*>(cookie);
|
UartCookie* uartCookie = dynamic_cast<UartCookie*>(cookie);
|
||||||
if(uartCookie == nullptr) {
|
if(uartCookie == nullptr) {
|
||||||
sif::debug << "UartComIF::requestReceiveMessage: Invalid Uart Cookie!" << std::endl;
|
sif::debug << "UartComIF::requestReceiveMessage: Invalid Uart Cookie!" << std::endl;
|
||||||
@ -318,6 +314,11 @@ ReturnValue_t UartComIF::requestReceiveMessage(CookieIF *cookie, size_t requestL
|
|||||||
UartModes uartMode = uartCookie->getUartMode();
|
UartModes uartMode = uartCookie->getUartMode();
|
||||||
deviceFile = uartCookie->getDeviceFile();
|
deviceFile = uartCookie->getDeviceFile();
|
||||||
uartDeviceMapIter = uartDeviceMap.find(deviceFile);
|
uartDeviceMapIter = uartDeviceMap.find(deviceFile);
|
||||||
|
|
||||||
|
if(uartMode == UartModes::NON_CANONICAL and requestLen == 0) {
|
||||||
|
return RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (uartDeviceMapIter == uartDeviceMap.end()) {
|
if (uartDeviceMapIter == uartDeviceMap.end()) {
|
||||||
sif::debug << "UartComIF::requestReceiveMessage: Device file " << deviceFile
|
sif::debug << "UartComIF::requestReceiveMessage: Device file " << deviceFile
|
||||||
<< " not in uart map" << std::endl;
|
<< " not in uart map" << std::endl;
|
||||||
@ -370,11 +371,6 @@ ReturnValue_t UartComIF::handleCanonicalRead(UartCookie& uartCookie, UartDeviceM
|
|||||||
if (bytesRead < 0) {
|
if (bytesRead < 0) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
else if (bytesRead != static_cast<int>(requestLen)) {
|
|
||||||
sif::debug << "UartComIF::requestReceiveMessage: Only read " << bytesRead <<
|
|
||||||
" of " << requestLen << " bytes" << std::endl;
|
|
||||||
return RETURN_FAILED;
|
|
||||||
}
|
|
||||||
else if(bytesRead > 0) {
|
else if(bytesRead > 0) {
|
||||||
iter->second.replyLen += bytesRead;
|
iter->second.replyLen += bytesRead;
|
||||||
bufferPtr += bytesRead;
|
bufferPtr += bytesRead;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user