Skip to content

Commit

Permalink
gcoap_fileserver: 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 8a0a93a commit 7a425c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/net/application_layer/gcoap/fileserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static ssize_t _delete_file(coap_pkt_t *pdu, uint8_t *buf, size_t len,
static ssize_t gcoap_fileserver_file_handler(coap_pkt_t *pdu, uint8_t *buf, size_t len,
struct requestdata *request)
{
switch (coap_get_code(pdu)) {
switch (coap_get_code_raw(pdu)) {
case COAP_METHOD_GET:
return _get_file(pdu, buf, len, request);
#if IS_USED(MODULE_GCOAP_FILESERVER_PUT)
Expand Down Expand Up @@ -549,7 +549,7 @@ static ssize_t gcoap_fileserver_directory_handler(coap_pkt_t *pdu, uint8_t *buf,
struct requestdata *request,
const char *root, const char* resource_dir)
{
switch (coap_get_code(pdu)) {
switch (coap_get_code_raw(pdu)) {
case COAP_METHOD_GET:
return _get_directory(pdu, buf, len, request, root, resource_dir);
#if IS_USED(MODULE_GCOAP_FILESERVER_PUT)
Expand Down

0 comments on commit 7a425c2

Please sign in to comment.