Skip to content

Commit a13d6ab

Browse files
author
Arto Kinnunen
committed
Merge commit 'aad453e0ac69b9de3b3e218c21a423bebd506174'
* commit 'aad453e0ac69b9de3b3e218c21a423bebd506174': Squashed 'connectivity/nanostack/coap-service/' changes from 5aa54b8..4a126bd
2 parents 6354a1e + aad453e commit a13d6ab

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

connectivity/nanostack/coap-service/source/coap_connection_handler.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ static NS_LIST_DEFINE(socket_list, internal_socket_t, link);
6666
static uint8_t max_handshakes = MAX_ONGOING_HANDSHAKES;
6767
static uint8_t max_sessions = MAX_SECURE_SESSION_COUNT;
6868

69+
#ifdef COAP_SECURITY_AVAILABLE
6970
static void timer_cb(void *param);
71+
#endif
7072

7173
static void recv_sckt_msg(void *cb_res);
7274
#ifdef COAP_SECURITY_AVAILABLE
@@ -122,6 +124,7 @@ static secure_session_t *secure_session_find_by_timer_id(int8_t timer_id)
122124
return this;
123125
}
124126

127+
#ifdef COAP_SECURITY_AVAILABLE
125128
static bool is_secure_session_valid(secure_session_t *session)
126129
{
127130
ns_list_foreach(secure_session_t, cur_ptr, &secure_session_list) {
@@ -131,6 +134,7 @@ static bool is_secure_session_valid(secure_session_t *session)
131134
}
132135
return false;
133136
}
137+
#endif
134138

135139
static void secure_session_delete(secure_session_t *this)
136140
{
@@ -164,6 +168,7 @@ static int8_t virtual_socket_id_allocate()
164168

165169
static secure_session_t *secure_session_create(internal_socket_t *parent, const uint8_t *address_ptr, uint16_t port, SecureConnectionMode secure_mode)
166170
{
171+
(void) secure_mode;
167172
uint8_t handshakes = 0;
168173
if (!address_ptr) {
169174
return NULL;
@@ -493,6 +498,7 @@ static int secure_session_recvfrom(int8_t socket_id, unsigned char *buf, size_t
493498
* TODO - might be better to use an event timer in conjunction with
494499
* CoAP tasklet
495500
*/
501+
#ifdef COAP_SECURITY_AVAILABLE
496502
static void timer_cb(void *param)
497503
{
498504
secure_session_t *sec = param;
@@ -524,6 +530,7 @@ static void timer_cb(void *param)
524530
}
525531
}
526532
}
533+
#endif
527534

528535
#ifdef COAP_SECURITY_AVAILABLE
529536
static void start_timer(int8_t timer_id, uint32_t int_ms, uint32_t fin_ms)

connectivity/nanostack/coap-service/source/include/coap_security_handler.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#if !defined(MBEDTLS_CONFIG_FILE)
2424
#include "mbedtls/config.h"
2525
#else
26+
// cppcheck-suppress preprocessorErrorDirective
2627
#include MBEDTLS_CONFIG_FILE
2728
#endif
2829

0 commit comments

Comments
 (0)