diff --git a/udphandler.cpp b/udphandler.cpp index 7e88181..3911292 100644 --- a/udphandler.cpp +++ b/udphandler.cpp @@ -1099,10 +1099,6 @@ void udpBase::dataReceived(QByteArray r) // This is response to OUR request so increment counter pingSendSeq++; } - else { - // Not sure what to do here, need to spend more time with the protocol but will try sending ping with same seq next time. - //qInfo(logUdp()) << this->metaObject()->className() << "Received out-of-sequence ping response. Sent:" << pingSendSeq << " received " << in->seq; - } } else { qInfo(logUdp()) << this->metaObject()->className() << "Unhandled response to ping. I have never seen this! 0x10=" << r[16]; diff --git a/udpserver.cpp b/udpserver.cpp index 4bdeede..d67c23d 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -208,15 +208,9 @@ void udpServer::controlReceived() sendPing(&controlClients, current, in->seq, true); } else if (in->reply == 0x01) { - if (in->seq == current->pingSeq || in->seq == current->pingSeq - 1) - { - // A Reply to our ping! - if (in->seq == current->pingSeq) { - current->pingSeq++; - } - else { - qInfo(logUdpServer()) << current->ipAddress.toString() << ": got out of sequence ping reply. Got: " << in->seq << " expecting: " << current->pingSeq; - } + // A Reply to our ping! + if (in->seq == current->pingSeq) { + current->pingSeq++; } } } @@ -485,15 +479,9 @@ void udpServer::civReceived() sendPing(&civClients, current, in->seq, true); } else if (in->reply == 0x01) { - if (in->seq == current->pingSeq || in->seq == current->pingSeq - 1) - { - // A Reply to our ping! - if (in->seq == current->pingSeq) { - current->pingSeq++; - } - else { - qInfo(logUdpServer()) << current->ipAddress.toString() << ": got out of sequence ping reply. Got: " << in->seq << " expecting: " << current->pingSeq; - } + // A Reply to our ping! + if (in->seq == current->pingSeq) { + current->pingSeq++; } } } @@ -632,15 +620,9 @@ void udpServer::audioReceived() sendPing(&audioClients, current, in->seq, true); } else if (in->reply == 0x01) { - if (in->seq == current->pingSeq || in->seq == current->pingSeq - 1) - { - // A Reply to our ping! - if (in->seq == current->pingSeq) { - current->pingSeq++; - } - else { - qInfo(logUdpServer()) << current->ipAddress.toString() << ": got out of sequence ping reply. Got: " << in->seq << " expecting: " << current->pingSeq; - } + // A Reply to our ping! + if (in->seq == current->pingSeq) { + current->pingSeq++; } } }