mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-30 10:17:08 +03:00
Merge pull request #279 from mrdeep1/gnutls_tls_read
coap_gnutls.c: coap_tls_read() support retrying the read
This commit is contained in:
1 file changed
+5
-1
+5
-1
@@ -1652,9 +1652,13 @@ ssize_t coap_tls_read(coap_session_t *c_session,
|
||||
ret = gnutls_record_recv(g_env->g_session, data, (int)data_len);
|
||||
if (ret <= 0) {
|
||||
switch (ret) {
|
||||
case GNUTLS_E_SUCCESS:
|
||||
case 0:
|
||||
c_session->dtls_event = COAP_EVENT_DTLS_CLOSED;
|
||||
break;
|
||||
case GNUTLS_E_AGAIN:
|
||||
errno = EAGAIN;
|
||||
ret = 0;
|
||||
break;
|
||||
default:
|
||||
coap_log(LOG_WARNING,
|
||||
"coap_tls_read: gnutls_record_recv "
|
||||
|
||||
Reference in new issue
Block a user