@@ -45,8 +45,8 @@ void nf_debug(void *ctx, int level, const char *file, int line, const char *str)
45
45
// this is a lightheight version with just the debug messages
46
46
debug_printf (" %s" , str);
47
47
}
48
- /*
49
- int net_would_block(const mbedtls_net_context *ctx)
48
+
49
+ __nfweak int net_would_block (const mbedtls_net_context *ctx)
50
50
{
51
51
//
52
52
// Never return 'WOULD BLOCK' on a non-blocking socket
@@ -70,7 +70,7 @@ int net_would_block(const mbedtls_net_context *ctx)
70
70
return (0 );
71
71
}
72
72
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)
74
74
{
75
75
int32_t ret;
76
76
int32_t fd = ((mbedtls_net_context *)ctx)->fd ;
@@ -105,7 +105,7 @@ int mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)
105
105
return ret;
106
106
}
107
107
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)
109
109
{
110
110
int32_t ret;
111
111
int fd = ((mbedtls_net_context *)ctx)->fd ;
@@ -140,7 +140,7 @@ int mbedtls_net_send(void *ctx, const unsigned char *buf, size_t len)
140
140
return ret;
141
141
}
142
142
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)
144
144
{
145
145
int ret;
146
146
struct timeval tv;
@@ -180,7 +180,7 @@ int mbedtls_net_recv_timeout(void *ctx, unsigned char *buf, size_t len, uint32_t
180
180
}
181
181
182
182
// Gracefully closes the connection
183
- void mbedtls_net_free(mbedtls_net_context *ctx)
183
+ __nfweak void mbedtls_net_free (mbedtls_net_context *ctx)
184
184
{
185
185
if (ctx->fd == -1 )
186
186
return ;
@@ -190,7 +190,6 @@ void mbedtls_net_free(mbedtls_net_context *ctx)
190
190
191
191
ctx->fd = -1 ;
192
192
}
193
- */
194
193
195
194
// get Unix Epoch time from HAL SystemTime
196
195
time_t nf_get_unix_epoch ()
0 commit comments