on disk. Too much stuff goes haywire if there's no M field.
$Log$
+Revision 1.407 1999/11/01 00:54:02 ajc
+* CtdlFetchMessage() - generate a "<no text>" message body if there's none
+ on disk. Too much stuff goes haywire if there's no M field.
+
Revision 1.406 1999/10/31 18:17:17 ajc
* Fixed buffer overrun in cmd_rchg()
* Call master_cleanup() when time_to_die==1 for proper shutdown
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
-
CIT_UBYTE field_header;
size_t field_length;
-
dmsgtext = cdb_fetch(CDB_MSGMAIN, &msgnum, sizeof(long));
if (dmsgtext == NULL) {
return NULL;
cdb_free(dmsgtext);
+ /* Always make sure there's something in the msg text field */
+ if (ret->cm_fields['M'] == NULL)
+ ret->cm_fields['M'] = strdoop("<no text>\n");
+
/* Perform "before read" hooks (aborting if any return nonzero) */
if (PerformMessageHooks(ret, EVT_BEFOREREAD) > 0) {
CtdlFreeMessage(ret);