Skip to content

Commit b5c53f4

Browse files
authored
Merge pull request #5138 from artokin/master
Fix redefinition of mbed TLS error codes
2 parents 003dd7c + 0920cfc commit b5c53f4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

features/nanostack/FEATURE_NANOSTACK/coap-service/source/include/coap_security_handler.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,21 @@ const void *coap_security_handler_keyblock(const coap_security_t *sec);
100100
NS_DUMMY_DEFINITIONS_OK
101101

102102
/* Dummy definitions, including needed error codes */
103+
#ifndef MBEDTLS_ERR_SSL_TIMEOUT
103104
#define MBEDTLS_ERR_SSL_TIMEOUT (-1)
105+
#endif
106+
107+
#ifndef MBEDTLS_ERR_SSL_WANT_READ
104108
#define MBEDTLS_ERR_SSL_WANT_READ (-2)
109+
#endif
110+
111+
#ifndef MBEDTLS_ERR_SSL_WANT_WRITE
105112
#define MBEDTLS_ERR_SSL_WANT_WRITE (-3)
113+
#endif
114+
115+
#ifndef MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE
106116
#define MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE (-4)
117+
#endif
107118

108119
#define coap_security_create(socket_id, timer_id, handle, \
109120
mode, send_cb, receive_cb, start_timer_cb, timer_status_cb) ((coap_security_t *) 0)

0 commit comments

Comments
 (0)