From 5ecc164caa8a82bc1218bd49d367bda5e100388b Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Fri, 9 Mar 2018 17:39:01 +0000 Subject: [PATCH] coap_io.c: Include coap_check_notify() in the coap_write() logic So that the application does not need to call in in the main i/o loop --- src/coap_io.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coap_io.c b/src/coap_io.c index e6fb9093..f202731e 100644 --- a/src/coap_io.c +++ b/src/coap_io.c @@ -52,6 +52,7 @@ #include "coap_io.h" #include "pdu.h" #include "utlist.h" +#include "resource.h" #if !defined(WITH_CONTIKI) && !defined(WITH_LWIP) /* define generic PKTINFO for IPv4 */ @@ -1051,6 +1052,9 @@ coap_write(coap_context_t *ctx, *num_sockets = 0; + /* Check to see if we need to send off any Observe requests */ + coap_check_notify(ctx); + if (ctx->session_timeout > 0) session_timeout = ctx->session_timeout * COAP_TICKS_PER_SECOND; else