summaryrefslogtreecommitdiff
path: root/imap
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-10-03 13:43:35 -0600
committerEduardo Chappa <chappa@washington.edu>2020-10-03 13:43:35 -0600
commit9064dd878d981f06e15278605ba34a299eba375f (patch)
treee85fe2dc77658427d6a013d6a5b39b1028d987c2 /imap
parent2f6e4c8855e3ea23cbbfcb1a91ea10abbda29d85 (diff)
downloadalpine-9064dd878d981f06e15278605ba34a299eba375f.tar.xz
* Set up the IMAP ID at the moment of loging in to the server, rather than
as a one time option, in case we need to use a special IMAP ID.
Diffstat (limited to 'imap')
-rw-r--r--imap/src/c-client/mail.c10
-rw-r--r--imap/src/c-client/mail.h4
2 files changed, 13 insertions, 1 deletions
diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c
index b52d062..981025c 100644
--- a/imap/src/c-client/mail.c
+++ b/imap/src/c-client/mail.c
@@ -326,6 +326,16 @@ void mail_link (DRIVER *driver)
driver->next = NIL; /* this driver is the end of the list */
}
+void free_id(IDLIST **idp)
+{
+ if(!idp || !*idp) return;
+
+ if((*idp)->name) fs_give((void **) &(*idp)->name);
+ if((*idp)->value) fs_give((void **) &(*idp)->value);
+ if((*idp)->next) free_id (&(*idp)->next);
+ fs_give((void **)idp);
+}
+
/* Mail manipulate driver parameters
* Accepts: mail stream
* function code
diff --git a/imap/src/c-client/mail.h b/imap/src/c-client/mail.h
index 13bbc84..79f0b3f 100644
--- a/imap/src/c-client/mail.h
+++ b/imap/src/c-client/mail.h
@@ -1890,7 +1890,7 @@ void auth_link (AUTHENTICATOR *auth);
char *mail_auth (char *mechanism,authresponse_t resp,int argc,char *argv[]);
AUTHENTICATOR *mail_lookup_auth (unsigned long i);
unsigned int mail_lookup_auth_name (char *mechanism,long flags);
-
+void free_id(IDLIST **);
NETSTREAM *net_open (NETMBX *mb,NETDRIVER *dv,unsigned long port,
NETDRIVER *ssld,char *ssls,unsigned long sslp);
NETSTREAM *net_open_work (NETDRIVER *dv,char *host,char *service,
@@ -1986,6 +1986,8 @@ typedef struct oauth2_s {
OAUTH2_SERVER_METHOD_S server_mthd[OA2_GetEnd];
OAUTH2_DEVICECODE_S devicecode;
char *access_token;
+ char *app_id; /* special id for this server */
+ unsigned hide:1; /* hide this from user */
unsigned long expiration;
unsigned int first_time:1; /* this is the first time we get credentials for this account */
unsigned int require_secret:1; /* this server requires a client-secret */