Skip to content

Commit

Permalink
nanocoap_sock: use coap_get_code_raw()
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Oct 20, 2023
1 parent f5716b0 commit 8a0a93a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/net/application_layer/nanocoap/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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? */
Expand All @@ -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
Expand Down

0 comments on commit 8a0a93a

Please sign in to comment.