Commit ca41ed3f authored by Francois Cartegnie's avatar Francois Cartegnie

gnutls: don't break if ALPN extension is not available

At least, fedora 20 doesn't enable it.
parent d5368889
......@@ -198,6 +198,7 @@ static int gnutls_SessionOpen (vlc_tls_t *tls, int type,
goto error;
}
#ifdef GNUTLS_ALPN_MAND
if (alpn != NULL)
{
gnutls_datum_t *protv = NULL;
......@@ -222,6 +223,9 @@ static int gnutls_SessionOpen (vlc_tls_t *tls, int type,
val = gnutls_alpn_set_protocols (session, protv, protc, 0);
free (protv);
}
#else
VLC_UNUSED(alpn);
#endif
gnutls_transport_set_int (session, fd);
......@@ -275,6 +279,7 @@ static int gnutls_ContinueHandshake (vlc_tls_t *tls, char **restrict alp)
return -1;
done:
#ifdef GNUTLS_ALPN_MAND
if (alp != NULL)
{
gnutls_datum_t datum;
......@@ -292,6 +297,9 @@ done:
else
*alp = NULL;
}
#else
VLC_UNUSED(alp);
#endif
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment