const imap_handler_hook *imap_lookup(int num_parms, ConstStr *Params) {
- struct CitContext *CCC = CC;
void *v;
- citimap *Imap = CCCIMAP;
+ citimap *Imap = IMAP;
if (num_parms < 1)
return NULL;
* Set up a message ID map for the current room (folder)
*/
void imap_load_msgids(void) {
- struct CitContext *CCC = CC;
struct cdbdata *cdbfr;
- citimap *Imap = CCCIMAP;
+ citimap *Imap = IMAP;
if (Imap->selected == 0) {
syslog(LOG_ERR, "imap_load_msgids() can't run; no room selected");
* Re-scan the selected room (folder) and see if it's been changed at all
*/
void imap_rescan_msgids(void) {
- struct CitContext *CCC = CC;
- citimap *Imap = CCCIMAP;
+ citimap *Imap = IMAP;
int original_num_msgs = 0;
long original_highest = 0L;
int i, j, jstart;
* the IMAP server.
*/
void imap_cleanup_function(void) {
- struct CitContext *CCC = CC;
- citimap *Imap = CCCIMAP;
+ citimap *Imap = IMAP;
/* Don't do this stuff if this is not a Imap session! */
if (CC->h_command_function != imap_command_loop)
*/
void imap_greeting(void) {
citimap *Imap;
- CitContext *CCC = CC;
- strcpy(CCC->cs_clientname, "IMAP session");
- CCC->session_specific_data = malloc(sizeof(citimap));
- Imap = (citimap *)CCC->session_specific_data;
+ strcpy(CC->cs_clientname, "IMAP session");
+ CC->session_specific_data = malloc(sizeof(citimap));
+ Imap = (citimap *)CC->session_specific_data;
memset(Imap, 0, sizeof(citimap));
Imap->authstate = imap_as_normal;
Imap->cached_rfc822_msgnum = (-1);
Imap->cached_rfc822_withbody = 0;
Imap->Reply = NewStrBufPlain(NULL, SIZ * 10); /* 40k */
- if (CCC->nologin) {
+ if (CC->nologin) {
IAPuts("* BYE; Server busy, try later\r\n");
- CCC->kill_me = KILLME_NOLOGIN;
+ CC->kill_me = KILLME_NOLOGIN;
IUnbuffer();
return;
}
* Does the real work for expunge.
*/
int imap_do_expunge(void) {
- struct CitContext *CCC = CC;
- citimap *Imap = CCCIMAP;
+ citimap *Imap = IMAP;
int i;
int num_expunged = 0;
long *delmsgs = NULL;
* Main command loop for IMAP sessions.
*/
void imap_command_loop(void) {
- struct CitContext *CCC = CC;
struct timeval tv1, tv2;
suseconds_t total_time = 0;
citimap *Imap;
const imap_handler_hook *h;
gettimeofday(&tv1, NULL);
- CCC->lastcmd = time(NULL);
- Imap = CCCIMAP;
+ CC->lastcmd = time(NULL);
+ Imap = IMAP;
flush_output();
if (Imap->Cmd.CmdBuf == NULL)