Commit 07ee66c6 authored by Kishen Maloor's avatar Kishen Maloor

Merge branch 'gaborone+' into hollywood

Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parents 507da634 a268abe9
Pipeline #1131 passed with stage
in 4 minutes and 47 seconds
...@@ -76,9 +76,7 @@ oc_blockwise_free_buffer(oc_list_t list, struct oc_memb *pool, ...@@ -76,9 +76,7 @@ oc_blockwise_free_buffer(oc_list_t list, struct oc_memb *pool,
return; return;
} }
if (oc_string_len(buffer->uri_query) > 0) { oc_free_string(&buffer->uri_query);
oc_free_string(&buffer->uri_query);
}
oc_free_string(&buffer->href); oc_free_string(&buffer->href);
oc_list_remove(list, buffer); oc_list_remove(list, buffer);
#ifdef OC_DYNAMIC_ALLOCATION #ifdef OC_DYNAMIC_ALLOCATION
......
...@@ -134,9 +134,9 @@ prepare_coap_request(oc_client_cb_t *cb) ...@@ -134,9 +134,9 @@ prepare_coap_request(oc_client_cb_t *cb)
return false; return false;
} }
#ifndef OC_BLOCK_WISE
oc_rep_new(transaction->message->data + COAP_MAX_HEADER_SIZE, OC_BLOCK_SIZE); oc_rep_new(transaction->message->data + COAP_MAX_HEADER_SIZE, OC_BLOCK_SIZE);
#else /* !OC_BLOCK_WISE */
#ifdef OC_BLOCK_WISE
if (cb->method == OC_PUT || cb->method == OC_POST) { if (cb->method == OC_PUT || cb->method == OC_POST) {
request_buffer = oc_blockwise_alloc_request_buffer( request_buffer = oc_blockwise_alloc_request_buffer(
oc_string(cb->uri) + 1, oc_string_len(cb->uri) - 1, &cb->endpoint, oc_string(cb->uri) + 1, oc_string_len(cb->uri) - 1, &cb->endpoint,
...@@ -603,9 +603,8 @@ oc_do_site_local_ipv6_discovery(const char *rt, oc_discovery_handler_t handler, ...@@ -603,9 +603,8 @@ oc_do_site_local_ipv6_discovery(const char *rt, oc_discovery_handler_t handler,
} }
bool status = multi_scope_ipv6_discovery(NULL, 0x05, oc_string(uri_query), bool status = multi_scope_ipv6_discovery(NULL, 0x05, oc_string(uri_query),
handlers, user_data); handlers, user_data);
if (oc_string_len(uri_query) > 0) { oc_free_string(&uri_query);
oc_free_string(&uri_query);
}
return status; return status;
} }
...@@ -633,9 +632,8 @@ oc_do_realm_local_ipv6_discovery(const char *rt, oc_discovery_handler_t handler, ...@@ -633,9 +632,8 @@ oc_do_realm_local_ipv6_discovery(const char *rt, oc_discovery_handler_t handler,
} }
bool status = multi_scope_ipv6_discovery(NULL, 0x03, oc_string(uri_query), bool status = multi_scope_ipv6_discovery(NULL, 0x03, oc_string(uri_query),
handlers, user_data); handlers, user_data);
if (oc_string_len(uri_query) > 0) { oc_free_string(&uri_query);
oc_free_string(&uri_query);
}
return status; return status;
} }
...@@ -657,9 +655,8 @@ oc_do_ip_discovery(const char *rt, oc_discovery_handler_t handler, ...@@ -657,9 +655,8 @@ oc_do_ip_discovery(const char *rt, oc_discovery_handler_t handler,
#endif #endif
bool status = multi_scope_ipv6_discovery(cb4, 0x02, oc_string(uri_query), bool status = multi_scope_ipv6_discovery(cb4, 0x02, oc_string(uri_query),
handlers, user_data); handlers, user_data);
if (oc_string_len(uri_query) > 0) { oc_free_string(&uri_query);
oc_free_string(&uri_query);
}
return status; return status;
} }
...@@ -700,9 +697,8 @@ oc_do_ip_discovery_at_endpoint(const char *rt, oc_discovery_handler_t handler, ...@@ -700,9 +697,8 @@ oc_do_ip_discovery_at_endpoint(const char *rt, oc_discovery_handler_t handler,
} }
bool status = dispatch_ip_discovery(NULL, oc_string(uri_query), handlers, bool status = dispatch_ip_discovery(NULL, oc_string(uri_query), handlers,
endpoint, user_data); endpoint, user_data);
if (oc_string_len(uri_query) > 0) { oc_free_string(&uri_query);
oc_free_string(&uri_query);
}
return status; return status;
} }
......
...@@ -77,12 +77,9 @@ oc_core_free_device_info_properties(oc_device_info_t *oc_device_info_item) ...@@ -77,12 +77,9 @@ oc_core_free_device_info_properties(oc_device_info_t *oc_device_info_item)
{ {
if (oc_device_info_item) { if (oc_device_info_item) {
if (oc_string_len(oc_device_info_item->name)) oc_free_string(&(oc_device_info_item->name));
oc_free_string(&(oc_device_info_item->name)); oc_free_string(&(oc_device_info_item->icv));
if (oc_string_len(oc_device_info_item->icv)) oc_free_string(&(oc_device_info_item->dmv));
oc_free_string(&(oc_device_info_item->icv));
if (oc_string_len(oc_device_info_item->dmv))
oc_free_string(&(oc_device_info_item->dmv));
} }
} }
...@@ -90,8 +87,7 @@ void ...@@ -90,8 +87,7 @@ void
oc_core_shutdown(void) oc_core_shutdown(void)
{ {
size_t i; size_t i;
if (oc_string_len(oc_platform_info.mfg_name)) oc_free_string(&(oc_platform_info.mfg_name));
oc_free_string(&(oc_platform_info.mfg_name));
#ifdef OC_DYNAMIC_ALLOCATION #ifdef OC_DYNAMIC_ALLOCATION
if (oc_device_info) { if (oc_device_info) {
......
...@@ -472,15 +472,13 @@ oc_parse_endpoint_string(oc_string_t *endpoint_str, oc_endpoint_t *endpoint, ...@@ -472,15 +472,13 @@ oc_parse_endpoint_string(oc_string_t *endpoint_str, oc_endpoint_t *endpoint,
#else /* OC_IPV4 */ #else /* OC_IPV4 */
else { else {
#ifdef OC_DNS_LOOKUP #ifdef OC_DNS_LOOKUP
if (oc_string_len(ipaddress) > 0) oc_free_string(&ipaddress);
oc_free_string(&ipaddress);
#endif /* OC_DNS_LOOKUP */ #endif /* OC_DNS_LOOKUP */
return -1; return -1;
} }
#endif /* !OC_IPV4 */ #endif /* !OC_IPV4 */
#ifdef OC_DNS_LOOKUP #ifdef OC_DNS_LOOKUP
if (oc_string_len(ipaddress) > 0) oc_free_string(&ipaddress);
oc_free_string(&ipaddress);
#endif /* OC_DNS_LOOKUP */ #endif /* OC_DNS_LOOKUP */
return 0; return 0;
} }
......
...@@ -95,11 +95,13 @@ _oc_free_string( ...@@ -95,11 +95,13 @@ _oc_free_string(
#endif #endif
oc_string_t *ocstring) oc_string_t *ocstring)
{ {
oc_free( if (ocstring && ocstring->size > 0) {
oc_free(
#ifdef OC_MEMORY_TRACE #ifdef OC_MEMORY_TRACE
func, func,
#endif #endif
ocstring, BYTE_POOL); ocstring, BYTE_POOL);
}
} }
void void
......
...@@ -381,12 +381,8 @@ void ...@@ -381,12 +381,8 @@ void
oc_ri_free_resource_properties(oc_resource_t *resource) oc_ri_free_resource_properties(oc_resource_t *resource)
{ {
if (resource) { if (resource) {
if (oc_string_len(resource->name) > 0) { oc_free_string(&(resource->name));
oc_free_string(&(resource->name)); oc_free_string(&(resource->uri));
}
if (oc_string_len(resource->uri) > 0) {
oc_free_string(&(resource->uri));
}
if (oc_string_array_get_allocated_size(resource->types) > 0) { if (oc_string_array_get_allocated_size(resource->types) > 0) {
oc_free_string_array(&(resource->types)); oc_free_string_array(&(resource->types));
} }
...@@ -1202,9 +1198,7 @@ free_client_cb(oc_client_cb_t *cb) ...@@ -1202,9 +1198,7 @@ free_client_cb(oc_client_cb_t *cb)
oc_blockwise_scrub_buffers_for_client_cb(cb); oc_blockwise_scrub_buffers_for_client_cb(cb);
#endif /* OC_BLOCK_WISE */ #endif /* OC_BLOCK_WISE */
oc_free_string(&cb->uri); oc_free_string(&cb->uri);
if (oc_string_len(cb->query)) { oc_free_string(&cb->query);
oc_free_string(&cb->query);
}
oc_memb_free(&client_cbs_s, cb); oc_memb_free(&client_cbs_s, cb);
} }
......
...@@ -132,15 +132,9 @@ oc_swupdate_free(void) ...@@ -132,15 +132,9 @@ oc_swupdate_free(void)
for (i = 0; i < oc_core_get_num_devices(); i++) { for (i = 0; i < oc_core_get_num_devices(); i++) {
oc_swupdate_t *s = &sw[i]; oc_swupdate_t *s = &sw[i];
oc_dump_sw(i); oc_dump_sw(i);
if (oc_string_len(s->purl) > 0) { oc_free_string(&s->purl);
oc_free_string(&s->purl); oc_free_string(&s->nv);
} oc_free_string(&s->signage);
if (oc_string_len(s->nv) > 0) {
oc_free_string(&s->nv);
}
if (oc_string_len(s->signage) > 0) {
oc_free_string(&s->signage);
}
} }
#ifdef OC_DYNAMIC_ALLOCATION #ifdef OC_DYNAMIC_ALLOCATION
if (sw) { if (sw) {
...@@ -218,10 +212,8 @@ oc_swupdate_notify_upgrading(size_t device, const char *version, ...@@ -218,10 +212,8 @@ oc_swupdate_notify_upgrading(size_t device, const char *version,
oc_swupdate_t *s = &sw[device]; oc_swupdate_t *s = &sw[device];
s->swupdatestate = OC_SWUPDATE_STATE_UPGRADING; s->swupdatestate = OC_SWUPDATE_STATE_UPGRADING;
s->swupdateresult = result; s->swupdateresult = result;
if (oc_string_len(s->nv) > 0) { oc_free_string(&s->nv);
oc_free_string(&s->nv); oc_new_string(&s->nv, version, strlen(version));
oc_new_string(&s->nv, version, strlen(version));
}
s->lastupdate = timestamp; s->lastupdate = timestamp;
#ifdef OC_SERVER #ifdef OC_SERVER
oc_notify_observers(oc_core_get_resource_by_index(OCF_SW_UPDATE, device)); oc_notify_observers(oc_core_get_resource_by_index(OCF_SW_UPDATE, device));
...@@ -404,9 +396,7 @@ oc_swupdate_decode(oc_rep_t *rep, size_t device) ...@@ -404,9 +396,7 @@ oc_swupdate_decode(oc_rep_t *rep, size_t device)
} }
if (oc_string_len(rep->name) == 2 && if (oc_string_len(rep->name) == 2 &&
memcmp(oc_string(rep->name), "nv", 2) == 0) { memcmp(oc_string(rep->name), "nv", 2) == 0) {
if (oc_string_len(s->nv) > 0) { oc_free_string(&s->nv);
oc_free_string(&s->nv);
}
if (oc_string_len(rep->value.string) > 0) { if (oc_string_len(rep->value.string) > 0) {
oc_new_string(&s->nv, oc_string(rep->value.string), oc_new_string(&s->nv, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
...@@ -414,9 +404,7 @@ oc_swupdate_decode(oc_rep_t *rep, size_t device) ...@@ -414,9 +404,7 @@ oc_swupdate_decode(oc_rep_t *rep, size_t device)
} }
if (oc_string_len(rep->name) == 4 && if (oc_string_len(rep->name) == 4 &&
memcmp(oc_string(rep->name), "purl", 4) == 0) { memcmp(oc_string(rep->name), "purl", 4) == 0) {
if (oc_string_len(s->purl) > 0) { oc_free_string(&s->purl);
oc_free_string(&s->purl);
}
if (oc_string_len(rep->value.string) > 0) { if (oc_string_len(rep->value.string) > 0) {
oc_new_string(&s->purl, oc_string(rep->value.string), oc_new_string(&s->purl, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
...@@ -424,9 +412,7 @@ oc_swupdate_decode(oc_rep_t *rep, size_t device) ...@@ -424,9 +412,7 @@ oc_swupdate_decode(oc_rep_t *rep, size_t device)
} }
if (oc_string_len(rep->name) == 6 && if (oc_string_len(rep->name) == 6 &&
memcmp(oc_string(rep->name), "signed", 6) == 0) { memcmp(oc_string(rep->name), "signed", 6) == 0) {
if (oc_string_len(s->signage) > 0) { oc_free_string(&s->signage);
oc_free_string(&s->signage);
}
if (oc_string_len(rep->value.string) > 0) { if (oc_string_len(rep->value.string) > 0) {
oc_new_string(&s->signage, oc_string(rep->value.string), oc_new_string(&s->signage, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
...@@ -466,16 +452,16 @@ oc_swupdate_decode(oc_rep_t *rep, size_t device) ...@@ -466,16 +452,16 @@ oc_swupdate_decode(oc_rep_t *rep, size_t device)
/** /**
* post method for "/sw" resource. * post method for "/sw" resource.
* The function has as input the request body, which are the input values of the * The function has as input the request body, which are the input values of the
* POST method. * POST method.
* The input values (as a set) are checked if all supplied values are correct. * The input values (as a set) are checked if all supplied values are correct.
* If the input values are correct, they will be assigned to the global property * If the input values are correct, they will be assigned to the global property
* values. * values.
* Resource Description: * Resource Description:
* Mechanism to schedule a start of the software update. * Mechanism to schedule a start of the software update.
* *
* @param requestRep the request representation. * @param requestRep the request representation.
*/ */
static void static void
post_sw(oc_request_t *request, oc_interface_mask_t interfaces, void *user_data) post_sw(oc_request_t *request, oc_interface_mask_t interfaces, void *user_data)
{ {
...@@ -587,17 +573,17 @@ post_sw(oc_request_t *request, oc_interface_mask_t interfaces, void *user_data) ...@@ -587,17 +573,17 @@ post_sw(oc_request_t *request, oc_interface_mask_t interfaces, void *user_data)
} }
/** /**
* get method for "/sw" resource. * get method for "/sw" resource.
* function is called to intialize the return values of the GET method. * function is called to intialize the return values of the GET method.
* initialisation of the returned values are done from the global property * initialisation of the returned values are done from the global property
* values. * values.
* Resource Description: * Resource Description:
* The Resource performing scheduled software update. * The Resource performing scheduled software update.
* *
* @param request the request representation. * @param request the request representation.
* @param interfaces the interface used for this call * @param interfaces the interface used for this call
* @param user_data the user data. * @param user_data the user data.
*/ */
static void static void
get_sw(oc_request_t *request, oc_interface_mask_t interfaces, void *user_data) get_sw(oc_request_t *request, oc_interface_mask_t interfaces, void *user_data)
......
...@@ -10,13 +10,15 @@ ...@@ -10,13 +10,15 @@
#ifdef __AVR__ #ifdef __AVR__
#ifdef OC_XMEM #ifdef OC_XMEM
void extRAMinit(void)__attribute__ ((used, naked, section (".init3"))); void extRAMinit(void) __attribute__((used, naked, section(".init3")));
void extRAMinit(void) { void
// set up the xmem registers extRAMinit(void)
XMCRB=0; {
XMCRA=1<<SRE; // set up the xmem registers
DDRD|=_BV(PD7); XMCRB = 0;
DDRL|=(_BV(PL6)|_BV(PL7)); XMCRA = 1 << SRE;
DDRD |= _BV(PD7);
DDRL |= (_BV(PL6) | _BV(PL7));
} }
#endif #endif
#endif #endif
...@@ -66,8 +68,7 @@ observe_light(oc_client_response_t *data) ...@@ -66,8 +68,7 @@ observe_light(oc_client_response_t *data)
break; break;
case OC_REP_STRING: case OC_REP_STRING:
OC_DBG("%s", oc_string(rep->value.string)); OC_DBG("%s", oc_string(rep->value.string));
if (oc_string_len(name)) oc_free_string(&name);
oc_free_string(&name);
oc_new_string(&name, oc_string(rep->value.string), oc_new_string(&name, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
break; break;
...@@ -159,8 +160,7 @@ get_light(oc_client_response_t *data) ...@@ -159,8 +160,7 @@ get_light(oc_client_response_t *data)
break; break;
case OC_REP_STRING: case OC_REP_STRING:
OC_DBG("%s", oc_string(rep->value.string)); OC_DBG("%s", oc_string(rep->value.string));
if (oc_string_len(name)) oc_free_string(&name);
oc_free_string(&name);
oc_new_string(&name, oc_string(rep->value.string), oc_new_string(&name, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
break; break;
...@@ -244,9 +244,9 @@ OC_PROCESS_THREAD(sample_client_process, ev, data) ...@@ -244,9 +244,9 @@ OC_PROCESS_THREAD(sample_client_process, ev, data)
{ {
(void)data; (void)data;
static struct oc_etimer et; static struct oc_etimer et;
static const oc_handler_t handler = {.init = app_init, static const oc_handler_t handler = { .init = app_init,
.signal_event_loop = signal_event_loop, .signal_event_loop = signal_event_loop,
.requests_entry = issue_requests }; .requests_entry = issue_requests };
static oc_clock_time_t next_event; static oc_clock_time_t next_event;
oc_set_mtu_size(1024); oc_set_mtu_size(1024);
oc_set_max_app_data_size(1024); oc_set_max_app_data_size(1024);
...@@ -255,32 +255,31 @@ OC_PROCESS_THREAD(sample_client_process, ev, data) ...@@ -255,32 +255,31 @@ OC_PROCESS_THREAD(sample_client_process, ev, data)
while (ev != OC_PROCESS_EVENT_EXIT) { while (ev != OC_PROCESS_EVENT_EXIT) {
oc_etimer_set(&et, (oc_clock_time_t)next_event); oc_etimer_set(&et, (oc_clock_time_t)next_event);
if(ev == OC_PROCESS_EVENT_INIT){ if (ev == OC_PROCESS_EVENT_INIT) {
int init = oc_main_init(&handler); int init = oc_main_init(&handler);
if (init < 0){ if (init < 0) {
OC_DBG("Client Init failed!"); OC_DBG("Client Init failed!");
return init; return init;
} }
OC_DBG("Client process init!"); OC_DBG("Client process init!");
} } else if (ev == OC_PROCESS_EVENT_TIMER) {
else if(ev == OC_PROCESS_EVENT_TIMER){
next_event = oc_main_poll(); next_event = oc_main_poll();
next_event -= oc_clock_time(); next_event -= oc_clock_time();
} }
OC_PROCESS_WAIT_EVENT(); OC_PROCESS_WAIT_EVENT();
} }
OC_PROCESS_END(); OC_PROCESS_END();
} }
// Arduino Ethernet Shield // Arduino Ethernet Shield
uint8_t ConnectToNetwork() uint8_t
ConnectToNetwork()
{ {
// Note: ****Update the MAC address here with your shield's MAC address**** // Note: ****Update the MAC address here with your shield's MAC address****
uint8_t ETHERNET_MAC[] = {0x90, 0xA2, 0xDA, 0x11, 0x44, 0xA9}; uint8_t ETHERNET_MAC[] = { 0x90, 0xA2, 0xDA, 0x11, 0x44, 0xA9 };
Ethernet.init(5); // CS Pin for MKRZERO Ethernet.init(5); // CS Pin for MKRZERO
uint8_t error = Ethernet.begin(ETHERNET_MAC); uint8_t error = Ethernet.begin(ETHERNET_MAC);
if (error == 0) if (error == 0) {
{
OC_ERR("Error connecting to Network: %d", error); OC_ERR("Error connecting to Network: %d", error);
return -1; return -1;
} }
...@@ -289,18 +288,19 @@ uint8_t ConnectToNetwork() ...@@ -289,18 +288,19 @@ uint8_t ConnectToNetwork()
return 0; return 0;
} }
void setup() { void
setup()
{
#if defined(__arm__) && defined(__SAMD21G18A__) || defined(__SAM3X8E__) #if defined(__arm__) && defined(__SAMD21G18A__) || defined(__SAM3X8E__)
Serial.begin(250000); Serial.begin(250000);
#else #else
Serial.begin(115200); Serial.begin(115200);
#endif #endif
#if defined(__SAMD21G18A__) #if defined(__SAMD21G18A__)
while (!Serial) { while (!Serial) {
} }
#endif #endif
if (ConnectToNetwork() != 0) if (ConnectToNetwork() != 0) {
{
OC_ERR("Unable to connect to network"); OC_ERR("Unable to connect to network");
return; return;
} }
...@@ -312,7 +312,9 @@ void setup() { ...@@ -312,7 +312,9 @@ void setup() {
delay(200); delay(200);
} }
void loop() { void
loop()
{
oc_process_run(); oc_process_run();
} }
...@@ -157,8 +157,7 @@ parse_payload(oc_client_response_t *data) ...@@ -157,8 +157,7 @@ parse_payload(oc_client_response_t *data)
break; break;
case OC_REP_STRING: case OC_REP_STRING:
printf("%s\n", oc_string(rep->value.string)); printf("%s\n", oc_string(rep->value.string));
if (oc_string_len(name)) oc_free_string(&name);
oc_free_string(&name);
oc_new_string(&name, oc_string(rep->value.string), oc_new_string(&name, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
break; break;
......
...@@ -70,8 +70,7 @@ observe_light(oc_client_response_t *data) ...@@ -70,8 +70,7 @@ observe_light(oc_client_response_t *data)
break; break;
case OC_REP_STRING: case OC_REP_STRING:
PRINT("%s\n", oc_string(rep->value.string)); PRINT("%s\n", oc_string(rep->value.string));
if (oc_string_len(name)) oc_free_string(&name);
oc_free_string(&name);
oc_new_string(&name, oc_string(rep->value.string), oc_new_string(&name, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
break; break;
...@@ -163,8 +162,7 @@ get_light(oc_client_response_t *data) ...@@ -163,8 +162,7 @@ get_light(oc_client_response_t *data)
break; break;
case OC_REP_STRING: case OC_REP_STRING:
PRINT("%s\n", oc_string(rep->value.string)); PRINT("%s\n", oc_string(rep->value.string));
if (oc_string_len(name)) oc_free_string(&name);
oc_free_string(&name);
oc_new_string(&name, oc_string(rep->value.string), oc_new_string(&name, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
break; break;
......
...@@ -68,8 +68,7 @@ observe_light(oc_client_response_t *data) ...@@ -68,8 +68,7 @@ observe_light(oc_client_response_t *data)
break; break;
case OC_REP_STRING: case OC_REP_STRING:
PRINT("%s\n", oc_string(rep->value.string)); PRINT("%s\n", oc_string(rep->value.string));
if (oc_string_len(name)) oc_free_string(&name);
oc_free_string(&name);
oc_new_string(&name, oc_string(rep->value.string), oc_new_string(&name, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
break; break;
...@@ -161,8 +160,7 @@ get_light(oc_client_response_t *data) ...@@ -161,8 +160,7 @@ get_light(oc_client_response_t *data)
break; break;
case OC_REP_STRING: case OC_REP_STRING:
PRINT("%s\n", oc_string(rep->value.string)); PRINT("%s\n", oc_string(rep->value.string));
if (oc_string_len(name)) oc_free_string(&name);
oc_free_string(&name);
oc_new_string(&name, oc_string(rep->value.string), oc_new_string(&name, oc_string(rep->value.string),
oc_string_len(rep->value.string)); oc_string_len(rep->value.string));
break; break;
......
...@@ -1271,7 +1271,7 @@ coap_set_token(void *packet, const uint8_t *token, size_t token_len) ...@@ -1271,7 +1271,7 @@ coap_set_token(void *packet, const uint8_t *token, size_t token_len)
} }
int 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; coap_packet_t *const coap_pkt = (coap_packet_t *)packet;
...@@ -1283,11 +1283,11 @@ coap_get_header_content_format(void *packet, unsigned int *format) ...@@ -1283,11 +1283,11 @@ coap_get_header_content_format(void *packet, unsigned int *format)
} }