<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libfetch/ftp.c, branch releng/5.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F5.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F5.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2002-10-25T01:17:32Z</updated>
<entry>
<title>The FTP connection caching needs a better interface -- connections are</title>
<updated>2002-10-25T01:17:32Z</updated>
<author>
<name>Nate Lawson</name>
<email>njl@FreeBSD.org</email>
</author>
<published>2002-10-25T01:17:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=13cc1c8394eba4cc00865f84b898d6d1718a5e48'/>
<id>urn:sha1:13cc1c8394eba4cc00865f84b898d6d1718a5e48</id>
<content type='text'>
closed through _fetch_close() which is the only one who knows the connection
REALLY was closed (since ref -&gt; 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.
</content>
</entry>
<entry>
<title>When recycling a cached connection, increment the reference count so that</title>
<updated>2002-10-20T10:36:27Z</updated>
<author>
<name>Tim J. Robbins</name>
<email>tjr@FreeBSD.org</email>
</author>
<published>2002-10-20T10:36:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9d649c1fd0046a2172a10e11fb159732c53c73df'/>
<id>urn:sha1:9d649c1fd0046a2172a10e11fb159732c53c73df</id>
<content type='text'>
the heap block does not get freed and reused. This should fix the
pkg_add -r crashes that have been happening for months.
</content>
</entry>
<entry>
<title>Make _fetch_connect() always set the error code.</title>
<updated>2002-09-17T05:54:33Z</updated>
<author>
<name>Bill Fenner</name>
<email>fenner@FreeBSD.org</email>
</author>
<published>2002-09-17T05:54:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=40cfbfd5085b953f00e6fd3feb4d68ad34cf3312'/>
<id>urn:sha1:40cfbfd5085b953f00e6fd3feb4d68ad34cf3312</id>
<content type='text'>
Tell ftp that _fetch_connect() always sets the error code (http already knew)
</content>
</entry>
<entry>
<title>Cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attach</title>
<updated>2002-07-02T11:09:02Z</updated>
<author>
<name>Hajimu UMEMOTO</name>
<email>ume@FreeBSD.org</email>
</author>
<published>2002-07-02T11:09:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f8fa093e82f6b8748f98f3e8e4592c038a0e4572'/>
<id>urn:sha1:f8fa093e82f6b8748f98f3e8e4592c038a0e4572</id>
<content type='text'>
scope identifier).

Approved by:	des
MFC after:	3 weeks
</content>
</entry>
<entry>
<title>Add a reference count to struct fetchconn so we don't prematurely close and</title>
<updated>2002-06-11T11:27:28Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2002-06-11T11:27:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f606d589b9434611c3842592a739b4d49a201043'/>
<id>urn:sha1:f606d589b9434611c3842592a739b4d49a201043</id>
<content type='text'>
free a cached FTP connection.
</content>
</entry>
<entry>
<title>Wrap everything in struct connection, and enforce timeouts everywhere</title>
<updated>2002-06-05T12:19:08Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2002-06-05T12:19:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9601e333a8e22c690b01c531c7ab3e6207e42fe1'/>
<id>urn:sha1:9601e333a8e22c690b01c531c7ab3e6207e42fe1</id>
<content type='text'>
(except for DNS operations).  Always use funopen() for HTTP, to support
both timeouts and SSL.
</content>
</entry>
<entry>
<title>First step towards SSL support: wrap connections in a 'struct connection'</title>
<updated>2002-06-05T10:05:03Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2002-06-05T10:05:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dea29ca1d5850eb6fd7771a1ad8f41ce46665995'/>
<id>urn:sha1:dea29ca1d5850eb6fd7771a1ad8f41ce46665995</id>
<content type='text'>
which contains the socket descriptor, the input buffer and (yet unused)
SSL state variables.  This has the neat side effect of greatly improving
reentrance (though we're not *quite* there yet) and opening the door to
HTTP connection caching.

This commit is inspired by email conversations with and patches from
Henry Whincup &lt;henry@techiebod.com&gt; last fall.
</content>
</entry>
<entry>
<title>Modernize my email address</title>
<updated>2002-03-25T13:53:46Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2002-03-25T13:53:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=06229ad2af0790512e7676f99344b1fff70fea5b'/>
<id>urn:sha1:06229ad2af0790512e7676f99344b1fff70fea5b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reindent, and add parentheses to return statements.  Some functions in</title>
<updated>2002-02-05T22:13:51Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2002-02-05T22:13:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e19e6098b3beddfc5475b44809c28d8a4e800025'/>
<id>urn:sha1:e19e6098b3beddfc5475b44809c28d8a4e800025</id>
<content type='text'>
ftp.c and http.c now have exceedingly long lines due to deep nesting;
this will be corrected by reorganizing the code in a later revision.
</content>
</entry>
<entry>
<title>Mark uploads as O_WRONLY, not O_RDONLY.</title>
<updated>2002-01-20T19:52:25Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2002-01-20T19:52:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e0583e0c2385421bb28207e39afeaf23b7f1ddb1'/>
<id>urn:sha1:e0583e0c2385421bb28207e39afeaf23b7f1ddb1</id>
<content type='text'>
PR:		misc/34043
MFC after:	2 weeks
</content>
</entry>
</feed>
