public inbox for gnats-prs@sourceware.org
help / color / mirror / Atom feed
* gnats/168: ORIGINATOR used only by send-pr
@ 2001-03-20 21:44 bhoule
0 siblings, 0 replies; only message in thread
From: bhoule @ 2001-03-20 21:44 UTC (permalink / raw)
To: gnats-gnats
>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:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-20 21:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-20 21:44 gnats/168: ORIGINATOR used only by send-pr bhoule
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).