diff --git a/examples/dtls-sock/dtls-client.c b/examples/dtls-sock/dtls-client.c index 1e2b3c90ffba..47cf52a65b9d 100644 --- a/examples/dtls-sock/dtls-client.c +++ b/examples/dtls-sock/dtls-client.c @@ -148,11 +148,10 @@ static int client_send(char *addr_str, char *data, size_t datalen) else { printf("Sent DTLS message\n"); - uint8_t rcv[512]; - if ((res = sock_dtls_recv(&dtls_sock, &session, rcv, sizeof(rcv), + if ((res = sock_dtls_recv(&dtls_sock, &session, buf, sizeof(buf), SOCK_NO_TIMEOUT)) >= 0) { printf("Received %d bytes: \"%.*s\"\n", (int)res, (int)res, - (char *)rcv); + (char *)buf); } }