discarded instead of prepended. "Received:" lines now work.
$Log$
+ Revision 590.118 2002/03/01 04:16:22 ajc
+ * CtdlReadMessageBody() -- fixed bug that caused the prepend buffer to be
+ discarded instead of prepended. "Received:" lines now work.
+
Revision 590.117 2002/02/23 19:20:51 ajc
* Do the use table purge in two phases to avoid crashy crashy
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
if (exist == NULL) {
m = mallok(4096);
+ m[0] = 0;
+ buffer_len = 4096;
+ message_len = 0;
}
else {
- m = reallok(exist, strlen(exist) + 4096);
- if (m == NULL) phree(exist);
+ message_len = strlen(exist);
+ buffer_len = message_len + 4096;
+ m = reallok(exist, buffer_len);
+ if (m == NULL) {
+ phree(exist);
+ return m;
+ }
}
/* flush the input if we have nowhere to store it */
return(NULL);
}
- /* otherwise read it into memory */
- else {
- buffer_len = 4096;
- m[0] = 0;
- message_len = 0;
- }
/* read in the lines of message text one by one */
while ( (client_gets(buf)>0) && strcmp(buf, terminator) ) {