Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jul 1996 16:02:43 -0700 (PDT)
From:      Bill Paul <wpaul>
To:        CVS-committers, cvs-all, cvs-usrsbin
Subject:   cvs commit:  src/usr.sbin/ypserv yp_dblookup.c
Message-ID:  <199607072302.QAA20275@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       96/07/07 16:02:42

  Modified:    usr.sbin/ypserv  yp_dblookup.c
  Log:
  Re-implement the DB handle cache using a circular queue and manage
  it with the CIRCLEQ macros. This simplifies the code a little, makes
  it somewhat easier to read, and may be a little faster. (Actually I think
  the performace is about the same.)
  
  Also, in the non DB_CACHE case, save copies of data returned from
  the database library in a static buffer, just in case we decide to use
  it after the database has been closed. Technically, the memory that the
  data pointers refer to belongs to the DB package and we can't count on
  it being there after the database has been closed -- the DB package
  frees its buffers. (With DB_CACHE #defined the databases are held
  open so the buffers remain valid.) I don't think any of the utilities
  that use the dblookup module have had any problems with this yet, but
  there's no sense in taking any chances.
  
  Revision  Changes    Path
  1.8       +180 -89   src/usr.sbin/ypserv/yp_dblookup.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607072302.QAA20275>