Commit 0ac1b96b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

tls: document vlc_tls_SessionDelete()

parent 55d00831
......@@ -72,6 +72,16 @@ VLC_API vlc_tls_t *vlc_tls_ClientSessionCreate (vlc_tls_creds_t *, int fd,
vlc_tls_t *vlc_tls_SessionCreate (vlc_tls_creds_t *, int fd, const char *host,
const char *const *alpn);
/**
* Shuts a TLS session down.
*
* Shuts a TLS session down (if it was succesfully established) and releases
* all resources. The underlying connection is preserved. Use vlc_tls_Close()
* instead to shut it down at the same.
*
* This function is non-blocking and is not a cancellation point.
*/
VLC_API void vlc_tls_SessionDelete (vlc_tls_t *);
VLC_API int vlc_tls_Read(vlc_tls_t *, void *buf, size_t len, bool waitall);
......
......@@ -149,7 +149,10 @@ vlc_tls_t *vlc_tls_SessionCreate (vlc_tls_creds_t *crd, int fd,
void vlc_tls_SessionDelete (vlc_tls_t *session)
{
session->close (session);
int canc = vlc_savecancel();
session->close(session);
vlc_restorecancel(canc);
free(session);
}
......
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