- 09 Oct, 2010 1 commit
-
-
- 08 Sep, 2010 3 commits
-
-
If a stream takes another stream(s) as a transport, it always increases its reference count. This means that when that stream is destroyed the underlying stream is not destroyed by default (its refcount is decreased, that's all). To force destruction of the underlying stream, the caller must explicitly unreference it after creating the stream that uses it (or give its creation function the MU_STREAM_AUTOCLOSE flag, if it supports flags). Similarly, if a stream uses a non-stream object (e.g. a file descriptor) as the transport, it will not destroy it, unless it has been created with the MU_STREAM_AUTOCLOSE flag. This differs from the previous behavior. The MU_STREAM_NO_CHECK and MU_STREAM_NO_CLOSE flags are removed. * examples/base64.c (main): Call mu_filter_create with the MU_STREAM_AUTOCLOSE flag. * examples/mimetest.c (message_display_parts): Likewise. * examples/murun.c (main): Unref the input stream after passing it to mu_filter_prog_stream_create. * imap4d/fetch.c (fetch_io): Update arguments to mu_filter_create and mu_memory_stream_create. * imap4d/preauth.c (decode64_buf) (do_preauth_ident): Update arguments to mu_memory_stream_create and mu_tcp_stream_create. * imap4d/util.c (util_setio): Update arguments to mu_filter_create and mu_stdio_stream_create. * include/mailutils/stream.h (MU_STREAM_NO_CLOSE) (MU_STREAM_NO_CHECK): Remove. (MU_STREAM_AUTOCLOSE): New flag. (mu_iostream_create): Remove the `flags' argument. * libmu_argp/muinit.c (mu_app_init): Update arguments to mu_stdio_stream_create. * libmu_auth/ldap.c: Update arguments to mu_memory_stream_create and mu_filter_create. * libmu_auth/tls.c (_tls_io_close, _tls_close): Always try to close the transport stream. Rely on refcount to protect it. (_tls_io_done, _tls_done): Likewise, always unreference it. (_mu_tls_io_stream_create): Increase reference counter on the transport stream, unless MU_STREAM_AUTOCLOSE is requested. (_mu_tls_stream_create): Rewrite using the new MU_STREAM_AUTOCLOSE logic. * libmu_sieve/extensions/spamd.c (spamd_connect_tcp): Update arguments to mu_tcp_stream_create. (spamd_connect_tcp): Update arguments to mu_socket_stream_create and mu_filter_create. * libmu_sieve/extensions/vacation.c (build_mime): Update arguments to mu_filter_create. * mail/decode.c (display_submessage): Update arguments to mu_filter_create. * mailbox/attachment.c (mu_message_save_attachment): Update arguments to mu_filter_create. * mailbox/cfg_driver.c (mu_cfg_tree_reduce): Update arguments to mu_stdio_stream_create. * mailbox/dbgstream.c (_dbg_done): Use MU_STREAM_AUTOCLOSE bit to decide whether to destroy the debug object. (mu_dbgstream_create): Use MU_STREAM_AUTOCLOSE instead of MU_STREAM_NO_CLOSE. * mailbox/file_stream.c (fd_close): Use MU_STREAM_AUTOCLOSE bit to decide whether to close the descriptor. (mu_file_stream_create): Force MU_STREAM_AUTOCLOSE bit. * mailbox/filter.c (filter_create_rd, filter_create_wr): Change substream creation logic. * mailbox/filter_iconv.c (_icvt_close): Always try to close the transport stream. Rely on refcount to protect it. (_icvt_done): Ditto for destroying it. (mu_filter_iconv_create): Increase refcount on the transport stream, unless MU_STREAM_AUTOCLOSE is requested. * mailbox/fltstream.c (filter_done): Always dereference the transport stream. Rely on refcount to protect it. (filter_close): Ditto for closing it. (mu_filter_stream_create): Increase refcount on the transport stream, unless MU_STREAM_AUTOCLOSE is requested. * mailbox/iostream.c (_iostream_close) : Always try to close the transport stream. Rely on refcount to protect it. (_iostream_done): Ditto for closing it. (mu_iostream_create): Remove the use of MU_STREAM_NO_CLOSE. * mailbox/mimehdr.c (mu_mimehdr_decode_param): Remove the use of MU_STREAM_NO_CLOSE. * mailbox/mutil.c (mu_decode_filter) Change substream creation logic. * mailbox/prog_stream.c (_prog_open): Use MU_STREAM_AUTOCLOSE bit in arguments to mu_stdio_stream_create. (mu_filter_prog_stream_create): Increase refcount on the transport (input) stream. * mailbox/rfc2047.c (mu_rfc2047_decode): Dereference in_stream after passing it to mu_decode_filter. Pass MU_STREAM_AUTOCLOSE in flags to mu_filter_create. * mailbox/socket_stream.c (mu_socket_stream_create): Force MU_STREAM_AUTOCLOSE bit. * mailbox/streamref.c (_streamref_close): Always close the transport stream (refcount will protect it, if necessary). (mu_streamref_create_abridged): Mask out the MU_STREAM_AUTOCLOSE bit. * mailbox/temp_file_stream.c (mu_temp_file_stream_create: Force MU_STREAM_AUTOCLOSE bit. * mailbox/xscript-stream.c (_xscript_close): Always close the transport stream (refcount will protect it, if necessary). (mu_xscript_stream_create): Increase refcounts on both underlying streams, unless MU_STREAM_AUTOCLOSE is set. * pop3d/extra.c (pop3d_setio): Remove uses of MU_STREAM_NO_CLOSE. * examples/nntpclient.c: Remove uses of MU_STREAM_NO_CHECK/MU_STREAM_NO_CLOSE. * examples/pop3client.c: Likewise. * libmu_auth/gsasl.c: Likewise. * libproto/nntp/nntp_stream.c: Likewise. * libproto/pop/pop3_stream.c: Likewise. * mailbox/tcp.c: Likewise. * mailbox/vartab.c: Likewise. * mh/mh_list.c: Likewise. * mimeview/mimeview.c: Likewise. * mh/mhn.c: Likewise. (edit_mime): Use MU_STREAM_AUTOCLOSE. Bugfixes: * mailbox/fltstream.c (init_iobuf): Fix input initialization. (filter_write_internal): Bugfix. * mailbox/stream.c (_stream_buffer_freespace): New macro. (_stream_buffer_is_full): New macro. (BUFFER_FULL_P): Remove, use _stream_buffer_is_full instead. All callers updated. (_stream_flush_buffer): Operation for full buffered streams does not depend on the `all' flag. (mu_stream_write): Fix calculation of the bytes available in the buffer.
Sergey Poznyakoff authored -
* comsat/action.c * imap4d/fetch.c * imap4d/search.c * mh/burst.c * mh/comp.c * mh/forw.c * mh/mh_ctx.c * mh/mh_format.c * mh/mh_list.c * mh/mhn.c * mh/pick.y * pop3d/retr.c * pop3d/top.c * readmsg/msglist.c * readmsg/readmsg.c
Sergey Poznyakoff authored -
Does not compile yet. New files: * mailbox/streamref.c * include/mailutils/sys/streamref.h * include/mailutils/sys/file_stream.h * include/mailutils/sys/header_stream.h * include/mailutils/sys/mapfile_stream.h * include/mailutils/sys/memory_stream.h * include/mailutils/sys/message_stream.h * include/mailutils/sys/prog_stream.h * include/mailutils/sys/socket_stream.h * include/mailutils/sys/stdio_stream.h * include/mailutils/sys/stream.h * include/mailutils/sys/streamtrans.h * mailbox/prog_stream.c * mailbox/stdio_stream.c * mailbox/stream_printf.c * mailbox/stream_vprintf.c * mailbox/temp_file_stream.c * mailbox/streamcpy.c * mailbox/binflt.c * mailbox/crlfflt.c * mailbox/fltstream.c * mailbox/qpflt.c * mailbox/linelenflt.c Removed files: * mailbox/filter_rfc822.c * mailbox/filter_trans.c Moved files (with edits): * libproto/include/filter0.h -> include/mailutils/sys/filter.h * libproto/include/header0.h -> include/mailutils/sys/header.h * libproto/include/message0.h -> include/mailutils/sys/message.h * libproto/include/mime0.h -> include/mailutils/sys/mime.h Modified files: * comsat/action.c * config/mailutils-config.c * examples/base64.c * examples/cpp/msg-send.cc * examples/header.c * examples/http.c * examples/iconv.c * examples/mimetest.c * examples/msg-send.c * examples/mta.c * examples/murun.c * examples/nntpclient.c * examples/pop3client.c * imap4d/append.c * imap4d/auth_gsasl.c * imap4d/fetch.c * imap4d/preauth.c * imap4d/search.c * imap4d/util.c * include/mailutils/body.h * include/mailutils/folder.h * include/mailutils/header.h * include/mailutils/mailbox.h * include/mailutils/mailer.h * include/mailutils/mailutils.h * include/mailutils/message.h * include/mailutils/stream.h * include/mailutils/sys/Makefile.am * include/mailutils/sys/filter.h * include/mailutils/sys/header.h * include/mailutils/sys/message.h * include/mailutils/sys/mime.h * include/mailutils/sys/nntp.h * include/mailutils/sys/pop3.h * include/mailutils/sys/stream.h * include/mailutils/types.hin * lib/mailcap.c * lib/mu_dbm.h * libmu_argp/muinit.c * libmu_auth/ldap.c * libmu_auth/tls.c * libmu_scm/Makefile.am * libmu_scm/mu_body.c * libmu_scm/mu_message.c * libmu_scm/mu_port.c * libmu_sieve/actions.c * libmu_sieve/extensions/pipe.c * libmu_sieve/extensions/spamd.c * libmu_sieve/extensions/vacation.c * libproto/mailer/smtp.c * libproto/mbox/mboxscan.c * libproto/mbox/mbox.c * libproto/mbox/mbox0.h * libproto/nntp/nntp_article.c * libproto/nntp/nntp_carrier.c * libproto/nntp/nntp_destroy.c * libproto/nntp/nntp_ihave.c * libproto/nntp/nntp_post.c * libproto/nntp/nntp_readline.c * libproto/nntp/nntp_sendline.c * libproto/pop/pop3_carrier.c * libproto/pop/pop3_destroy.c * libproto/pop/pop3_readline.c * libproto/pop/pop3_sendline.c * libproto/pop/pop3_stat.c * maidag/mailtmp.c * mail/decode.c * mail/escape.c * mail/msgset.y * mail/pipe.c * mail/print.c * mail/send.c * mail/top.c * mail/util.c * mail/write.c * mailbox/Makefile.am * mailbox/amd.c * mailbox/attachment.c * mailbox/body.c * mailbox/cfg_driver.c * mailbox/cfg_format.c * mailbox/debug.c * mailbox/file_stream.c * mailbox/folder.c * mailbox/hdritr.c * mailbox/header.c * mailbox/mailbox.c * mailbox/mailcap.c * mailbox/mailer.c * mailbox/mapfile_stream.c * mailbox/memory_stream.c * mailbox/message.c * mailbox/message_stream.c * mailbox/mime.c * mailbox/mimehdr.c * mailbox/mutil.c * mailbox/prog_stream.c * mailbox/progmailer.c * mailbox/rfc2047.c * mailbox/socket_stream.c * mailbox/stream.c * mailbox/stream_vprintf.c * mailbox/tcp.c * mailbox/vartab.c * mailbox/wicket.c * mh/burst.c * mh/comp.c * mh/compcommon.c * mh/forw.c * mh/mh_ctx.c * mh/mh_format.c * mh/mh_init.c * mh/mh_list.c * mh/mh_whatnow.c * mh/mhl.c * mh/mhn.c * mh/pick.y * mh/repl.c * mimeview/mimeview.c * mu-aux/generr.awk * pop3d/extra.c * pop3d/pop3d.h * pop3d/retr.c * pop3d/top.c * readmsg/msglist.c * readmsg/readmsg.c * sieve/sieve.c
Sergey Poznyakoff authored
-
- 14 Apr, 2010 1 commit
-
-
* mailbox/filter.c (filter_destroy): Destroy the underlying stream, unless flag is given. (mu_filter_create): Treat last argument as stream flags. * mailbox/filter_iconv.c (_icvt_destroy): Free the icvt_stream structure. * examples/mimetest.c (message_display_parts): Pass MU_STREAM_NO_CLOSE to the invocation of mu_filter_create. * mail/decode.c (display_submessage): Likewise. * mailbox/attachment.c (mu_message_save_attachment): Likewise. * mh/mh_list.c (eval_body): Likewise. * mh/mhn.c (mhn_message_size, show_internal): Likewise. (finish_text_msg): Likewise; call mu_stream_destroy * imap4d/preauth.c (decode64_buf): remove unnecessary call to mu_stream_destroy. * libmu_auth/ldap.c (chk_md5, chk_smd5) (chk_sha, chk_ssha): Likewise. * mailbox/mutil.c: Fix indentation.
Sergey Poznyakoff authored
-
- 05 Jan, 2010 1 commit
- 25 Aug, 2009 1 commit
-
-
The string MESSAGE should not begin with a capital letter when it follows a program name and/or file name, because that isn't the beginning of a sentence. (The sentence conceptually starts at the beginning of the line.) Also, it should not end with a period. * include/mailutils/diag.h (mu_diag_funcall): New prototype. * mailbox/diag.c: New function. * comsat/action.c, comsat/comsat.c, comsat/oldcfg.c, config/mailutils-config.c, configure.ac, dotlock/dotlock.c, frm/common.c, frm/from.c, guimb/collect.c, guimb/main.c, guimb/util.c, imap4d/auth_gsasl.c, imap4d/auth_gss.c, imap4d/bye.c, imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/preauth.c, imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, lib/mailcap.c, lib/tcpwrap.c, libmu_argp/mu_argp.c, libmu_auth/ldap.c, libmu_auth/radius.c, libmu_auth/sql.c, libmu_auth/tls.c, libmu_cfg/acl.c, libmu_cfg/common.c, libmu_cfg/init.c, libmu_cfg/ldap.c, libmu_cfg/sql.c, libmu_sieve/actions.c, libmu_sieve/comparator.c, libmu_sieve/extensions/moderator.c, libmu_sieve/prog.c, libmu_sieve/sieve.l, libproto/imap/folder.c, libproto/mbox/mbox.c, maidag/deliver.c, maidag/lmtp.c, maidag/maidag.c, maidag/mailquota.c, maidag/mailtmp.c, maidag/script.c, mail/alias.c, mail/cd.c, mailbox/cfg_lexer.l, mailbox/cfg_parser.y, mailbox/file_stream.c, mailbox/gocs.c, mailbox/msrv.c, mailbox/mutil.c, mailbox/registrar.c, messages/messages.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c, mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_format.c, mh/mh_init.c, mh/mh_list.c, mh/mh_msgset.c, mh/mh_whatnow.c, mh/mh_whom.c, mh/mhl.c, mh/mhn.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c, mh/scan.c, mh/send.c, mimeview/mimetypes.l, mimeview/mimeview.c, movemail/movemail.c, pop3d/apop.c, pop3d/bulletin.c, pop3d/extra.c, pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c, pop3d/popauth.c, pop3d/quit.c, pop3d/signal.c, pop3d/user.c, readmsg/readmsg.c, sieve/sieve.c: Fix error messages.
Sergey Poznyakoff authored
-
- 20 Aug, 2009 1 commit
-
-
* .gitignore: Add pathdefs.h * examples/Makefile.am (muauth_CPPFLAGS) (muemail_CPPFLAGS): New variables. * examples/argcv.c (main): Remove unused local. * include/mailutils/gsasl.h [USE_GSASL]: Change to WITH_GSASL. * include/mailutils/libcfg.h (mu_acl_cfg_init): New prototype. * include/mailutils/mu_auth.h (mu_authenticate): Password is const. * include/mailutils/python.h: Fix indentation. (mu_py_script_data): module_name is const char *. * libmu_auth/radius.c: Include radius/debug.h * libproto/mailer/smtp.c: Include io.h and secret.h * mail/mail.c: Fix indentation. * mail/util.c (util_rfc2047_decode): Fix local variable declaration. * mailbox/mu_auth.c (mu_authenticate): Password is const. * mh/mh.h (mh_alias_get, mh_alias_get_address) (mh_alias_get_alias): Name is const. * mh/mh_alias.y: Likewise. * mh/mh_list.c (print_header_value): Fix improper use of mu_toupper. * mh/mh_whatnow.c (invoke): Add typecasts. * python/libmu_py/nls.c (api_nls_set_locale): Remove unused automatic. * python/libmu_py/sieve.c (_sieve_error_printer): Provide missing return value. (_sieve_debug_printer): Likewise.
Sergey Poznyakoff authored
-
- 07 Jul, 2009 1 commit
-
-
* include/mailutils/cctype.h: New file. * include/mailutils/cstr.h: New file. * include/mailutils/Makefile.am: Add new files. * mailbox/cstrcasecmp.c: New file. * mailbox/cstrlower.c: New file. * mailbox/cstrupper.c: New file. * mailbox/muctype.c: New file. * mailbox/strltrim.c: New file. * mailbox/strrtrim.c: New file. * mailbox/strskip.c: New file. * mailbox/Makefile.am: Add new files. * .gitignore: Update * gnulib.modules: Remove strcase. * comsat/comsat.h, imap4d/imap4d.h, include/mailutils/mailutils.h, include/mailutils/mutil.h, include/mailutils/sys/pop3.h, libmu_scm/mu_scm.h, mail/mail.h: Include cstr.h and cctype.h. * comsat/oldcfg.c, config/mailutils-config.c, examples/mimetest.c, examples/mta.c, examples/nntpclient.c, examples/pop3client.c, imap4d/append.c, imap4d/create.c, imap4d/delete.c, imap4d/fetch.c, imap4d/id.c, imap4d/idle.c, imap4d/list.c, imap4d/namespace.c, imap4d/rename.c, imap4d/search.c, imap4d/status.c, imap4d/store.c, imap4d/uid.c, imap4d/util.c, libmu_argp/compat.c, libmu_auth/ldap.c, libmu_auth/sql.c, libmu_scm/mu_message.c, libmu_sieve/actions.c, libmu_sieve/comparator.c, libmu_sieve/extensions/list.c, libmu_sieve/extensions/spamd.c, libmu_sieve/extensions/vacation.c, libmu_sieve/load.c, libmu_sieve/sieve.l, libmu_sieve/tests.c, libproto/imap/folder.c, libproto/mailer/smtp.c, libproto/mbox/mbox.c, libproto/mh/folder.c, libproto/mh/mbox.c, libproto/pop/folder.c, libproto/pop/mbox.c, libproto/pop/pop3_connect.c, maidag/forward.c, maidag/lmtp.c, maidag/maidag.c, maidag/maidag.h, maidag/mailquota.c, mail/alt.c, mail/copy.c, mail/decode.c, mail/escape.c, mail/followup.c, mail/mail.c, mail/mailline.c, mail/msgset.y, mail/print.c, mail/reply.c, mail/send.c, mail/shell.c, mail/util.c, mail/write.c, mailbox/address.c, mailbox/amd.c, mailbox/assoc.c, mailbox/attachment.c, mailbox/attribute.c, mailbox/cfg_lexer.l, mailbox/date.c, mailbox/filter.c, mailbox/gdebug.c, mailbox/header.c, mailbox/kwd.c, mailbox/locale.c, mailbox/mailcap.c, mailbox/mailer.c, mailbox/message.c, mailbox/message_stream.c, mailbox/mime.c, mailbox/msrv.c, mailbox/mutil.c, mailbox/parse822.c, mailbox/progmailer.c, mailbox/rfc2047.c, mailbox/syslog.c, mailbox/url.c, mailbox/version.c, mh/mh.h, mh/mh_alias.l, mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_init.c, mh/mh_list.c, mh/mh_msgset.c, mh/mh_sequence.c, mh/mh_whatnow.c, mh/mh_whom.c, mh/mhn.c, mh/mhparam.c, mh/pick.y, mh/sortm.c, mimeview/mimetypes.y, pop3d/bulletin.c, pop3d/expire.c, pop3d/pop3d.c, pop3d/pop3d.h, pop3d/popauth.c, pop3d/user.c, readmsg/msglist.c, readmsg/readmsg.c, readmsg/readmsg.h, sql/mysql.c, sql/postgres.c: Use locale-independent cclass and str functions.
Sergey Poznyakoff authored
-
- 27 Jun, 2007 1 commit
-
-
- 17 May, 2006 1 commit
-
-
- 27 Aug, 2005 1 commit
-
-
- 26 Aug, 2005 1 commit
-
-
- 16 Aug, 2005 1 commit
-
-
- 17 May, 2005 1 commit
-
-
- 04 Jan, 2005 1 commit
-
-
begin messages with a capital letter, unless they are prefixed with `file:line:' or their exact look is important due to compatibility reasons. Do not end messages with a period. Avoid using contracted negations.
Sergey Poznyakoff authored
-
- 25 Dec, 2003 1 commit
-
-
- 17 Mar, 2003 1 commit
-
-
- 15 Mar, 2003 1 commit
- 13 Feb, 2003 1 commit
-
-