From d711300051caff6e41a7bb4d95a606523a15b3fe Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 13 Sep 2012 18:30:53 +0200 Subject: [PATCH] Adjusted sanity check --- src/comm/MAVLinkProtocol.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comm/MAVLinkProtocol.cc b/src/comm/MAVLinkProtocol.cc index 4c410f4e7..b2ac86f51 100644 --- a/src/comm/MAVLinkProtocol.cc +++ b/src/comm/MAVLinkProtocol.cc @@ -297,7 +297,7 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) // Write message to buffer int len = mavlink_msg_to_send_buffer(buf+sizeof(quint64), &message); QByteArray b((const char*)buf, len); - if(m_logfile->write(b) < static_cast(MAVLINK_MAX_PACKET_LEN+sizeof(quint64))) + if(m_logfile->write(b) != len) { emit protocolStatusMessage(tr("MAVLink Logging failed"), tr("Could not write to file %1, disabling logging.").arg(m_logfile->fileName())); // Stop logging -- 2.22.0