Merge commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3'

* commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3':
  tls: Do not abort on non-fatal TLS alerts with gnutls

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-23 12:01:49 +02:00
commit 03e9506aae
1 changed files with 8 additions and 1 deletions

View File

@ -73,7 +73,14 @@ static int do_tls_poll(URLContext *h, int ret)
TLSContext *c = h->priv_data; TLSContext *c = h->priv_data;
struct pollfd p = { c->fd, 0, 0 }; struct pollfd p = { c->fd, 0, 0 };
#if CONFIG_GNUTLS #if CONFIG_GNUTLS
if (ret != GNUTLS_E_AGAIN && ret != GNUTLS_E_INTERRUPTED) { switch (ret) {
case GNUTLS_E_AGAIN:
case GNUTLS_E_INTERRUPTED:
break;
case GNUTLS_E_WARNING_ALERT_RECEIVED:
av_log(h, AV_LOG_WARNING, "%s\n", gnutls_strerror(ret));
break;
default:
av_log(h, AV_LOG_ERROR, "%s\n", gnutls_strerror(ret)); av_log(h, AV_LOG_ERROR, "%s\n", gnutls_strerror(ret));
return AVERROR(EIO); return AVERROR(EIO);
} }