From 160c65c07175315edddfec7297ad400486a8cabd Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Mon, 1 Feb 2016 21:19:43 -0700 Subject: * Added support for RFC 2971 - IMAP ID extension. --- imap/src/c-client/mail.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'imap/src/c-client/mail.c') diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c index f3e4bdd2..f989e5d9 100644 --- a/imap/src/c-client/mail.c +++ b/imap/src/c-client/mail.c @@ -34,9 +34,10 @@ char *Panda_copyright = "Copyright 2008-2010 Mark Crispin\n"; char *UW_copyright = "Copyright 1988-2008 University of Washington\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n"; /* c-client global data */ - /* version of this library */ static char *mailcclientversion = CCLIENTVERSION; + /* app identity */ +static IDLIST *idapp = NIL; /* list of mail drivers */ static DRIVER *maildrivers = NIL; /* list of authenticators */ @@ -646,6 +647,10 @@ void *mail_parameters (MAILSTREAM *stream,long function,void *value) case GET_SNARFMAILBOXNAME: if (stream) ret = (void *) stream->snarf.name; break; + case SET_IDPARAMS: /* program id */ + idapp = (IDLIST *) value; + case GET_IDPARAMS: + ret = (void *) idapp; default: if ((r = smtp_parameters (function,value)) != NULL) ret = r; if ((r = env_parameters (function,value)) != NULL) ret = r; @@ -1410,6 +1415,16 @@ MAILHANDLE *mail_makehandle (MAILSTREAM *stream) return handle; } +void mail_free_idlist (IDLIST **idlist) +{ + if (idlist && *idlist){ + if((*idlist)->name) fs_give((void **)&(*idlist)->name); + if((*idlist)->value) fs_give((void **)&(*idlist)->value); + if((*idlist)->next) mail_free_idlist(&(*idlist)->next); + fs_give((void **) idlist); + } +} + /* Mail release handle * Accepts: Mail handle -- cgit v1.2.3-70-g09d2