diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-04 12:03:47 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-12 15:41:54 +0200 |
commit | cae4f72585f06023efc28e00d4341c87864e5961 (patch) | |
tree | b94719a9eee21d0db5762be753b5d747a372a54f | |
parent | 5ce475e78e8ee8e18bf2436bc2f3f1996ee4bfc2 (diff) |
Fix calculation of MAX_TRANSMIT_SPAN
Fixed a wrong closing parenthesis location, based on the RFC.
Change-Id: I3aa369a66411bbef1ca6f7b8b8c72fad9281c60c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/coap/qcoapprotocol.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/coap/qcoapprotocol.cpp b/src/coap/qcoapprotocol.cpp index 3a6f3ca..e5b7895 100644 --- a/src/coap/qcoapprotocol.cpp +++ b/src/coap/qcoapprotocol.cpp @@ -954,7 +954,9 @@ quint16 QCoapProtocol::blockSize() const */ uint QCoapProtocol::maximumTransmitSpan() const { - return static_cast<uint>(ackTimeout() * (1u << (maximumRetransmitCount() - 1)) * ackRandomFactor()); + return static_cast<uint>(ackTimeout() + * ((1u << maximumRetransmitCount()) - 1) + * ackRandomFactor()); } /*! |