diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-07-28 20:52:28 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-07-28 20:52:28 -0600 |
commit | 0d181b64d4d433a5ec88c4bfd55cd5a1d5f9a1da (patch) | |
tree | 981d63dd006c04c1b884d0b6cbbcd6a405593ae0 /imap/src/c-client/mail.c | |
parent | 6591233b484d8f303b64f9042aee516d1b3a9cc6 (diff) | |
download | alpine-0d181b64d4d433a5ec88c4bfd55cd5a1d5f9a1da.tar.xz |
* XOAUTH2: automatic renew of access token and connection to a server
within 60 seconds of expiration of the access token.
Diffstat (limited to 'imap/src/c-client/mail.c')
-rw-r--r-- | imap/src/c-client/mail.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c index a9688d4b..b52d0626 100644 --- a/imap/src/c-client/mail.c +++ b/imap/src/c-client/mail.c @@ -1238,6 +1238,17 @@ long mail_status_default (MAILSTREAM *stream,char *mbx,long flags) return T; /* success */ } +/* Mail renew stream + * Accepts: stream to renew + * returns: 0 for success, 1 for failure + */ +long mail_renew_stream (MAILSTREAM *stream) +{ + MAILSTREAM *m = mail_open(NIL, stream->original_mailbox, OP_SILENT); + long rv = stream && m ? (stream->dtb->renew)(stream, m) : 1; + mail_close(m); + return rv; +} /* Mail open * Accepts: candidate stream for recycling * mailbox name |