Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2002 18:17:32 -0700 (PDT)
From:      Nate Lawson <njl@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/lib/libfetch ftp.c
Message-ID:  <200210250117.g9P1HWVl045395@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
njl         2002/10/24 18:17:32 PDT

  Modified files:
    lib/libfetch         ftp.c 
  Log:
  The FTP connection caching needs a better interface -- connections are
  closed through _fetch_close() which is the only one who knows the connection
  REALLY was closed (since ref -> 0).  However, FTP keeps its own local
  cached_connection and checks if it is valid by comparing it to NULL.  This
  is bogus since it may have been freed elsewhere by _fetch_close().
  
  This change checks if we are closing the cached_connection and the ref is 1
  (soon to be 0).  If so, set cached_connection to NULL so we don't
  accidentally reuse it.  The REAL fix should be to move connection caching
  to the common.c level (_fetch_* functions) and NULL the cache(s) in
  _fetch_close().  Then all layers could benefit from caching.
  
  Revision  Changes    Path
  1.83      +4 -0      src/lib/libfetch/ftp.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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