X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fmessages.c;h=93107db0c5b074410bf2660f2e4a8afcadab3a51;hb=d1c8cf51268eca39767724aebc7e3a032ee5a3de;hp=acb2afee2669d971775b3d4db86473853d4857a9;hpb=307b5bacf88ba19b6d0ab6e0d647fd581b2c0058;p=citadel.git
diff --git a/webcit/messages.c b/webcit/messages.c
index acb2afee2..93107db0c 100644
--- a/webcit/messages.c
+++ b/webcit/messages.c
@@ -1007,8 +1007,8 @@ void post_message(void)
const StrBuf *my_email_addr = NULL;
StrBuf *CmdBuf = NULL;
StrBuf *references = NULL;
- int saving_to_drafts;
- long HeaderLen;
+ int saving_to_drafts = 0;
+ long HeaderLen = 0;
saving_to_drafts = !strcasecmp(bstr("submit_action"), "drafts");
Buf = NewStrBuf();
@@ -1127,8 +1127,7 @@ void post_message(void)
}
dont_post = lbstr("postseq");
} else {
- /* FIXME */
- syslog(9, "\033[31m%s:%d: server post error: %s\033[0m", __FILE__, __LINE__, ChrPtr(Buf) + 4);
+ syslog(9, "%s:%d: server post error: %s", __FILE__, __LINE__, ChrPtr(Buf) + 4);
AppendImportantMessage(ChrPtr(Buf) + 4, StrLength(Buf) - 4);
display_enter();
if (saving_to_drafts) gotoroom(WCC->CurRoom.name);
@@ -1595,15 +1594,20 @@ void display_enter(void)
rc = GetServerStatusMsg(CmdBuf, &Result, 0, 0);
- if (Result == 570) { /* 570 means we have an invalid recipient listed */
- if (havebstr("recp") &&
- havebstr("cc" ) &&
- havebstr("bcc" )) {
- recipient_bad = 1; /* TODO: and now????? */
+ if ( (Result == 570) /* invalid or missing recipient(s) */
+ || (Result == 550) /* access control problem */
+ ) {
+ if ( havebstr("recp")
+ && havebstr("cc")
+ && havebstr("bcc")
+ ) {
+ recipient_bad = 1; /* FIXME ... do something with this? */
}
}
else if (rc != 2) { /* Any other error means that we cannot continue */
- wc_printf("%s
\n", ChrPtr(CmdBuf) +4); /* TODO -> important message */
+
+ /* FIXME IMMEDIATELY this code results in a blank screen!!! */
+ wc_printf("%s
\n", ChrPtr(CmdBuf) +4);
FreeStrBuf(&CmdBuf);
return;
}