protocol library. Located and fixed bugs.
* html.c: increased the conversion buffer size
$Log$
+ Revision 605.28 2003/03/26 05:17:12 ajc
+ * Downloading of attachments was completely broken by the change to the new
+ protocol library. Located and fixed bugs.
+ * html.c: increased the conversion buffer size
+
Revision 605.27 2003/03/24 03:42:14 ajc
* Add the ability to quit out while validating users. Also added a help
option listing available access levels. This closes Bugzilla #37.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
ipc->downloading = 1;
bytes = extract_long(cret, 0);
last_mod = extract_int(cret, 1);
- extract(mimetype, cret, 2);
-/* ret = CtdlIPCReadDownload(ipc, buf, bytes, 0, progress_gauge_callback, cret); */
+ extract(filename, cret, 2);
+ extract(mimetype, cret, 3);
+ /* ret = CtdlIPCReadDownload(ipc, buf, bytes, 0, progress_gauge_callback, cret); */
ret = CtdlIPCHighSpeedReadDownload(ipc, buf, bytes, 0, progress_gauge_callback, cret);
ret = CtdlIPCEndDownload(ipc, cret);
if (ret / 100 == 2)
return len;
}
-
/* READ - pipelined */
int CtdlIPCHighSpeedReadDownload(CtdlIPC *ipc, void **buf, size_t bytes,
size_t resume,
do {
/* Fill the input buffer */
- if ( (done_reading == 0) && (strlen(inbuf) < 128) ) {
+ if ( (done_reading == 0) && (strlen(inbuf) < (SIZ-128)) ) {
ch = *inputmsg++;
if (ch > 0) {
}
/* Make sure the output buffer is big enough */
- if ((output_len + strlen(outbuf) + 128)
+ if ((output_len + strlen(outbuf) + SIZ)
> outptr_buffer_size) {
- outptr_buffer_size += 128;
+ outptr_buffer_size += SIZ;
outptr = realloc(outptr, outptr_buffer_size);
}
((sizeof filename) - 1));
r = CtdlIPCAttachmentDownload(ipc, msg_arr[a],
filename, &attachment, progress, cmd);
- extract(filename, cmd, 2);
- destination_directory(save_to, filename);
- r = CtdlIPCAttachmentDownload(ipc, msg_arr[a],
- filename, &attachment, progress, cmd);
if (r / 100 != 2) {
scr_printf("%s\n", cmd);
} else {
+ extract(filename, cmd, 2);
+ destination_directory(save_to, filename);
save_buffer(attachment,
extract_unsigned_long(cmd, 0),
save_to);