From 8a0a93a76811d02a2c8c6067d571868a80aa7f66 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 20 Oct 2023 15:15:08 +0200 Subject: [PATCH] nanocoap_sock: use coap_get_code_raw() --- sys/net/application_layer/nanocoap/sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/application_layer/nanocoap/sock.c b/sys/net/application_layer/nanocoap/sock.c index 05a5a838f9adf..83338df5e6a80 100644 --- a/sys/net/application_layer/nanocoap/sock.c +++ b/sys/net/application_layer/nanocoap/sock.c @@ -284,7 +284,7 @@ ssize_t nanocoap_sock_request_cb(nanocoap_sock_t *sock, coap_pkt_t *pkt, } state = STATE_RESPONSE_OK; - DEBUG("nanocoap: response code=%i\n", coap_get_code(pkt)); + DEBUG("nanocoap: response code=%i\n", coap_get_code_decimal(pkt)); switch (coap_get_type(pkt)) { case COAP_TYPE_RST: /* TODO: handle different? */ @@ -294,7 +294,7 @@ ssize_t nanocoap_sock_request_cb(nanocoap_sock_t *sock, coap_pkt_t *pkt, _send_ack(sock, pkt); /* fall-through */ case COAP_TYPE_ACK: - if (cb && coap_get_code(pkt) == COAP_CODE_EMPTY) { + if (cb && coap_get_code_raw(pkt) == COAP_CODE_EMPTY) { /* empty ACK, wait for separate response */ state = STATE_RESPONSE_RCVD; deadline = _deadline_from_interval(CONFIG_COAP_SEPARATE_RESPONSE_TIMEOUT_MS