Skip to content

Commit

Permalink
net: coap: add TOO_MANY_REQUESTS to return codes
Browse files Browse the repository at this point in the history
Add COAP_RESPONSE_CODE_TOO_MANY_REQUESTS to coap_header_get_code(). CoAP
4.29 response code for "Too many requests" is defined in coap.h but was
missing from the list of cases, resulting in a 0 being returned instead
of the proper code.

Signed-off-by: Mike Szczys <[email protected]>
  • Loading branch information
szczys authored and henrikbrixandersen committed Feb 13, 2024
1 parent a8af622 commit e72ac4b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions subsys/net/lib/coap/coap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,7 @@ uint8_t coap_header_get_code(const struct coap_packet *cpkt)
case COAP_RESPONSE_CODE_REQUEST_TOO_LARGE:
case COAP_RESPONSE_CODE_UNSUPPORTED_CONTENT_FORMAT:
case COAP_RESPONSE_CODE_UNPROCESSABLE_ENTITY:
case COAP_RESPONSE_CODE_TOO_MANY_REQUESTS:
case COAP_RESPONSE_CODE_INTERNAL_ERROR:
case COAP_RESPONSE_CODE_NOT_IMPLEMENTED:
case COAP_RESPONSE_CODE_BAD_GATEWAY:
Expand Down

0 comments on commit e72ac4b

Please sign in to comment.