Skip to content

Commit a8fc0a2

Browse files
committed
gcoap_fileserver: use coap_get_code_raw()
1 parent a5cc48a commit a8fc0a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sys/net/application_layer/gcoap/fileserver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ static ssize_t _delete_file(coap_pkt_t *pdu, uint8_t *buf, size_t len,
415415
static ssize_t gcoap_fileserver_file_handler(coap_pkt_t *pdu, uint8_t *buf, size_t len,
416416
struct requestdata *request)
417417
{
418-
switch (coap_get_code(pdu)) {
418+
switch (coap_get_code_raw(pdu)) {
419419
case COAP_METHOD_GET:
420420
return _get_file(pdu, buf, len, request);
421421
#if IS_USED(MODULE_GCOAP_FILESERVER_PUT)
@@ -549,7 +549,7 @@ static ssize_t gcoap_fileserver_directory_handler(coap_pkt_t *pdu, uint8_t *buf,
549549
struct requestdata *request,
550550
const char *root, const char* resource_dir)
551551
{
552-
switch (coap_get_code(pdu)) {
552+
switch (coap_get_code_raw(pdu)) {
553553
case COAP_METHOD_GET:
554554
return _get_directory(pdu, buf, len, request, root, resource_dir);
555555
#if IS_USED(MODULE_GCOAP_FILESERVER_PUT)

0 commit comments

Comments
 (0)