diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-01-28 21:41:49 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-01-28 21:41:49 +0000 |
commit | 0aaf6a71627fdaff310296269f35e235478b01f4 (patch) | |
tree | 67599917ade8f01d0ed40fc80c42a9c36fb330bf /auth | |
parent | 4895e88de82241291d4cebc37b54c478f5bf90a1 (diff) | |
download | mailutils-0aaf6a71627fdaff310296269f35e235478b01f4.tar.gz mailutils-0aaf6a71627fdaff310296269f35e235478b01f4.tar.bz2 |
(_tls_get_fd): New function.
(tls_stream_create): Install _get_fd method
Diffstat (limited to 'auth')
-rw-r--r-- | auth/tls.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/auth/tls.c b/auth/tls.c index a80cc77ff..0115eca0f 100644 --- a/auth/tls.c +++ b/auth/tls.c @@ -366,6 +366,15 @@ _tls_strerror (stream_t stream, const char **pstr) return 0; } +/* FIXME: It returns only input fd */ +int +_tls_get_fd (stream_t stream, int *pfd) +{ + struct _tls_stream *s = stream_get_owner (stream); + *pfd = s->ifd; + return 0; +} + int tls_stream_create (stream_t *stream, int in_fd, int out_fd, int flags) { @@ -397,6 +406,7 @@ tls_stream_create (stream_t *stream, int in_fd, int out_fd, int flags) stream_set_flush (*stream, _tls_flush, s); stream_set_destroy (*stream, _tls_destroy, s); stream_set_strerror (*stream, _tls_strerror, s); + stream_set_fd (*stream, _tls_get_fd, s); s->state = state_init; return 0; |