fixed merge conflicts
This commit is contained in:
@ -192,8 +192,6 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort,
|
||||
memcpy(replyBuffer, reply->data, reply->length);
|
||||
expectedSize = expectedSize - reply->length;
|
||||
bytesRead += reply->length;
|
||||
sif::debug << "CspComIF::cspTransfer: Received csp packet has data field with length "
|
||||
<< reply->length << std::endl;
|
||||
csp_buffer_free(reply);
|
||||
while (expectedSize > 0) {
|
||||
reply = csp_read(conn, timeout_ms);
|
||||
@ -211,13 +209,12 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort,
|
||||
memcpy(replyBuffer + bytesRead, reply->data, reply->length);
|
||||
expectedSize = expectedSize - reply->length;
|
||||
bytesRead += reply->length;
|
||||
sif::debug << "CspComIF::cspTransfer: Received csp packet has data field with length "
|
||||
<< reply->length << std::endl;
|
||||
csp_buffer_free(reply);
|
||||
}
|
||||
|
||||
if(expectedSize != 0){
|
||||
sif::error << "CspComIF::cspTransfer: Received more bytes than requested" << std::endl;
|
||||
sif::debug << "CspComIF::cspTransfer: Received bytes: " << bytesRead << std::endl;
|
||||
csp_close(conn);
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user