summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
15aeea3)
If gnutls was in use and gnutls_record_recv returned 0 (EOF)
the ssl_get function would never terminate.
#if HAVE_GNUTLS_H
res = gnutls_record_recv(sp->session, *buf + hasread,
CS_TCPIP_BUFCHUNK);
#if HAVE_GNUTLS_H
res = gnutls_record_recv(sp->session, *buf + hasread,
CS_TCPIP_BUFCHUNK);
+ if (res == 0)
+ {
+ TRC(fprintf(stderr, "gnutls_record_recv returned 0\n"));
+ return 0;
+ }
+ else if (res < 0)
{
if (ssl_check_error(h, sp, res))
break;
{
if (ssl_check_error(h, sp, res))
break;