History log of /freebsd-9.3-release/lib/libfetch/file.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 241016 27-Sep-2012 eadler

MFC r240495:
Adding missing return statements during error conditions.

PR: kern/171187
Approved by: cperciva (implicit)


# 236103 26-May-2012 des

MFH r225813,r225814,r226537: cosmetic


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 221830 13-May-2011 des

Mark all socket and file descriptors close-on-exec.

PR: bin/151866
MFC after: 3 weeks


# 174588 14-Dec-2007 des

Clean up namespace violations.

MFC after: 1 week


# 135546 21-Sep-2004 des

Update copyright years.


# 109967 28-Jan-2003 des

style(9): add parentheses to sizeof even when not strictly required.

MFC after: 3 days


# 90267 05-Feb-2002 des

Reindent, and add parentheses to return statements. Some functions in
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.


# 84203 30-Sep-2001 dillon

Add __FBSDID()s to libfetch


# 83076 05-Sep-2001 des

Use fseeko() instead of fseek() (u->offset is already an off_t), and mark
some function arguments as unused.


# 77237 26-May-2001 des

MAXPATHLEN -> PATH_MAX


# 75891 23-Apr-2001 archie

Apply 'const' liberally.

Fix some other minor glitches.


# 67892 29-Oct-2000 des

Use CHECK_FLAG


# 63340 17-Jul-2000 des

Introduce fetchXGet*(), which combine the functionalities of fetchGet*() and
fetchStat*(). In most cases, either fetchGet*() or fetchXGet*() is a wrapper
around the other; in all cases, calling fetchGet*() is identical to calling
fetchXGet*() with the second argument set to NULL.


# 60584 15-May-2000 des

Initialize the struct url_stat at the beginning of _fetch_stat_file().


# 60187 07-May-2000 des

Implement restart


# 55544 07-Jan-2000 des

Patches I've had lying around for several months:
* Add the 'h' ftp flag (allocate local port in high range)
* Add the 'd' flag (use direct connection even if proxy is defined)
* Make sure flags != NULL before calling strchr().
* Minor changes to some comments.


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 41989 21-Dec-1998 des

Implement and document file list retrieval.


# 41862 16-Dec-1998 des

Add verbose flag, and support functions.
Brucify the Makefile.
Differentiate atime and mtime in fetch*Stat().
Fix a few pointer bugs.
Tweak some error messages.
Don't #include sys/param.h and stdio.h in fetch.h.
Document that sys/param.h and stdio.h must be #included before fetch.h.


# 40975 06-Nov-1998 des

Second of a series of cleanups to libfetch.

This commit introduces the following features:

a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.

b) the use of the com_err(3) facilities to report errors.

It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.

Changed files, in alphabetical order:

Makefile:
Don't generate macros in {ftp,http}err.c.

Generate category fields for the error message lists.

Compile the error table.

Install fetch_err.h along with fetch.h.

common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.

Add categories to the _netdb_errlist table.

Report errors through the Common Error library.

common.h:
Add the DEBUG macros.

Add prototype for fetchConnect().

Remove the prototype for _fetch_errstring(), which is local to common.c

Add a categroy field to struct fetcherr, and define constants for
error categories.

Define macros for _{url,netdb,ftp,http}_seterr().

errors.et: (new file)
List error categories.

fetch.3:
Document the fetchStat*() functions.

Move the "unimplemented functionality" comments from NOTES to BUGS.

Document that applications which use libfetch must also use
libcom_err, and list existing error codes.

Undocument fetchLastErr{Code,String}.

Remove the (empty) DIAGNOSTICS section.

Mention Eugene Skepner in the AUTHORS section.

fetch.c:
Move the DEBUG macros to common.c

Add fetchStat() and fetchStatURL().

Generate error messages for URL parser errors, and fix a minor bug
in the parser.

Use 'struct url' instead of 'url_t'.

Remove fetchLastErr{Code,String}.

fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.

Define struct url_stat (used by fetchStat()).

Add prototypes for fetchStat*().

Remove the declarations for fetchLastErr{Code,String}.

Include fetch_err.h.

fetch_err.et: (new file)
Error table for libfetch.

file.c:
Add fetchStatFile().

Use 'struct url' instead of 'url_t'.

ftp.c:
Add fetchStatFTP().

Use 'struct url' instead of 'url_t'.

Don't use fetchLastErrCode.

ftp.errors:
Add categories to all error messages.

http.c:
Add fetchStatHTTP().

Use 'struct url' instead of 'url_t'.

Don't use fetchLastErr{Code,Text}.

http.errors:
Add categories to all error messages.

Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner


# 37536 09-Jul-1998 des

This commit was generated by cvs2svn to compensate for changes in r37535,
which included commits to RCS files with non-trunk default branches.


# 37535 09-Jul-1998 des

Imported libfetch into the tree. It compiles, but there's still some
work to do. I especially need help with the man page.