From: Art Cancro Date: Sat, 28 Oct 2006 18:17:24 +0000 (+0000) Subject: Obtain MIME objects using DLAT cmd instead of OPNA where appropriate X-Git-Tag: v7.86~3871 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=8c70e2eb56e9cb967c723e0932ad7c96044c14cf;p=citadel.git Obtain MIME objects using DLAT cmd instead of OPNA where appropriate --- diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index 187646193..cb17968a4 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -89,21 +89,18 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { } } - sprintf(buf, "OPNA %ld|%s", msgnum, partnum); + sprintf(buf, "DLAT %ld|%s", msgnum, partnum); serv_puts(buf); serv_getln(buf, sizeof buf); - if (buf[0] != '2') { + if (buf[0] != '6') { convenience_page("770000", "Error", &buf[4]); return; } total_len = atoi(&buf[4]); serialized_vcard = malloc(total_len + 2); - - read_server_binary(serialized_vcard, total_len); - serv_puts("CLOS"); - serv_getln(buf, sizeof buf); + serv_read(serialized_vcard, total_len); serialized_vcard[total_len] = 0; v = vcard_load(serialized_vcard); diff --git a/webcit/webcit.c b/webcit/webcit.c index 2cdbbd8ae..1655f53cb 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -692,17 +692,15 @@ char *load_mimepart(long msgnum, char *partnum) char content_type[SIZ]; char *content; - serv_printf("OPNA %ld|%s", msgnum, partnum); + serv_printf("DLAT %ld|%s", msgnum, partnum); serv_getln(buf, sizeof buf); - if (buf[0] == '2') { + if (buf[0] == '6') { bytes = extract_long(&buf[4], 0); extract_token(content_type, &buf[4], 3, '|', sizeof content_type); content = malloc(bytes + 2); - read_server_binary(content, bytes); + serv_read(content, bytes); - serv_puts("CLOS"); - serv_getln(buf, sizeof buf); content[bytes] = 0; /* null terminate for good measure */ return(content); }