]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/modules/imap/serv_imap.c
serv_imap: removed all the CCC and CCCIMAP shorthand
[citadel.git] / citadel / server / modules / imap / serv_imap.c
index b42c5022b80ac8ca929615ee7f62e719e4c97b3e..621d21396b8a03000eafecb2a1c3fa0d328b179b 100644 (file)
@@ -63,9 +63,8 @@ void registerImapCMD(const char *First, long FLen, const char *Second, long SLen
 
 
 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;
@@ -257,9 +256,8 @@ void imap_add_single_msgid(long msgnum, void *userdata) {
  * 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");
@@ -292,8 +290,7 @@ void imap_load_msgids(void) {
  * 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;
@@ -411,8 +408,7 @@ void imap_rescan_msgids(void) {
  * 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)
@@ -511,20 +507,19 @@ void imap_id(int num_parms, ConstStr *Params) {
  */
 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;
        }
@@ -862,8 +857,7 @@ void imap_select(int num_parms, ConstStr *Params) {
  * 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;
@@ -1408,7 +1402,6 @@ void imap_rename(int num_parms, ConstStr *Params) {
  * 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;
@@ -1416,8 +1409,8 @@ void imap_command_loop(void) {
        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)