]> code.citadel.org Git - citadel.git/commitdiff
* Fixed some small IMAP bugs
authorArt Cancro <ajc@citadel.org>
Wed, 7 Mar 2001 04:02:28 +0000 (04:02 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 7 Mar 2001 04:02:28 +0000 (04:02 +0000)
citadel/ChangeLog
citadel/serv_imap.c
citadel/user_ops.c

index 7bb68008d3867e8209c268bf74e882efd3d3c529..6ef26fda25ab68ddc0ad059861e273cda0caeb7f 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 573.109  2001/03/07 04:02:27  ajc
+ * Fixed some small IMAP bugs
+
  Revision 573.108  2001/03/06 04:44:00  ajc
  * Probable completion of STATUS, COPY, STORE, and EXPUNGE commands in IMAP
 
@@ -2438,4 +2441,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
-
index 35825e1728e41ca73a854b1106c14e95fe544707..46f87601226ffcd5e2df18b47133c22dd0761c14 100644 (file)
@@ -375,6 +375,8 @@ void imap_select(int num_parms, char *parms[]) {
        /* FIXME ... much more info needs to be supplied here */
        cprintf("* %d EXISTS\r\n", msgs);
        cprintf("* %d RECENT\r\n", new);
+       cprintf("* FLAGS (\\Deleted)\r\n");
+       cprintf("* OK [PERMANENTFLAGS (\\Deleted)] permanent flags\r\n");
        cprintf("* OK [UIDVALIDITY 0] UIDs valid\r\n");
        cprintf("%s OK [%s] %s completed\r\n",
                parms[0],
index 03991774465d6fc8ee178ea6750df446f2e875ca..b54b73f8087688601e7cbbe9f839528699b1ac1a 100644 (file)
@@ -287,14 +287,16 @@ int getuserbynumber(struct usersupp *usbuf, long int number)
 /*
  * Back end for cmd_user() and its ilk
  */
-int CtdlLoginExistingUser(char *username)
+int CtdlLoginExistingUser(char *trythisname)
 {
+       char username[SIZ];
        char autoname[SIZ];
        int found_user = 0;
        struct passwd *p;
        int a;
 
-       username[25] = 0;
+       if (trythisname == NULL) return login_not_found;
+       safestrncpy(username, trythisname, sizeof username);
        strproc(username);
 
        if ((CC->logged_in)) {
@@ -486,15 +488,19 @@ int CtdlTryPassword(char *password)
        int code;
 
        if ((CC->logged_in)) {
+               lprintf(5, "CtdlTryPassword: already logged in\n");
                return pass_already_logged_in;
        }
        if (!strcmp(CC->curr_user, NLI)) {
+               lprintf(5, "CtdlTryPassword: no user selected\n");
                return pass_no_user;
        }
        if (getuser(&CC->usersupp, CC->curr_user)) {
+               lprintf(5, "CtdlTryPassword: internal error\n");
                return pass_internal_error;
        }
        if (password == NULL) {
+               lprintf(5, "CtdlTryPassword: NULL password string supplied\n");
                return pass_wrong_password;
        }
        code = (-1);