Browse Source

tls: keep track of the underlying file descriptor

pull/29/head
Rémi Denis-Courmont 11 years ago
parent
commit
8a0477a7f9
  1. 1
      include/vlc_tls.h
  2. 11
      src/network/tls.c

1
include/vlc_tls.h

@ -38,6 +38,7 @@ struct vlc_tls
VLC_COMMON_MEMBERS
void *sys;
int fd;
struct virtual_socket_t sock;
};

11
src/network/tls.c

@ -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,

Loading…
Cancel
Save