From d1bf9aa641a8c3059682f7e54d4f651b0eff44c1 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 16 May 2012 22:58:16 -0400 Subject: [PATCH] Reverted most of e40ba85133cf6401bda3d6b81a1d144d73d25074 because it broke the protocol semantics and only provided a function that the protocol was already capable of doing. 'verbose_reply' is now gone. If the client wants a verbose reply, use the 'do_confirm' semantics, which invokes protocol mode 8 (send listing then receive listing) instead of mode 4 (send listing). --- citadel/msgbase.c | 20 ++++++-------------- webcit/vcard_edit.c | 4 +--- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 134c3c100..dd1e1d33a 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -4374,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]; @@ -4393,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: @@ -4646,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 { diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index 5ec2799af..d531098c6 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -1275,7 +1275,7 @@ void submit_vcard(void) { } Buf = NewStrBuf(); - serv_write(HKEY("ENT0 1|||4||||||1\n")); + serv_write(HKEY("ENT0 1|||4\n")); if (!StrBuf_ServGetln(Buf) && (GetServerStatus(Buf, NULL) != 4)) { edit_vcard(); @@ -1344,8 +1344,6 @@ void submit_vcard(void) { serv_write(HKEY("000\n")); free(serialized_vcard); - StrBuf_ServGetln(Buf); - if (!strcmp(bstr("return_to"), "select_user_to_edit")) { select_user_to_edit(NULL); } -- 2.30.2