[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: makendbm minor, but NASTY, error
> [zmailer-2.99.42]
Thanks for mentioning the version.
> BEWARE! makendbm has a minor error that smacks you upside the head if
> config.h has both HAVE_NDBM_H and HAVE_DB_H. The error causes the
> database file (the one that has all your data in it) to be truncated.
>
> That's because makedbm calls dbm_open() for the NDBM support(which creates
> the empty .pag and .dir files) and then procedes to call dbopen() for the
> BTREE support (which creams the input file).
This one took me a while to understand. Mainly because
the diff below is reversed!
Yes indeed there was an error, I have ChangeLogged entries
on 2nd of Dec -96 about NDBM/BTREE parametrization error
in the makendbm.c
It has been fixed since 2.99.44.
/Matti Aarnio <mea@nic.funet.fi>
> Diff follows...
>
> =======================================================================
> --- makendbm.c Sun Apr 6 15:53:50 1997
> +++ makendbm.c.orig Sun Apr 6 14:09:39 1997
> @@ -221,7 +221,7 @@
> }
> #endif
> #ifdef HAVE_DB_H
> - if (typ == 3) {
> + if (typ == 1) {
> dbfile = dbopen(dbasename, O_RDWR|O_CREAT|O_TRUNC, 0644,
> DB_BTREE, NULL);
> dbf = dbfile;
> =======================================================================
>
> -timmo
>
> Tim DiLauro Milton S. Eisenhower Library
> Library Systems Jack Johns Hopkins University
> (410) 516-5263 3400 N. Charles Street
> timmo@jhu.edu Baltimore, MD 21218
>
>
>