(_gsasl_get_fd): New function.
(gsasl_stream_create): Install _get_fd method
Showing
1 changed file
with
8 additions
and
1 deletions
... | @@ -330,6 +330,13 @@ _gsasl_strerror (stream_t stream, const char **pstr) | ... | @@ -330,6 +330,13 @@ _gsasl_strerror (stream_t stream, const char **pstr) |
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
333 | int | ||
334 | _gsasl_get_fd (stream_t stream, int *pfd) | ||
335 | { | ||
336 | struct _gsasl_stream *s = stream_get_owner (stream); | ||
337 | *pfd = s->fd; | ||
338 | return 0; | ||
339 | } | ||
333 | 340 | ||
334 | int | 341 | int |
335 | gsasl_stream_create (stream_t *stream, int fd, | 342 | gsasl_stream_create (stream_t *stream, int fd, |
... | @@ -365,7 +372,7 @@ gsasl_stream_create (stream_t *stream, int fd, | ... | @@ -365,7 +372,7 @@ gsasl_stream_create (stream_t *stream, int fd, |
365 | stream_set_flush (*stream, _gsasl_flush, s); | 372 | stream_set_flush (*stream, _gsasl_flush, s); |
366 | stream_set_destroy (*stream, _gsasl_destroy, s); | 373 | stream_set_destroy (*stream, _gsasl_destroy, s); |
367 | stream_set_strerror (*stream, _gsasl_strerror, s); | 374 | stream_set_strerror (*stream, _gsasl_strerror, s); |
368 | 375 | stream_set_fd (*stream, _gsasl_get_fd, s); | |
369 | if (flags & MU_STREAM_READ) | 376 | if (flags & MU_STREAM_READ) |
370 | stream_set_readline (*stream, _gsasl_readline, s); | 377 | stream_set_readline (*stream, _gsasl_readline, s); |
371 | else | 378 | else | ... | ... |
-
Please register or sign in to post a comment