Skip to content

Commit 5f0d7c3

Browse files
Compiling fixies for coap server code
Change-Id: I7a8fa75c49f3c31d4db2d7c4d05830a678de7a2d
1 parent c558faf commit 5f0d7c3

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

source/coap_server.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ instance_list_t NS_LIST_NAME_INIT(instance_list);
1616

1717
/* Coap service class handlers*/
1818

19-
//void *memory_allocation(uint16_t size);
20-
21-
//void memory_free(void* ptr);
22-
2319
void coap_server_delete_session(int8_t service_id)
2420
{
2521

@@ -28,7 +24,7 @@ void coap_server_delete_session(int8_t service_id)
2824
if(this)
2925
{
3026

31-
ns_list_remove(&instance_list,this);
27+
//ns_list_remove(&instance_list,this);
3228
memory_free(this);
3329

3430
}
@@ -39,7 +35,7 @@ static coap_service_session_t *coap_service_search_from_list(int8_t interface_id
3935
{
4036
coap_service_session_t *this = NULL;
4137

42-
/*
38+
/*
4339
ns_list_foreach(coap_service_session_t,cur_ptr, &instance_list)
4440
{
4541
if(cur_ptr->interface_id == interface_id)
@@ -48,7 +44,8 @@ static coap_service_session_t *coap_service_search_from_list(int8_t interface_id
4844
break;
4945
}
5046
}
51-
*/
47+
*/
48+
5249
return this;
5350
}
5451

source/coap_service.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int8_t coap_service_unregister_uri(int8_t service_id, uint8_t *uri_ptr, uint16_t
3838

3939
uint16_t coap_service_send(int8_t service_id, uint8_t options, uint8_t addr[static 16], uint16_t destination_port, sn_coap_hdr_s *request_ptr, coap_service_response_recv *request_response_cb)
4040
{
41-
return -1;
41+
return 0;
4242
}
4343

4444
void coap_service_delete( int8_t service_id )
@@ -98,7 +98,7 @@ int8_t coap_service_register_uri_secure_cb_set(int8_t service_id, coap_service_s
9898
uint16_t coap_service_request_send(int8_t service_id, uint8_t options, uint8_t destination_addr[static 16], uint16_t destination_port, uint8_t msg_type, uint8_t msg_code, uint8_t *uri_ptr, uint16_t uri_len,
9999
uint8_t cont_type, uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb)
100100
{
101-
return -1;
101+
return 0;
102102
}
103103

104104
int8_t coap_service_response_send(int8_t service_id, uint8_t options, sn_coap_hdr_s *request_ptr, sn_coap_msg_code_e message_code, int32_t content_type,uint8_t * payload_ptr,uint16_t payload_len)

0 commit comments

Comments
 (0)