Date: Mon, 27 Oct 97 08:33:25 EST From: Mike Sutton To: brendan@cygnus.com Cc: bug-gnats@prep.ai.mit.edu Subject: Bug fixes for GNATS 3.104 Brendan, Here are two bug fixes I have made to GNATS 3.104. One corrects a message sent by gnatsd to a client. When locking the database fails, gnatsd falsely sends back a message that the database is now locked. The other bug had to with verifying the Date-Required field. Garbage could be entered in this field and the check would always succeed. Mike Sutton | Life is hard when you're SAIC | home-pageless. Beavercreek, OH | Mike_Sutton@dayton.saic.com | These are MY opinions, not SAIC's [ Note: the following patch was re-generated for consistency with the others at http://www.cyclic.com/cyclic-pages/gnats.html; Mike's original post appeared before those patches had been made. -Karl Fogel ] *** gnats/ChangeLog Sun Dec 21 18:45:56 1997 --- gnats/ChangeLog Sun Dec 21 18:46:54 1997 *************** *** 1,3 **** --- 1,11 ---- + Sun Dec 21 18:46:45 1997 Mike Sutton + + * cmds.c: Corrected the print of db locked message when + lock fails. + + * edit.c: Corrected the date checking of the date required + field. + Thu Dec 18 15:54:28 1997 Karl Fogel Changes to implement customizable PR states: *** gnats/cmds.c Sun Dec 21 18:46:09 1997 --- gnats/cmds.c Sun Dec 21 18:47:55 1997 *************** *** 510,518 **** } /* This does the error for us. */ ! lock_gnats (); ! ! printf ("%d GNATS database is now locked.\r\n", CODE_OK); } void --- 510,517 ---- } /* This does the error for us. */ ! if (lock_gnats () == 0) ! printf ("%d GNATS database is now locked.\r\n", CODE_OK); } void *** gnats/edit.c Sun Dec 21 18:46:13 1997 --- gnats/edit.c Sun Dec 21 18:48:51 1997 *************** *** 353,362 **** if (d) { t = get_date (d, NULL); ! if (! t) { fprintf (stderr, "%s: Couldn't parse the date: %s.\r\n", program_name, d); } } #endif --- 353,363 ---- if (d) { t = get_date (d, NULL); ! if (t < 0) { fprintf (stderr, "%s: Couldn't parse the date: %s.\r\n", program_name, d); + return 0; } } #endif