From mboxrd@z Thu Jan 1 00:00:00 1970 From: bhoule@airfiber.com To: gnats-gnats@sourceware.cygnus.com Subject: gnats/168: ORIGINATOR used only by send-pr Date: Tue, 20 Mar 2001 21:44:00 -0000 Message-id: <20010321053403.26000.qmail@sourceware.cygnus.com> X-SW-Source: 2001-q1/msg00048.html List-Id: >Number: 168 >Category: gnats >Synopsis: ORIGINATOR used only by send-pr >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Tue Mar 20 21:44:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Bill Houle >Release: 3.113 >Organization: >Environment: Solaris >Description: Since the "Reporter's email" is part of the envelope rather than the PR, it is not searchable. On the other hand, the "Originator" *is* searchable, but it only gets filled out by send-pr via the NAME env-var. Enhancement: populate the Originator field with the email address of the sender when submitted via email (file-pr). >How-To-Repeat: Q.E.D >Fix: *** file-pr.c-orig Tue Mar 20 19:45:58 2001 --- file-pr.c Tue Mar 20 20:49:44 2001 *************** *** 51,57 **** char *subject = NULL, *synopsis = NULL; char *p; char message[STR_MAX]; ! char *from_address; mode_t mode; struct stat sbuf; --- 51,57 ---- char *subject = NULL, *synopsis = NULL; char *p; char message[STR_MAX]; ! char *from_address = NULL, *originator = NULL; mode_t mode; struct stat sbuf; *************** *** 187,192 **** --- 187,205 ---- set_field (SYNOPSIS, synopsis); } + /* Set originator to be email address. */ + from_address = header_value (FROM); + if (*from_address != '\0') + { + /* The originator shouldn't have a newline at the end. */ + char *l; + originator = (char *) strdup (from_address); + l = (char *) strrchr (originator, '\n'); + if (l != NULL) + *l = '\0'; + set_field (ORIGINATOR, originator); + } + /* Set arrival date and time of response. */ seconds = time ((time_t) 0); strftime (arrival_time, GNATS_TIME_LENGTH, "%a %b %d %H:%M:%S %Z %Y", >Release-Note: >Audit-Trail: >Unformatted: