gnats-prs
[Top][All Lists]
Advanced

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

gnats/344: Space before names in notify field of categories file result


From: Andrew . Gray
Subject: gnats/344: Space before names in notify field of categories file result in failure to notify
Date: Fri, 15 Feb 2002 07:49:49 -0500

>Number:         344
>Category:       gnats
>Synopsis:       Space before names in notify field of categories file result 
>in failure to notify
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 15 07:49:49 -0500 2002
>Originator:     Andrew Gray
>Release:        3.999.1
>Organization:

>Environment:
Intel, Linux 2.4.2-2
>Description:
If a space appears before a name in the notify field of the categoried file 
this can result in that person not being notified of the submission of a PR. 
The problem occurs when the name is not a full email address but a name in the 
responsible file.
>How-To-Repeat:
Add or edit the following line to the categories file:
test:*Test Category:gnats-admin:userone, usertwo
Add the following lines to the responsible file:
userone:User number one:<valid email address>
usertwo:User number tow:<another valid email address>
(subtituting different valid email addresses)
Submit a PR in the test category.
The userone email address will receive the notification but the usertwo email 
address will not.
Edit the categories file to this:
test:*Test Category:gnats-admin:userone,usertwo
Submit another PR in the test category, the usertwo email will receive the 
notification.
>Fix:
Apply the attached patch. It changes the code to ignore leading spaces when 
extracting names from a list.
A simple workaround is to remove leading spaces from the categories file.
>Unformatted:
 ----gnatsweb-attachment----
 Content-Type: text/plain; name="patchfile.out"
 Content-Disposition: inline; filename="patchfile.out"
 
 Index: mail.c
 ===================================================================
 RCS file: /cvsroot/gnats/gnats/gnats/mail.c,v
 retrieving revision 1.16
 diff -u -r1.16 mail.c
 --- mail.c     17 Oct 2001 17:04:53 -0000      1.16
 +++ mail.c     15 Feb 2002 09:33:44 -0000
 @@ -179,9 +179,12 @@
 getOneAddress (const char **addrPtr)
 {
   const char *addr = *addrPtr;
 -  const char *addrStart = addr;
 +  const char *addrStart;
   char *res;
 
 +  while (*addr == ' ')
 +    addr++;
 +  addrStart = addr;
   while (*addr != ',' && *addr != '\0')
     {
       char nextc = '\0';
 



reply via email to

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