|
|
27f02a |
From 7a70f01fe8084431901433a2f74cb9c70fd00568 Mon Sep 17 00:00:00 2001
|
|
|
27f02a |
From: Timo Sirainen <timo.sirainen@open-xchange.com>
|
|
|
27f02a |
Date: Mon, 17 Aug 2020 18:26:01 +0300
|
|
|
27f02a |
Subject: [PATCH] lib-imap: Add imap_parser_client_read_tag()
|
|
|
27f02a |
|
|
|
27f02a |
---
|
|
|
27f02a |
src/lib-imap/imap-parser.c | 6 ++++++
|
|
|
27f02a |
src/lib-imap/imap-parser.h | 5 +++++
|
|
|
27f02a |
2 files changed, 11 insertions(+)
|
|
|
27f02a |
|
|
|
27f02a |
diff --git a/src/lib-imap/imap-parser.c b/src/lib-imap/imap-parser.c
|
|
|
27f02a |
index 52d79282fa..cc283f5c06 100644
|
|
|
27f02a |
--- a/src/lib-imap/imap-parser.c
|
|
|
27f02a |
+++ b/src/lib-imap/imap-parser.c
|
|
|
27f02a |
@@ -1014,3 +1014,9 @@ int imap_parser_read_command_name(struct imap_parser *parser,
|
|
|
27f02a |
{
|
|
|
27f02a |
return imap_parser_read_next_atom(parser, FALSE, name_r);
|
|
|
27f02a |
}
|
|
|
27f02a |
+
|
|
|
27f02a |
+int imap_parser_client_read_tag(struct imap_parser *parser,
|
|
|
27f02a |
+ const char **tag_r)
|
|
|
27f02a |
+{
|
|
|
27f02a |
+ return imap_parser_read_next_atom(parser, FALSE, tag_r);
|
|
|
27f02a |
+}
|
|
|
27f02a |
diff --git a/src/lib-imap/imap-parser.h b/src/lib-imap/imap-parser.h
|
|
|
27f02a |
index 5e09d61d2b..cd3748c00f 100644
|
|
|
27f02a |
--- a/src/lib-imap/imap-parser.h
|
|
|
27f02a |
+++ b/src/lib-imap/imap-parser.h
|
|
|
27f02a |
@@ -108,5 +108,10 @@ int imap_parser_read_tag(struct imap_parser *parser, const char **tag_r);
|
|
|
27f02a |
needed, -1 if input isn't a valid command name string. */
|
|
|
27f02a |
int imap_parser_read_command_name(struct imap_parser *parser,
|
|
|
27f02a |
const char **name_r);
|
|
|
27f02a |
+/* For IMAP clients: Read the command tag, which could also be "+" or "*".
|
|
|
27f02a |
+ Returns 1 if tag was returned, 0 if more data is needed, -1 if input isn't
|
|
|
27f02a |
+ valid. */
|
|
|
27f02a |
+int imap_parser_client_read_tag(struct imap_parser *parser,
|
|
|
27f02a |
+ const char **tag_r);
|
|
|
27f02a |
|
|
|
27f02a |
#endif
|