Bill Paul 0d15a95009 Fix a bug in the database handle caching. This has to do with the way the
underlying database code works. When dealing with first/next queries, you
have the notion of a database 'cursor,' which is essentially a file pointer
for the database. To select the first entry, you do a fetch with the
R_FIRST flag set, then you can use the R_NEXT flag to enumerate the other
entries in the database. Unfortunately, doing a direct fetch with no flag
does _not_ set the 'cursor,' so you can't do a direct fetch and then
enumerate the table from there.

The bug is that cached handles generated as the result of a YPPROC_MATCH
were being treated as though they were the same as handles generated by
a YPPROC_FIRST, which is not the case. The manifestation is that if you
do a 'ypmatch first-key-in-map map' followed by a yp_first()/yp_next()
pair, the yp_first() and yp_next() both return the first key in the
table, which makes the entry appear to be duplicated.

A couple smaller things since I'm here:

- yp_main.c and yp_error.c both have a global 'int debug' in them.
  For some reason, our cc/ld doesn't flag this as a multiply defined
  symbol even though it should. Removed the declaration from yp_main.c;
  we want the one in yp_error.c.

- The Makefile wasn't installing ypinit in the right place.
1998-02-11 19:15:32 +00:00
..
1997-09-01 06:11:40 +00:00
1997-09-01 06:12:37 +00:00
1998-02-02 15:46:44 +00:00
1998-01-25 16:22:22 +00:00
1997-09-02 06:37:48 +00:00
1997-09-17 06:29:23 +00:00
1997-09-17 06:30:22 +00:00
1997-09-19 06:27:30 +00:00
1997-07-06 07:38:36 +00:00
1997-09-19 06:29:52 +00:00
1997-10-12 11:51:25 +00:00
1997-12-16 17:43:33 +00:00
1998-02-04 15:59:10 +00:00
1997-09-25 06:36:29 +00:00
1997-09-25 06:38:17 +00:00
1998-02-04 06:46:33 +00:00
1997-10-01 06:27:34 +00:00
1997-02-22 16:15:28 +00:00
1997-02-22 16:15:28 +00:00
1997-10-02 11:46:53 +00:00
1997-02-22 16:15:28 +00:00
1997-10-06 11:38:30 +00:00
1997-09-19 15:41:57 +00:00
1998-01-17 16:58:55 +00:00
1997-12-25 09:36:42 +00:00
1997-10-10 06:31:07 +00:00
1997-10-13 11:05:07 +00:00
1997-10-13 11:06:30 +00:00
1997-10-13 11:08:47 +00:00
1997-12-16 17:43:33 +00:00
1997-12-28 20:52:56 +00:00
1997-10-13 11:27:55 +00:00
1997-10-15 06:41:19 +00:00
1997-10-15 06:43:54 +00:00
1997-10-20 12:41:41 +00:00
1997-10-20 12:43:03 +00:00
1997-10-20 12:55:49 +00:00
1997-10-27 07:53:22 +00:00
1997-10-27 12:21:10 +00:00
1997-10-27 12:29:25 +00:00
1997-10-27 12:30:30 +00:00
1997-10-29 07:26:09 +00:00
1998-02-04 07:30:11 +00:00
1997-12-07 02:27:48 +00:00