From edab7b40c4eac8c393a345adeec93f68d2ec96ca Mon Sep 17 00:00:00 2001 From: chrysn Date: Sun, 17 Nov 2013 12:17:02 +0100 Subject: [PATCH] drop assertion on not wrapping it is the idea of the relative-timestamps branch that such asserts are not necessary any more, and that if timestamps wrap, they just may. rephrased expression for determining t for clarity. --- net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net.c b/net.c index d9854ec2..d23c8719 100644 --- a/net.c +++ b/net.c @@ -547,9 +547,8 @@ coap_send_confirmed(coap_context_t *context, node->t = node->timeout; context->sendqueue_basetime = now; } else { - assert(context->sendqueue_basetime <= now); /* make node->t relative to context->sendqueue_basetime */ - node->t = now + node->timeout - context->sendqueue_basetime; + node->t = (now - context->sendqueue_basetime) + node->timeout; } coap_insert_node(&context->sendqueue, node);