@@ -45,8 +45,8 @@ void nf_debug(void *ctx, int level, const char *file, int line, const char *str)
4545 // this is a lightheight version with just the debug messages
4646 debug_printf (" %s" , str);
4747}
48- /*
49- int net_would_block(const mbedtls_net_context *ctx)
48+
49+ __nfweak int net_would_block (const mbedtls_net_context *ctx)
5050{
5151 //
5252 // Never return 'WOULD BLOCK' on a non-blocking socket
@@ -70,7 +70,7 @@ int net_would_block(const mbedtls_net_context *ctx)
7070 return (0 );
7171}
7272
73- int mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)
73+ __nfweak int mbedtls_net_recv (void *ctx, unsigned char *buf, size_t len)
7474{
7575 int32_t ret;
7676 int32_t fd = ((mbedtls_net_context *)ctx)->fd ;
@@ -105,7 +105,7 @@ int mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)
105105 return ret;
106106}
107107
108- int mbedtls_net_send(void *ctx, const unsigned char *buf, size_t len)
108+ __nfweak int mbedtls_net_send (void *ctx, const unsigned char *buf, size_t len)
109109{
110110 int32_t ret;
111111 int fd = ((mbedtls_net_context *)ctx)->fd ;
@@ -140,7 +140,7 @@ int mbedtls_net_send(void *ctx, const unsigned char *buf, size_t len)
140140 return ret;
141141}
142142
143- int mbedtls_net_recv_timeout(void *ctx, unsigned char *buf, size_t len, uint32_t timeout)
143+ __nfweak int mbedtls_net_recv_timeout (void *ctx, unsigned char *buf, size_t len, uint32_t timeout)
144144{
145145 int ret;
146146 struct timeval tv;
@@ -180,7 +180,7 @@ int mbedtls_net_recv_timeout(void *ctx, unsigned char *buf, size_t len, uint32_t
180180}
181181
182182// Gracefully closes the connection
183- void mbedtls_net_free(mbedtls_net_context *ctx)
183+ __nfweak void mbedtls_net_free (mbedtls_net_context *ctx)
184184{
185185 if (ctx->fd == -1 )
186186 return ;
@@ -190,7 +190,6 @@ void mbedtls_net_free(mbedtls_net_context *ctx)
190190
191191 ctx->fd = -1 ;
192192}
193- */
194193
195194// get Unix Epoch time from HAL SystemTime
196195time_t nf_get_unix_epoch ()
0 commit comments