[vlc-commits] gnutls: add "missing" non-blocking flag

Rémi Denis-Courmont git at videolan.org
Thu Feb 23 20:08:28 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 22 23:04:01 2017 +0200| [be38645f7f67f5091a28a85c83fa6d6eb4cf3d3e] | committer: Rémi Denis-Courmont

gnutls: add "missing" non-blocking flag

Since version 3.0.0, applications are supposed to set this when
operating in non-blocking mode. At this point, this seems to only
really affect DTLS though.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=be38645f7f67f5091a28a85c83fa6d6eb4cf3d3e
---

 modules/misc/gnutls.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index 4bb3ddf..4f22d28 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -259,7 +259,9 @@ static int gnutls_SessionOpen(vlc_tls_creds_t *creds, vlc_tls_t *tls, int type,
     const char *errp;
     int val;
 
-    val = gnutls_init (&session, type);
+    type |= GNUTLS_NONBLOCK;
+
+    val = gnutls_init(&session, type);
     if (val != 0)
     {
         msg_Err(creds, "cannot initialize TLS session: %s",



More information about the vlc-commits mailing list