Commit 8a0477a7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

tls: keep track of the underlying file descriptor

parent 7c5554a0
......@@ -38,6 +38,7 @@ struct vlc_tls
VLC_COMMON_MEMBERS
void *sys;
int fd;
struct virtual_socket_t sock;
};
......
......@@ -151,10 +151,13 @@ vlc_tls_t *vlc_tls_SessionCreate (vlc_tls_creds_t *crd, int fd,
vlc_tls_t *session = vlc_custom_create (crd, sizeof (*session),
"tls session");
int val = crd->open (crd, session, fd, host, alpn);
if (val == VLC_SUCCESS)
return session;
vlc_object_release (session);
return NULL;
if (val != VLC_SUCCESS)
{
vlc_object_release (session);
return NULL;
}
session->fd = fd;
return session;
}
int vlc_tls_SessionHandshake (vlc_tls_t *session, const char *host,
......
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