]> git.sesse.net Git - ffmpeg/commitdiff
tls_openssl: Fix checks for SSL_ERROR_WANT_WRITE in nonblocking operation
authorMartin Storsjö <martin@martin.st>
Thu, 16 Aug 2018 07:55:41 +0000 (09:55 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 17 Aug 2018 10:08:28 +0000 (13:08 +0300)
This was a typo in 0671eb2346c, spotted by Chris Carroux.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/tls_openssl.c

index f0b325ae98035e238934cb14d039f104d54d6b53..4a2fcfd7718c4431a0599f4d3ce13c5b8fdc3cd2 100644 (file)
@@ -112,7 +112,7 @@ static int print_tls_error(URLContext *h, int ret)
     TLSContext *c = h->priv_data;
     if (h->flags & AVIO_FLAG_NONBLOCK) {
         int err = SSL_get_error(c->ssl, ret);
-        if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_READ)
+        if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
             return AVERROR(EAGAIN);
     }
     av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL));