]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.c
Obtain MIME objects using DLAT cmd instead of OPNA where appropriate
[citadel.git] / webcit / webcit.c
index 2cdbbd8aef7479f9962d840acb505e36f86cbe27..1655f53cbf0e996381e0503cede8331b4a2b6c24 100644 (file)
@@ -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);
        }