Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!oakhill!dwolfe From: dwolfe@oakhill.sps.mot.com (Dave Wolfe) Newsgroups: comp.mail.elm Subject: Forms problem Keywords: forms elm headers Message-ID: <1991Apr26.160206.18862@oakhill.sps.mot.com> Date: 26 Apr 91 16:02:06 GMT Organization: Motorola Inc., Austin, Texas Lines: 48 Since this didn't show up in the last monthly posting and I didn't get an acknowledgment when I mailed it, I'll assume it didn't make it and post it. We use the forms feature of elm here as a simplistic means of time reporting -- the form gets mailed to everyone in the group via cron and each replies, filling in the charge codes and hours. I have found a bug in the forms reply caused by the headers' buffers not being cleared. If one has sent mail just prior to replying to the form and specified a Cc: address, for example, the form reply is also sent to those Cc: address(es). The following patch seems to take care of the problem and still allows specifying headers by the usual means: *** src/mailmsg2.c.orig Tue Apr 2 11:00:19 1991 --- src/mailmsg2.c Fri Apr 5 14:44:23 1991 *************** *** 174,179 **** --- 174,191 ---- dprint(4, (debugfile, "-- renaming existing file %s to file %s --\n", fname, filename)); rename(fname, filename); + + /* kill leftover headers */ + in_reply_to[0] = '\0'; + expires[0] = '\0'; + action[0] = '\0'; + priority[0] = '\0'; + reply_to[0] = '\0'; + cc[0] = '\0'; + expanded_cc[0] = '\0'; + user_defined_header[0] = '\0'; + bcc[0] = '\0'; + expanded_bcc[0] = '\0'; } else if (copy_msg && ! retransmit) { /* if retransmit we have it! */ if (attribution[0]) { -- Dave Wolfe (dwolfe@oakhill.sps.mot.com) | Motorola Incorporated "[RISC is] like obscenity, | MMTG (formerly MPG) we all know what RISC is when we see it, | Austin, Texas 78735-8598 but no one can define it." Chris Torek | m/d OE112 (512)891-3246 -- Dave Wolfe (dwolfe@oakhill.sps.mot.com) | Motorola Incorporated "[RISC is] like obscenity, | MMTG (formerly MPG) we all know what RISC is when we see it, | Austin, Texas 78735-8598 but no one can define it." Chris Torek | m/d OE112 (512)891-3246