}
}
- 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);
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);
}