dovecot-2.0: lib-imap: Added imap_parser_set_streams().

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 05:46:27 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/e0e6d941941c
changeset: 10697:e0e6d941941c
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 13 05:44:20 2010 +0200
description:
lib-imap: Added imap_parser_set_streams().

diffstat:

 src/lib-imap/imap-parser.c |  7 +++++++
 src/lib-imap/imap-parser.h |  4 ++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r 57814e99b451 -r e0e6d941941c src/lib-imap/imap-parser.c
--- a/src/lib-imap/imap-parser.c	Sat Feb 13 05:44:09 2010 +0200
+++ b/src/lib-imap/imap-parser.c	Sat Feb 13 05:44:20 2010 +0200
@@ -97,6 +97,13 @@
 	parser->literal_size_return = FALSE;
 }
 
+void imap_parser_set_streams(struct imap_parser *parser, struct istream *input,
+			     struct ostream *output)
+{
+	parser->input = input;
+	parser->output = output;
+}
+
 const char *imap_parser_get_error(struct imap_parser *parser, bool *fatal)
 {
         *fatal = parser->fatal_error;
diff -r 57814e99b451 -r e0e6d941941c src/lib-imap/imap-parser.h
--- a/src/lib-imap/imap-parser.h	Sat Feb 13 05:44:09 2010 +0200
+++ b/src/lib-imap/imap-parser.h	Sat Feb 13 05:44:20 2010 +0200
@@ -107,6 +107,10 @@
 /* Reset the parser to initial state. */
 void imap_parser_reset(struct imap_parser *parser);
 
+/* Change parser's input and output streams */
+void imap_parser_set_streams(struct imap_parser *parser, struct istream *input,
+			     struct ostream *output);
+
 /* Return the last error in parser. fatal is set to TRUE if there's no way to
    continue parsing, currently only if too large non-sync literal size was
    given. */


More information about the dovecot-cvs mailing list