]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/serv_imap.c
Don't output a space between imap namespaces
[citadel.git] / citadel / modules / imap / serv_imap.c
index 5ddae608a15b3beb450efd062779376e2143df50..cd0de575d0f6fd4e96aeebf5905695a26aea8228 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$ 
- *
  * IMAP server for the Citadel system
  * Copyright (C) 2000-2009 by Art Cancro and others.
  * This code is released under the terms of the GNU General Public License.
@@ -128,7 +126,7 @@ void imap_free_transmitted_message(void)
  */
 void imap_set_seen_flags(int first_msg)
 {
-       struct visit vbuf;
+       visit vbuf;
        int i;
        int num_sets;
        int s;
@@ -556,6 +554,11 @@ void imap_login(int num_parms, ConstStr *Params)
                                cprintf("] Hello, %s\r\n", CC->user.fullname);
                                return;
                        }
+                       else
+                       {
+                               cprintf("%s NO AUTHENTICATE %s failed\r\n",
+                                       Params[0].Key, Params[3].Key);
+                       }
                }
 
                cprintf("%s BAD Login incorrect\r\n", Params[0].Key);
@@ -909,7 +912,7 @@ void imap_namespace(int num_parms, ConstStr *Params)
        for (i = 0; i < MAXFLOORS; ++i) {
                fl = CtdlGetCachedFloor(i);
                if (fl->f_flags & F_INUSE) {
-                       if (floors > 0) cprintf(" ");
+                       /* if (floors > 0) cprintf(" "); samjam says this confuses javamail */
                        cprintf("(");
                        snprintf(Namespace, sizeof(Namespace), "%s/", fl->f_name);
                        plain_imap_strout(Namespace);
@@ -1426,7 +1429,7 @@ void imap_command_loop(void)
                CtdlLogPrintf(CTDL_INFO, "IMAP: <plain_auth>\n");
        }
        else if ((Imap->authstate == imap_as_expecting_multilineusername) || 
-                bmstrcasestr(ChrPtr(Imap->Cmd.CmdBuf), " LOGIN ")) {
+                cbmstrcasestr(ChrPtr(Imap->Cmd.CmdBuf), " LOGIN ")) {
                CtdlLogPrintf(CTDL_INFO, "IMAP: LOGIN...\n");
        }
        else {
@@ -1744,5 +1747,5 @@ CTDL_MODULE_INIT(imap)
        }
        
        /* return our Subversion id for the Log */
-       return "$Id$";
+       return "imap";
 }