Commit 000d5d3f authored by David Fuhrmann's avatar David Fuhrmann

securetransport: remove wrong check in recv function

sys should always be set (but lets assert if not), buf == NULL
should not be called from VLC as well. And the return value was
kind of wrong.
parent 80f2d6a7
......@@ -428,6 +428,7 @@ static int st_Handshake (vlc_tls_creds_t *crd, vlc_tls_t *session,
static ssize_t st_Send (vlc_tls_t *session, const void *buf, size_t length)
{
vlc_tls_sys_t *sys = session->sys;
assert(sys);
OSStatus ret = noErr;
/*
......@@ -481,9 +482,7 @@ static ssize_t st_Send (vlc_tls_t *session, const void *buf, size_t length)
static ssize_t st_Recv (vlc_tls_t *session, void *buf, size_t length)
{
vlc_tls_sys_t *sys = session->sys;
if (sys == NULL || buf == NULL)
return 0;
assert(sys);
size_t actualSize;
OSStatus ret = SSLRead(sys->p_context, buf, length, &actualSize);
......
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