[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Release of 2.99.49p9
On Mon, Dec 01, 1997 at 09:37:15AM +0200, mea@nic.funet.fi wrote:
> Good morning, just before heading for the airplane..
> ...
> > Hello mea,
> >
> > I tried the new version on my Ultra running 2.5.1 and found the router
> > dump core in gdbm database lookup. Checking from ChangeLog, it seems
> > changes have been made on all database lookup routines. Could you pls
> > check?
>
> I did eyeball the code, and it does make sense, in fact it
> is nearly identical to same routine for the ndbm database,
> which I have working at Solaris 2.5.1.
>
> Could you step thru the search_gdbm() to see what it does ?
> ... hmm.. perhaps there is problem in the way how the failed
> lookup is retried ? If that is it, fix is below.
Yes, the patch works for GDBM now.
Rgds,
Ken Lai
> (No, that does not make sense -- At utu.fi the aliases db is
> NDBM, and it humms happily in there...)
>
> I wonder why I have not had it crash on me then... Perhaps
> NDBM tolerates things much better ? Or perhaps gdbm_errno
> sets when it can't find the object, but there is no REAL error
> in the system ?
>
> > Rgds,
> > Ken Lai
>
> /Matti Aarnio <mea@nic.funet.fi>
>
> --- router/libdb/gdbm.c~ Wed Nov 26 18:24:18 1997
> +++ router/libdb/gdbm.c Mon Dec 1 09:18:34 1997
> @@ -105,7 +105,6 @@
> conscell *tmp;
> struct spblk *spl = NULL;
> int retry, i;
> - spkey_t symid;
>
> retry = 0;
>
> @@ -120,8 +119,7 @@
> val = gdbm_fetch(db, key);
> if (val.dptr == NULL) {
> if (!retry && gdbm_errno) {
> - gdbm_close(db);
> - sp_install(symid, (u_char *)NULL, 0, spt_files);
> + close_gdbm(sip);
> ++retry;
> goto reopen;
> }
> --- router/libdb/ndbm.c~ Mon Dec 1 09:11:11 1997
> +++ router/libdb/ndbm.c Mon Dec 1 09:19:18 1997
> @@ -75,7 +75,6 @@
> conscell *tmp;
> struct spblk *spl;
> int retry, i;
> - spkey_t symid;
> char *us;
>
> retry = 0;
> @@ -92,13 +91,13 @@
> if (val.dptr == NULL) {
> #ifdef HAVE_DBM_ERROR
> if (!retry && dbm_error(db)) {
> - dbm_close(db);
> + close_ndbm(sip);
> ++retry;
> goto reopen;
> }
> #else
> if (!retry && errno != 0) {
> - dbm_close(db);
> + close_ndbm(sip);
> ++retry;
> goto reopen;
> }