dovecot-2.2: lib-imap-urlauth: Added API for using the fetch int...

dovecot at dovecot.org dovecot at dovecot.org
Thu May 30 18:05:20 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/fc2ba01feb78
changeset: 16425:fc2ba01feb78
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Thu May 30 18:04:58 2013 +0300
description:
lib-imap-urlauth: Added API for using the fetch interface with an already parsed IMAP URL object.

diffstat:

 src/lib-imap-urlauth/imap-urlauth-fetch.c |  13 ++++++++++++-
 src/lib-imap-urlauth/imap-urlauth-fetch.h |   4 ++++
 2 files changed, 16 insertions(+), 1 deletions(-)

diffs (51 lines):

diff -r 8d20f3cde49a -r fc2ba01feb78 src/lib-imap-urlauth/imap-urlauth-fetch.c
--- a/src/lib-imap-urlauth/imap-urlauth-fetch.c	Thu May 30 18:04:52 2013 +0300
+++ b/src/lib-imap-urlauth/imap-urlauth-fetch.c	Thu May 30 18:04:58 2013 +0300
@@ -348,7 +348,6 @@
 	struct mail_user *mail_user = uctx->user;
 	struct imap_url *imap_url;
 	const char *error, *errormsg;
-	int ret = 0;
 
 	/* parse the url */
 	if (imap_url_parse(url, NULL, url_parse_flags, &imap_url, &error) < 0) {
@@ -363,6 +362,18 @@
 		return 1;
 	}
 
+	return imap_urlauth_fetch_url_parsed(ufetch, url, imap_url, url_flags);
+}
+
+int imap_urlauth_fetch_url_parsed(struct imap_urlauth_fetch *ufetch,
+			   const char *url, struct imap_url *imap_url,
+			   enum imap_urlauth_fetch_flags url_flags)
+{
+	struct imap_urlauth_context *uctx = ufetch->uctx;
+	struct mail_user *mail_user = uctx->user;
+	const char *error, *errormsg;
+	int ret = 0;
+
 	ufetch->failed = FALSE;
 	ufetch->pending_requests++;
 
diff -r 8d20f3cde49a -r fc2ba01feb78 src/lib-imap-urlauth/imap-urlauth-fetch.h
--- a/src/lib-imap-urlauth/imap-urlauth-fetch.h	Thu May 30 18:04:52 2013 +0300
+++ b/src/lib-imap-urlauth/imap-urlauth-fetch.h	Thu May 30 18:04:58 2013 +0300
@@ -1,6 +1,7 @@
 #ifndef IMAP_URLAUTH_FETCH_H
 #define IMAP_URLAUTH_FETCH_H
 
+struct imap_url;
 struct imap_urlauth_context;
 struct imap_urlauth_fetch;
 
@@ -45,6 +46,9 @@
 
 int imap_urlauth_fetch_url(struct imap_urlauth_fetch *ufetch, const char *url,
 			   enum imap_urlauth_fetch_flags url_flags);
+int imap_urlauth_fetch_url_parsed(struct imap_urlauth_fetch *ufetch,
+			   const char *url, struct imap_url *imap_url,
+			   enum imap_urlauth_fetch_flags url_flags);
 
 bool imap_urlauth_fetch_continue(struct imap_urlauth_fetch *ufetch);
 bool imap_urlauth_fetch_is_pending(struct imap_urlauth_fetch *ufetch);


More information about the dovecot-cvs mailing list