Gentoo Archives: gentoo-dev

From: Matthew Dillon <dillon@××××××××××××××××.com>
To: Christian HOFFMANN <christian.hoffmann@××××.fr>
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Re: [BUG and PATCH] Does dcron need a space at the end of each
Date: Fri, 22 Mar 2002 14:03:43
Message-Id: 200203221959.g2MJxer63123@apollo.backplane.com
In Reply to: Re: [gentoo-dev] Re: [BUG and PATCH] Does dcron need a space at the end of each by Christian HOFFMANN
1 :
2 :I tested your proposed modification, it works far better than mine.
3 :
4 :I was just wrong in the beginning, my problem was lines starting with a
5 :space (for allignment purpose) and my patch break the others tasks on
6 :lines not starting with a space.
7 :
8 :Now dcron work for lines starting or not with a space or tabs or...
9 :
10 :For your information dcron2.7 is the standard cron for the Gentoo
11 :Linux distribution. http://www.gentoo.org
12
13 Ok. I have updated the master code on my site, which you can get to
14 via:
15
16 http://apollo.backplane.com/FreeSrc/
17
18 I can't test it under Linux so its up to you folks to download it,
19 compare it with the version you are distributing now, test it, and
20 so forth. I have included the meat of the bug fix below.
21
22 -Matt
23
24 Index: database.c
25 ===================================================================
26 RCS file: /cvs/dcron/database.c,v
27 retrieving revision 1.1
28 retrieving revision 1.2
29 diff -u -r1.1 -r1.2
30 --- database.c 10 Feb 1999 06:22:37 -0000 1.1
31 +++ database.c 22 Mar 2002 17:56:55 -0000 1.2
32 @@ -174,7 +174,7 @@
33 ++ptr;
34
35 if (*ptr)
36 - buf[strlen(ptr)-1] = 0;
37 + ptr[strlen(ptr)-1] = 0;
38
39 if (*ptr == 0 || *ptr == '#')
40 continue;