From 893b5626e1d51c2da7f73e2d1caf976cbb9abc95 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Tue, 28 Apr 2020 11:49:37 +0100 Subject: [PATCH] Report on old usage of COAP_RUN_BLOCK and COAP_RUN_NO_BLOCK Give a hint in the compiler error message about using deprecated COAP_RUN_BLOCK and COAP_RUN_NO_BLOCK and what they are replaced with. --- include/coap2/net.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/coap2/net.h b/include/coap2/net.h index be28fa34..cc3e694f 100644 --- a/include/coap2/net.h +++ b/include/coap2/net.h @@ -732,6 +732,9 @@ coap_join_mcast_group(coap_context_t *ctx, const char *groupname); #define COAP_IO_WAIT 0 #define COAP_IO_NO_WAIT ((uint32_t)-1) +/* Old definitions which may be hanging around in old code - be helpful! */ +#define COAP_RUN_NONBLOCK COAP_RUN_NONBLOCK_deprecated_use_COAP_IO_NO_WAIT +#define COAP_RUN_BLOCK COAP_RUN_BLOCK_deprecated_use_COAP_IO_WAIT /** * The main I/O processing function. All pending network I/O is completed,