Commit 4895e88d 4895e88de82241291d4cebc37b54c478f5bf90a1 by Sergey Poznyakoff

(_gsasl_get_fd): New function.

(gsasl_stream_create): Install _get_fd method
1 parent 36ed0f22
...@@ -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
......