mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
Fix missing WOLFSSL_DTLS in Micrium build
This commit is contained in:
20
src/wolfio.c
20
src/wolfio.c
@@ -2182,20 +2182,24 @@ int MicriumReceiveFrom(WOLFSSL *ssl, char *buf, int sz, void *ctx)
|
|||||||
NET_SOCK_ADDR_LEN peerSz = sizeof(peer);
|
NET_SOCK_ADDR_LEN peerSz = sizeof(peer);
|
||||||
NET_SOCK_RTN_CODE ret;
|
NET_SOCK_RTN_CODE ret;
|
||||||
NET_ERR err;
|
NET_ERR err;
|
||||||
int dtls_timeout = wolfSSL_dtls_get_current_timeout(ssl);
|
|
||||||
|
|
||||||
WOLFSSL_ENTER("MicriumReceiveFrom()");
|
WOLFSSL_ENTER("MicriumReceiveFrom()");
|
||||||
|
|
||||||
if (ssl->options.handShakeDone)
|
#ifdef WOLFSSL_DTLS
|
||||||
dtls_timeout = 0;
|
{
|
||||||
|
int dtls_timeout = wolfSSL_dtls_get_current_timeout(ssl);
|
||||||
|
if (ssl->options.handShakeDone)
|
||||||
|
dtls_timeout = 0;
|
||||||
|
|
||||||
if (!wolfSSL_dtls_get_using_nonblock(ssl)) {
|
if (!wolfSSL_dtls_get_using_nonblock(ssl)) {
|
||||||
/* needs timeout in milliseconds */
|
/* needs timeout in milliseconds */
|
||||||
NetSock_CfgTimeoutRxQ_Set(sd, dtls_timeout * 1000, &err);
|
NetSock_CfgTimeoutRxQ_Set(sd, dtls_timeout * 1000, &err);
|
||||||
if (err != NET_SOCK_ERR_NONE) {
|
if (err != NET_SOCK_ERR_NONE) {
|
||||||
WOLFSSL_MSG("NetSock_CfgTimeoutRxQ_Set failed");
|
WOLFSSL_MSG("NetSock_CfgTimeoutRxQ_Set failed");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = NetSock_RxDataFrom(sd, buf, sz, ssl->rflags, &peer, &peerSz,
|
ret = NetSock_RxDataFrom(sd, buf, sz, ssl->rflags, &peer, &peerSz,
|
||||||
0, 0, 0, &err);
|
0, 0, 0, &err);
|
||||||
|
Reference in New Issue
Block a user