Skip to content
Commit 808f79d8 authored by Sibert Declercq's avatar Sibert Declercq Committed by Henrik Brix Andersen
Browse files

net: coap: CoAP observe age now correctly wraps around



Fixes two bugs:
* When a notify is executed before any observers are added, the age is
incremented from 0 to 1. When an observer is registered, the age is not 0
as expected, causing the age to be 1 instead of the expected 2
* The check if a message is newer than the last received one is described
in RFC7641, section 3.4. Simply incrementing age will not comply to what
the RFC describes once the value wraps around. This is now fixed

Signed-off-by: default avatarSibert Declercq <sibert.declercq@basalte.be>
parent a1188a96
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment