}
-// wtf?
+// This is like CM_SetField() except the caller is transferring ownership of the supplied memory to the message
void CM_SetAsField(struct CtdlMessage *Msg, eMsgField which, char **buf, long length) {
if (Msg->cm_fields[which] != NULL) {
free (Msg->cm_fields[which]);
if ( (CM_IsEmpty(ret, eMesageText)) && (with_body) ) {
dmsgtext = cdb_fetch(CDB_BIGMSGS, &msgnum, sizeof(long));
if (dmsgtext.ptr != NULL) {
- CM_SetAsField(ret, eMesageText, &dmsgtext.ptr, dmsgtext.len - 1);
+ CM_SetField(ret, eMesageText, dmsgtext.ptr);
}
}
if (CM_IsEmpty(ret, eMesageText)) {