Redo the code for installing tls/sasl transport streams.
* include/mailutils/stream.h (MU_IOCTL_SWAP_STREAM): Remove. (MU_IOCTL_GET_STREAM, MU_IOCTL_SET_STREAM): New ioctls. * include/mailutils/sys/stream.h (_MU_SWAP_FIRST_ONLY) (_MU_SWAP_IOCTL_MUST_SUCCEED): Remove. (_mu_stream_swap_streams): Remove. * libmailutils/stream.c (_mu_stream_swap_streams): Remove. * libmailutils/filter_iconv.c (_icvt_ioctl): Handle MU_IOCTL_GET_STREAM, MU_IOCTL_SET_STREAM instead of MU_IOCTL_SWAP_STREAM. * libmailutils/iostream.c (_iostream_ctl): Likewise. * libmailutils/xscript-stream.c (_xscript_ctl): Likewise. * imap4d/auth_gsasl.c (restore_and_return): Unref the contents of str. (auth_gsasl): Use MU_IOCTL_GET_STREAM/MU_IOCTL_SET_STREAM to change the underlying transport streams. * imap4d/io.c (imap4d_init_tls_server): Likewise. * libproto/mailer/smtp_gsasl.c (insert_gsasl_stream): Likewise. * pop3d/extra.c (pop3d_init_tls_server): Likewise. * libproto/mailer/smtp_starttls.c (smtp_get_streams) (smtp_set_streams): New functions. (smtp_swap_streams): Remove. (mu_smtp_starttls): Use smtp_get_streams and smtp_set_streams instead of smtp_swap_streams. * libproto/pop/pop3_stls.c (pop3_get_streams) (pop3_set_streams): New functions. (pop3_swap_streams): Remove. (mu_pop3_stls): Use pop3_get_streams and pop3_set_streams. * testsuite/smtpsend.c (main): Uncomment mu_stream_unref on the carrier.
Showing
13 changed files
with
198 additions
and
175 deletions
-
Please register or sign in to post a comment