]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
* msgbase.c: when a summary mode message list is requested, and the room
[citadel.git] / citadel / msgbase.c
index 31ccb60d6c32f4ade3d8b1540158c0626bbb0e91..f09afc41dafe3bbda73771499a29d74964109faa 100644 (file)
@@ -5,10 +5,6 @@
  *
  */
 
-#ifdef DLL_EXPORT
-#define IN_LIBCIT
-#endif
-
 #include "sysdep.h"
 #include <stdlib.h>
 #include <unistd.h>
@@ -281,7 +277,7 @@ void headers_listing(long msgnum, void *userdata)
        struct CtdlMessage *msg;
 
        msg = CtdlFetchMessage(msgnum, 0);
-       if (msg < 0L) {
+       if (msg == NULL) {
                cprintf("%ld|0|||||\n", msgnum);
                return;
        }
@@ -1169,8 +1165,6 @@ void choose_preferred(char *name, char *filename, char *partnum, char *disp,
                        extract_token(buf, CC->preferred_formats, i, '|', sizeof buf);
                        if (!strcasecmp(buf, cbtype)) {
                                if (num_tokens(partnum, '.') < 3) {
-                                       lprintf(CTDL_DEBUG, "REPLACING MA <%s> WITH <%s>\n",
-                                               ma->chosen_part, partnum);
                                        safestrncpy(ma->chosen_part, partnum, sizeof ma->chosen_part);
                                }
                        }
@@ -1315,7 +1309,7 @@ int CtdlOutputMsg(long msg_num,           /* message number (local) to fetch */
        /* Here is the weird form of this command, to process only an
         * encapsulated message/rfc822 section.
         */
-       if (section) {
+       if (section) if (strlen(section)>0) if (strcmp(section, "0")) {
                memset(&encap, 0, sizeof encap);
                safestrncpy(encap.desired_section, section, sizeof encap.desired_section);
                mime_parser(TheMessage->cm_fields['M'],
@@ -2748,7 +2742,7 @@ struct recptypes *validate_recipients(char *supplied_recipients) {
        char this_recp[256];
        char this_recp_cooked[256];
        char append[SIZ];
-       int num_recps;
+       int num_recps = 0;
        int i, j;
        int mailtype;
        int invalid;
@@ -3364,6 +3358,7 @@ void cmd_move(char *args)
 
        num = extract_long(args, 0);
        extract_token(targ, args, 1, '|', sizeof targ);
+       convert_room_name_macros(targ, sizeof targ);
        targ[ROOMNAMELEN - 1] = 0;
        is_copy = extract_int(args, 2);