[vlc-commits] tls: remove unused handshake argument
Rémi Denis-Courmont
git at videolan.org
Sun Nov 18 16:57:17 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 18 13:46:34 2018 +0200| [1973b8e76e583295bca0fd6d31d8a3c3577cafa7] | committer: Rémi Denis-Courmont
tls: remove unused handshake argument
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1973b8e76e583295bca0fd6d31d8a3c3577cafa7
---
include/vlc_tls.h | 4 ++--
modules/misc/gnutls.c | 4 ++--
modules/misc/securetransport.c | 18 +++++++++---------
src/network/tls.c | 2 +-
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/include/vlc_tls.h b/include/vlc_tls.h
index 730178f981..95569b55c7 100644
--- a/include/vlc_tls.h
+++ b/include/vlc_tls.h
@@ -144,7 +144,7 @@ typedef struct vlc_tls_creds
vlc_tls_t *(*open)(struct vlc_tls_creds *, vlc_tls_t *sock,
const char *host, const char *const *alpn);
- int (*handshake)(struct vlc_tls_creds *, vlc_tls_t *session,
+ int (*handshake)(vlc_tls_t *session,
const char *hostname, const char *service,
char ** /*restrict*/ alp);
} vlc_tls_creds_t;
@@ -172,7 +172,7 @@ VLC_API vlc_tls_creds_t *vlc_tls_ServerCreate(vlc_object_t *, const char *cert,
static inline int vlc_tls_SessionHandshake (vlc_tls_creds_t *crd,
vlc_tls_t *tls)
{
- return crd->handshake(crd, tls, NULL, NULL, NULL);
+ return crd->handshake(tls, NULL, NULL, NULL);
}
/**
diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index ecf2d68cf2..294f6bea5b 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -408,7 +408,7 @@ static vlc_tls_t *gnutls_ClientSessionOpen(vlc_tls_creds_t *crd,
return &priv->tls;
}
-static int gnutls_ClientHandshake(vlc_tls_creds_t *creds, vlc_tls_t *tls,
+static int gnutls_ClientHandshake(vlc_tls_t *tls,
const char *host, const char *service,
char **restrict alp)
{
@@ -624,7 +624,7 @@ static vlc_tls_t *gnutls_ServerSessionOpen(vlc_tls_creds_t *crd,
return (priv != NULL) ? &priv->tls : NULL;
}
-static int gnutls_ServerHandshake(vlc_tls_creds_t *crd, vlc_tls_t *tls,
+static int gnutls_ServerHandshake(vlc_tls_t *tls,
const char *host, const char *service,
char **restrict alp)
{
diff --git a/modules/misc/securetransport.c b/modules/misc/securetransport.c
index 18ae16eeab..66ebff781a 100644
--- a/modules/misc/securetransport.c
+++ b/modules/misc/securetransport.c
@@ -427,7 +427,7 @@ out:
* 1 if more would-be blocking recv is needed,
* 2 if more would-be blocking send is required.
*/
-static int st_Handshake (vlc_tls_creds_t *crd, vlc_tls_t *session,
+static int st_Handshake (vlc_tls_t *session,
const char *host, const char *service,
char **restrict alp) {
@@ -474,7 +474,7 @@ static int st_Handshake (vlc_tls_creds_t *crd, vlc_tls_t *session,
#endif
if (retValue == errSSLWouldBlock) {
- msg_Dbg(crd, "handshake is blocked, try again later");
+ msg_Dbg(sys->obj, "handshake is blocked, try again later");
return 1 + (sys->b_blocking_send ? 1 : 0);
}
@@ -483,26 +483,26 @@ static int st_Handshake (vlc_tls_creds_t *crd, vlc_tls_t *session,
if (sys->b_server_mode == false && st_validateServerCertificate(session, host) != 0) {
return -1;
}
- msg_Dbg(crd, "handshake completed successfully");
+ msg_Dbg(sys->obj, "handshake completed successfully");
sys->b_handshaked = true;
return 0;
case errSSLServerAuthCompleted:
- msg_Dbg(crd, "SSLHandshake returned errSSLServerAuthCompleted, continuing handshake");
- return st_Handshake(crd, session, host, service, alp);
+ msg_Dbg(sys->obj, "SSLHandshake returned errSSLServerAuthCompleted, continuing handshake");
+ return st_Handshake(session, host, service, alp);
case errSSLConnectionRefused:
- msg_Err(crd, "connection was refused");
+ msg_Err(sys->obj, "connection was refused");
return -1;
case errSSLNegotiation:
- msg_Err(crd, "cipher suite negotiation failed");
+ msg_Err(sys->obj, "cipher suite negotiation failed");
return -1;
case errSSLFatalAlert:
- msg_Err(crd, "fatal error occurred during handshake");
+ msg_Err(sys->obj, "fatal error occurred during handshake");
return -1;
default:
- msg_Err(crd, "handshake returned error %d", (int)retValue);
+ msg_Err(sys->obj, "handshake returned error %d", (int)retValue);
return -1;
}
}
diff --git a/src/network/tls.c b/src/network/tls.c
index 7767932b4d..307942b206 100644
--- a/src/network/tls.c
+++ b/src/network/tls.c
@@ -171,7 +171,7 @@ vlc_tls_t *vlc_tls_ClientSessionCreate(vlc_tls_creds_t *crd, vlc_tls_t *sock,
deadline += VLC_TICK_FROM_MS( var_InheritInteger (crd, "ipv4-timeout") );
vlc_cleanup_push (cleanup_tls, session);
- while ((val = crd->handshake(crd, session, host, service, alp)) != 0)
+ while ((val = crd->handshake(session, host, service, alp)) != 0)
{
struct pollfd ufd[1];
More information about the vlc-commits
mailing list