]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
make shure all of the struct is initialized properly if the DB doesn't give us enough...
[citadel.git] / citadel / msgbase.c
index b8b6d7c767cfccb0193e2e45adf95f295a9ccc66..830a07501b5e33a47f3e191243eda9701acb5b5c 100644 (file)
@@ -71,18 +71,6 @@ void AdjRefCountList(long *msgnum, long nmsg, int incr);
 
 int MessageDebugEnabled = 0;
 
-#define DBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (MessageDebugEnabled != 0))
-#define CCCID CCC->cs_pid
-#define MSG_syslog(LEVEL, FORMAT, ...)         \
-       DBGLOG(LEVEL) syslog(LEVEL,             \
-                            "CC[%d]" FORMAT,   \
-                            CCCID, __VA_ARGS__)
-
-#define MSGM_syslog(LEVEL, FORMAT)             \
-       DBGLOG(LEVEL) syslog(LEVEL,             \
-                            "CC[%d]" FORMAT,   \
-                            CCCID)
-
 /*
  * These are the four-character field headers we use when outputting
  * messages in Citadel format (as opposed to RFC822 format).
@@ -4169,8 +4157,8 @@ struct recptypes *validate_recipients(const char *supplied_recipients,
                ++num_recps;
 
                strcpy(org_recp, this_recp);
-               mailtype = alias(this_recp);
-               mailtype = alias(this_recp);
+               alias(this_recp);
+               alias(this_recp);
                mailtype = alias(this_recp);
                j = 0;
                for (j=0; !IsEmptyStr(&this_recp[j]); ++j) {
@@ -4386,7 +4374,6 @@ void cmd_ent0(char *entargs)
        char subject[SIZ];
        int subject_required = 0;
        int do_confirm = 0;
-       int verbose_reply = 0;
        long msgnum;
        int i, j;
        char buf[256];
@@ -4405,7 +4392,6 @@ void cmd_ent0(char *entargs)
        do_confirm = extract_int(entargs, 6);
        extract_token(cc, entargs, 7, '|', sizeof cc);
        extract_token(bcc, entargs, 8, '|', sizeof bcc);
-       verbose_reply = extract_int(entargs, 9);
        switch(CC->room.QRdefaultview) {
        case VIEW_NOTES:
        case VIEW_WIKI:
@@ -4658,25 +4644,19 @@ void cmd_ent0(char *entargs)
 
        if (msg != NULL) {
                msgnum = CtdlSubmitMsg(msg, valid, "", QP_EADDR);
-               if (verbose_reply)
-               {
-                       if (StrLength(CCC->StatusMessage)>0)
-                       {
-                               StrBufAppendBufPlain(CCC->StatusMessage, HKEY("\n000\n"), 0);
-                               cputbuf(CCC->StatusMessage);
-                       }
-                       else
-                               client_write(HKEY("\n000\n"));
-               }
-
                if (do_confirm) {
                        cprintf("%ld\n", msgnum);
-                       if (msgnum >= 0L) {
+
+                       if (StrLength(CCC->StatusMessage) > 0) {
+                               cprintf("%s\n", ChrPtr(CCC->StatusMessage));
+                       }
+                       else if (msgnum >= 0L) {
                                client_write(HKEY("Message accepted.\n"));
                        }
                        else {
                                client_write(HKEY("Internal error.\n"));
                        }
+
                        if (msg->cm_fields['E'] != NULL) {
                                cprintf("%s\n", msg->cm_fields['E']);
                        } else {