gnats-prs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnats/168: ORIGINATOR used only by send-pr


From: bhoule
Subject: gnats/168: ORIGINATOR used only by send-pr
Date: 21 Mar 2001 05:34:03 -0000

>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:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]