2009-02-02 Samuel Thibault * unix.c (parse_dir_entry): Use st_mtim.tv_sec instead of st_mtime. Set st_atim.tv_nsec, st_ctim.tv_nsec and st_mtim.tv_nsec to 0. 2002-10-19 Roland McGrath * unix.c (ftp_conn_unix_start_get_stats): Pass dirname a copy of NAME instead of the original pointer. 2002-06-08 Roland McGrath * ftpconn.h (ftp_conn_add_stat_fun_t) [_FILE_OFFSET_BITS != 64]: Use struct stat64 in place of struct stat. 2002-05-07 Roland McGrath * xfer.c (ftp_conn_start_open_actv_data): size_t -> socklen_t (ftp_conn_finish_open_actv_data): Likewise. 2002-04-13 Moritz Schulte * unix.c: Include . (struct get_stats_state): New member: searched_name. (ftp_conn_unix_start_get_stats): Return EINVAL if trying to list the root node without listing its content; set searched_name to the dirname. (ftp_conn_unix_cont_get_stats): If searching for the list info of one entry, skip all other entries. 2001-12-22 Roland McGrath * ftpconn.h (ftp_conn_validate_syshooks): Don't make this extern inline defn conditional on [__OPTIMIZE__]. 1999-08-11 Thomas Bushnell, BSG * open.c (ftp_conn_sysify): Handle REPLY_NO_LOGIN from "syst". (ftp_conn_open): Ignore error from ftp_conn_sysify; it's ok if we can't successfully deal. If we didn't sysify successfully before login, then try again afterwards. 1998-10-20 Roland McGrath * unix.c (ftp_conn_unix_cont_get_stats): Add braces to silence gcc warning. * open.c (ftp_conn_sysify): Likewise. (ftp_conn_login): Likewise. * cwd.c (ftp_conn_cdup): Likewise. (ftp_conn_cwd): Likewise. (_cache_cwd): Likewise. * addr.c (ftp_conn_send_actv_addr): Likewise. (ftp_conn_get_pasv_addr): Likewise. 1997-09-04 Miles Bader * ftpconn.h [!FTP_CONN_EI] (FTP_CONN_EI): New macro. (ftp_conn_validate_syshooks): Use FTP_CONN_EI instead of `static inline'. Protect with __OPTIMIZE__. * ftpconn.h (struct ftp_conn): Remove ACTV_DATA_CONN_QUEUE field. * create.c (ftp_conn_create): Don't initialize CONN->actv_data_conn_queue. * open.c (ftp_conn_close): Don't cleanup CONN->actv_data_conn_queue. * xfer.c (ftp_conn_start_open_actv_data): Always generate a new data connection (it doesn't work to always listen on a single address). (ftp_conn_finish_open_actv_data): Close the listen queue after looking for a connection. (ftp_conn_abort_open_actv_data): Close the data queue socket. 1997-09-02 Miles Bader * xfer.c (ftp_conn_start_open_actv_data): If necessary, reopen the control connection for getsockname. 1997-08-27 Miles Bader * ftpconn.h (struct ftp_conn): Add the ACTV_DATA_ADDR and ACTV_DATA_CONN_QUEUE fields. * create.c (ftp_conn_free): Free the ACTV_DATA_ADDR field. (ftp_conn_create): Initialiaze the ACTV_DATA_ADDR & ACTV_DATA_CONN_QUEUE fields. * open.c (ftp_conn_close): Close CONN->actv_data_conn_queue if necessary. * xfer.c (ftp_conn_start_open_actv_data): Renamed ftp_conn_open_actv_data. Correctly generate data address. (ftp_conn_start_open_data): Renamed from ftp_conn_open_data. (ftp_conn_finish_open_data, ftp_conn_finish_open_actv_data): New functions. (ftp_conn_start_transfer): Use ftp_conn_start_open_data and ftp_conn_finish_open_data instead of ftp_conn_open_data. 1997-08-26 Miles Bader * xfer.c (ftp_conn_open_actv_data): New function. (ftp_conn_open_data): Use an active data connection if passive doesn't work. * ftpconn.h (struct ftp_conn): Add USE_PASSIVE field. * create.c (ftp_conn_create): Initialize USE_PASSIVE field. * open.c (ftp_conn_open): Set SIN_LEN field correctly. 1997-08-19 Miles Bader * create.c (ftp_conn_create): Initialize the SYSHOOKS_VALID field. 1997-08-15 Miles Bader * fname.c (ftp_conn_append_name, ftp_conn_basename): Make sure CONN's SYSHOOKS field is valid before using it. * ftpconn.h (struct ftp_conn): Add SYSHOOKS_VALID field. (ftp_conn_validate_syshooks): New inline function. * open.c (ftp_conn_sysify): Set SYSHOOKS_VALID. * set-type.c (ftp_conn_set_type): If there's no connection, don't open a new one, just save the type for later. 1997-08-09 Miles Bader * names.c (ftp_conn_cont_get_names): Check for interrupts. * unix.c (ftp_conn_unix_cont_get_stats): Likewise. * reply.c (ftp_conn_getline): Likewise. * ftpconn.h (struct ftp_conn_hooks): Add INTERRUPT_CHECK field. 1997-08-08 Miles Bader * rmt.c (ftp_conn_rmt_transfer): If we get an error, close SRC_CONN instead of aborting it, to avoid problems with some ftp servers. * create.c (ftp_conn_create): Don't open the connection here. * names.c (ftp_conn_cont_get_names): Use BASENAME hook instead of FIX_NLIST_NAME. (ftp_conn_start_get_names): Don't set DIR field. (struct get_names_state): Remove DIR field. (ftp_conn_cont_get_names): Don't free DIR field. * ftpconn.h (struct ftp_conn_syshooks): Add APPEND_NAME and BASENAME fields; remove FIX_NLIST_NAME field. (ftp_conn_unix_append_name, ftp_conn_unix_basename): New declarations. (ftp_conn_unix_fix_nlist_name): Declaration removed. (ftp_conn_append_name, ftp_conn_basename): New declarations. * unix.c (ftp_conn_unix_cont_get_stats): Pass only directory- relative names to the callback function. (ftp_conn_unix_append_name, ftp_conn_unix_basename): New functions. (ftp_conn_unix_fix_nlist_name): Function removed. (struct ftp_conn_unix_syshooks): Initialize APPEND_NAME and BASENAME fields; remove FIX_NLIST_NAME initialization. * fname.c: New file. * Makefile (SRCS): Add fname.c 1997-08-07 Miles Bader * ftpconn.h (struct ftp_conn_syshooks): Add FIX_NLIST_NAME field. (ftp_conn_unix_fix_nlist_name): New declaration. * names.c (ftp_conn_cont_get_names): Support FIX_NLIST_NAME hook. Free S->dir if necessary. Close or abort connection when done. (struct get_names_state): Add DIR field. (ftp_conn_start_get_names): Fill in S->dir field if necessary. * unix.c (ftp_conn_unix_fix_nlist_name): New function. (ftp_conn_unix_syshooks): Add ftp_conn_unix_fix_nlist_name. 1997-08-06 Miles Bader * open.c (ftp_conn_sysify): Handle REPLY_UNIMP_CMD for "syst". * unix.c (parse_dir_entry): Re-enable mktime calls. 1997-08-04 Miles Bader * unix.c (ftp_conn_unix_cont_get_stats): If returning with an error, ignore any return from ftp_conn_finish_transfer. Wed Jun 4 14:17:30 1997 Miles Bader * Makefile (ftpcp, ftpdir): Rules removed. * ftpcp.c, ftpdir.c: Files removed. Thu May 29 17:24:40 1997 Miles Bader * ftpcp.c (doc): Update. (econnect, eopen_wr, eopen_rd, efinish): New functions. (struct epoint): Remove FD field. Rename RMT_FILE & RMT_HOST to FILE & HOST. (main): Remove array of epoints & loops, & just use RD & WR, calling the e* functions above. Support DST being a directory. Wed May 14 15:22:17 1997 Miles Bader * open.c (ftp_conn_login): Correct defaulting of username. Tue May 13 16:37:18 1997 Miles Bader * unix.c (ftp_conn_unix_cont_get_stats): Clean up our ftp transfer when we're done. Mon May 12 10:57:54 1997 Miles Bader * unix.c (ftp_conn_unix_cont_get_stats): Only abort when necessary. (ftp_conn_unix_start_get_stats): Allocate enough memory for REQ. * cmd.c (ftp_conn_abort): Use ftp_conn_get_raw_reply instead of ftp_conn_get_reply. Accept REPLY_ABORT_OK as a final reply. * reply.c (ftp_conn_get_raw_reply): Renamed from ftp_conn_get_reply. (ftp_conn_get_reply): New function. * ftpconn.h (ftp_conn_get_raw_reply): New declaration. Fri May 9 17:55:25 1997 Miles Bader * priv.h (REPLY_ABORT_OK): New macro. * ftpdir.c (ftpdir2): Deal with new semantics of CONTENTS argument to ftp_conn_get_stats. * unix.c (struct get_stats_state): Add ADDED_SLASH field. (ftp_conn_unix_start_get_stats): Don't use asprintf. Set ADDED_SLASH field. (ftp_conn_unix_cont_get_stats): Remove any initial `./' we added. Abort CONN if we return an error. Thu May 8 14:22:08 1997 Miles Bader * open.c (ftp_conn_open): Cast 2nd arg in connect call to `struct sockaddr *'. * cmd.c: Include . * stats.c (ftp_conn_start_get_stats, ftp_conn_get_stats): Rename FORCE_DIR argument to CONTENTS. * ftpconn.h (ftp_conn_get_stats, ftp_conn_start_get_stats, ftp_conn_unix_start_get_stats): Rename FORCE_DIR argument to CONTENTS. (struct ftp_conn_syshooks): Rename FORCE_DIR argument of START_GET_STATS field type to CONTENTS. * unix.c (struct get_stats_state): Add CONTENTS field. (ftp_conn_unix_start_get_stats): Initialize it. Change FORCE_DIR argument to CONTENTS. Pass -A flag. Prepend ./ to NAME if it doesn't contain a slash. Reject names containg possible meta-characters. * unix.c: Only include if HAVE_HURD_HURD_TYPES_H is defined. (parse_dir_entry): Only set stat->st_fstype if FSTYPE_FTP is defined. Only set stat->st_author if HAVE_STAT_ST_AUTHOR is defined. * Makefile (CPPFLAGS): Add -DHAVE_HURD_HURD_TYPES_H. Wed May 7 12:35:21 1997 Miles Bader * Makefile (SRCS): ftpconn.c replaced by resulting split files. * errs.c: New file. * ftpconn.c (ftp_conn_poss_file_errs): Moved to errs.c. * open.c: New file. * ftpconn.c (ftp_conn_login, ftp_conn_hello, ftp_conn_set_syshooks, ftp_conn_choose_syshooks, ftp_conn_sysify, ftp_conn_open, ftp_conn_close): Functions moved to open.c. * ftpconn.c (ftp_conn_poss_file_errs): Renamed from poss_file_errs; all references changed. Made not static. * xfer.c: New file. * ftpconn.c (ftp_conn_finish_transfer, ftp_conn_start_transfer, ftp_conn_open_data, ftp_conn_start_retrieve, ftp_conn_start_list, ftp_conn_start_dir, ftp_conn_start_store): Functions moved to xfer.c. * addr.c: New file. * ftpconn.c p(ftp_conn_get_pasv_addr, ftp_conn_send_actv_addr): Functions moved to addr.c. * create.c: New file. * ftpconn.c (ftp_conn_create, ftp_conn_free): Functions moved to create.c. * priv.h: New file. * xinl.c: New file. * ftpconn.c (unexpected_reply): Function moved to priv.h. (REPLY_*): Macros moved to priv.h. * rmt.c: New file. * ftpconn.c (ftp_conn_rmt_copy, ftp_conn_rmt_transfer): Functions moved to rmt.c. * cwd.c: New file. * ftpconn.c (ftp_conn_cdup, ftp_conn_cwd, ftp_conn_get_cwd, _cache_cwd): Functions moved to cwd.c. * set-type.c: New file. * ftpconn.c (ftp_conn_set_type): Function moved to set-type.c. * stats.c: New file. * ftpconn.c (ftp_conn_start_get_stats, ftp_conn_cont_get_stats, ftp_conn_get_stats): Functions moved to stats.c. * names.c: New file. * ftpconn.h (ftp_conn_add_name_fun_t): New type. (ftp_conn_start_get_names, ftp_conn_cont_get_names, ftp_conn_get_names): New functions. * unix.c (struct get_stats_state): Add NAME_LEN & NAME_ALLOCED fields. (ftp_conn_unix_cont_get_stats): Retain S's name buffer between entries, only growing it when needed; leave any copying to the client. * ftpconn.h (ftp_conn_add_stat_fun_t): Make first 3 params const. Update comment to say they should be copied if retained. * Makefile (installhdrsubdir): New variable.