Commit 4d6f878d authored by Alexandru Tiniuc's avatar Alexandru Tiniuc Committed by Kishen Maloor

coap:Fix coap_get/set_header_content_format()

Signed-off-by: Alexandru Tiniuc's avatarAlexandru Tiniuc <a.tiniuc@cascoda.com>
parent 3d49fb77
......@@ -1270,7 +1270,7 @@ coap_set_token(void *packet, const uint8_t *token, size_t token_len)
}
int
coap_get_header_content_format(void *packet, unsigned int *format)
coap_get_header_content_format(void *packet, oc_content_format_t *format)
{
coap_packet_t *const coap_pkt = (coap_packet_t *)packet;
......@@ -1282,11 +1282,11 @@ coap_get_header_content_format(void *packet, unsigned int *format)
}
int
coap_set_header_content_format(void *packet, unsigned int format)
coap_set_header_content_format(void *packet, oc_content_format_t format)
{
coap_packet_t *const coap_pkt = (coap_packet_t *)packet;
coap_pkt->content_format = (uint16_t)format;
coap_pkt->content_format = format;
SET_OPTION(coap_pkt, COAP_OPTION_CONTENT_FORMAT);
return 1;
}
......
......@@ -58,6 +58,7 @@
#include "port/oc_connectivity.h"
#include "port/oc_log.h"
#include "port/oc_random.h"
#include "oc_ri.h"
#ifdef __cplusplus
extern "C"
......@@ -240,8 +241,8 @@ int coap_set_status_code(void *packet, unsigned int code);
int coap_set_token(void *packet, const uint8_t *token, size_t token_len);
int coap_get_header_content_format(void *packet, unsigned int *format);
int coap_set_header_content_format(void *packet, unsigned int format);
int coap_get_header_content_format(void *packet, oc_content_format_t *format);
int coap_set_header_content_format(void *packet, oc_content_format_t format);
int coap_get_header_accept(void *packet, unsigned int *accept);
int coap_set_header_accept(void *packet, unsigned int accept);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment