Commit Graph

180 Commits

Author SHA1 Message Date
Pavel Roskin
878175bec9 * ftpfs.c (ftpfs_get_current_directory): Warning fix - "missing
sentinel in function call".
2005-06-21 19:40:36 +00:00
Leonard den Ottolander
2bba061bf0 * src/boxes.c, vfs/ftpfs.[ch]: Add checkbox to allow passive FTP
over proxy to VFS dialog.
2005-05-29 12:10:08 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
aa262c3482 * ftpfs.c: Using HAVE_SOCKLEN_T instead of HAVE_C_TYPE_SOCKLEN_T. 2005-05-13 20:32:09 +00:00
Roland Illig
d7e7ec48dd * *.c: Declared unused variables with (void) to avoid the gcc
warnings.
	* extfs.c (extfs_get_path_mangle, extfs_get_path): Removed unused
	parameter.
	* ftpfs.c (ftpfs_netrc_bad_mode): Likewise.
	* vfs.c (mc_def_getlocalcopy): Likewise.
2005-02-22 18:35:22 +00:00
Roland Illig
54cccec688 * utilvfs.h: Removed unneeded #includes.
* *.c: Added the #includes that have been removed from utilvfs.h.
	* tcputil.c: Just removed the unneeded #include "utilvfs.h".
2005-02-19 16:36:38 +00:00
Andrew V. Samoilov
f4cb47b95d * ftpfs.c (ftpfs_file_store): Make sure we write() all read() data.
Check fstat() return value.
2005-01-19 09:17:38 +00:00
Roland Illig
3c750ff024 * ftpfs.c: Add fallback to type int if socklen_t is not provided. 2004-11-02 21:53:55 +00:00
Roland Illig
744c65862e * ftpfs.c (ftpfs_initconn): Replace int with socklen_t where
appropriate. (ftpfs_open_data_connection): Likewise.
2004-10-27 18:00:42 +00:00
Andrew V. Samoilov
e65b13eb00 * ftpfs.c (ftpfs_linear_start): Likewise.
* fish.c (fish_linear_start): Likewise.
2004-10-06 21:20:17 +00:00
Roland Illig
6f34e18e3e * ftpfs.c (ftpfs_find_machine): Added const qualifier.
* mcserv.c (do_auth): Likewise.
	* utilvfs.c (is_month): Likewise. (is_time): Likewise.
	(is_week): Likewise.
	* vfs.c (_vfs_get_class): Added const qualifier.
	(vfs_prefix_to_class): Added a string length parameter to
	reduce the use of g_strdup. (vfs_split): Changes due to the
	new string length parameter.
2004-09-25 14:06:27 +00:00
Andrew V. Samoilov
c060826178 * direntry.c (vfs_s_free_entry): g_free handles NULL argument too,
no need for the comparison.
        * extfs.c (extfs_free_archive): Likewise.
            (extfs_open_archive): Likewise.
            (extfs_read_archive): Likewise.
            (extfs_remove_entry): Likewise.
            (extfs_free_entry): Likewise.
        * fish.c (fish_open_archive): Likewise.
            (fish_archive_same): Likewise.
        * ftpfs.c (ftpfs_split_url):  Likewise.
        * local.c       (local_closedir): Likewise.
        * mcserv.c (close_handle): Likewise.
        * smbfs.c (smbfs_free_bucket): Likewise.
        * tar.c (tar_read_header): Likewise.
        * undelfs.c (undelfs_shutdown): Likewise.
        * vfs.c (vfs_shut): Likewise.
2004-09-24 23:00:18 +00:00
Roland Illig
4bc786735e * cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where
NULL was meant.
	* direntry.c: Likewise.
	* extfs.c: Likewise.
	* fish.c: Likewise.
	* ftpfs.c: Likewise.
	* mcfs.c: Likewise.
	* tar.c: Likewise.
	* undelfs.c: Likewise.
	* vfs.c: Likewise.
2004-09-24 15:08:21 +00:00
Andrew V. Samoilov
e04694309c * tar.c (tar_read_header): Fix missed *.
* extfs.c (extfs_readlink): Revert last change: readlink does not
        append a NUL character to buf.
        * ftpfs.c: Warning fix.
        * vfs-impl.h (struct vfs_class.readlink): Make "size" size_t.
        Adjust all callers.
2004-09-02 13:57:59 +00:00
Andrew V. Samoilov
15c6e5cae6 * direntry.c (vfs_s_readlink): Use g_strlcpy instead strncpy.
* ftpfs.c (ftpfs_get_reply): Use g_strlcpy instead strncpy.
* extfs.c (extfs_readlink): Fix return value. Use g_strlcpy
        instead strncpy.
* mcfs.c (mcfs_readlink): Fix return value. Use g_strlcpy
        instead strncpy.
* tar.c (tar_read_header): Add additional check for consistency.
        Fix memory leak.
* cpio.c (cpio_defer_find): Remove recursion.
        (cpio_free_archive): Fix memory leak.
        (cpio_read_bin_head): Use union for simplicity using of header
        structure. Add additional check for consistency.
        (cpio_read_oldc_head): Add additional check for consistency.
2004-09-02 00:09:02 +00:00
Roland Illig
83c07852e9 * extfs.c (extfs_internal_stat): Fixed memory leaks introduced
by my change from 2004-08-16. (extfs_unlink): likewise.

	* ftpfs.c (ftpfs_send_command): likewise.
2004-08-24 15:56:24 +00:00
Roland Illig
cf1c61cd2a Added more const-ness. Avoided name collision for netrc. 2004-08-17 11:17:02 +00:00
Roland Illig
34a8088483 Splittet the vfs.h header into a user's part (vfs.h) and an implementor's part (vfs-impl.h). 2004-08-16 23:18:42 +00:00
Roland Illig
b17b1ac213 Const-ified the rest of the vfs_class methods. 2004-08-16 22:15:28 +00:00
Roland Illig
e0bf99d516 Made the path argument to vfs->{chmod,chown,utime} constant. 2004-08-16 21:36:39 +00:00
Roland Illig
db3f21b702 Added a typedef for a function. Added more const-ness to the function arguments. 2004-08-16 16:34:11 +00:00
Pavel Roskin
6ffd35bf07 * gc.c: Eliminate all code for timestamping parent filesystems.
It's broken and undocumented.  Adjust all dependencies.
2003-11-26 21:10:42 +00:00
Pavel Roskin
ffb686bfa9 * ftpfs.c (ftpfs_login_server): Explicit password should have
priority over the netrc password and the anonymous password.
Reported by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
2003-11-21 06:57:37 +00:00
Pavel Roskin
4b5a2a0b62 * direntry.c (vfs_s_stamp_me): Generalize and move ...
* gc.c (vfs_stamp_create): ... here.  Use whenever possible.
2003-11-13 08:03:03 +00:00
Pavel Roskin
b33f2cbb47 * vfs.c: Split garbage collection code into ...
* gc.c: ... this.
* vfs.h: Corresponding code moved ...
* gc.h: ... here.
* Makefile.am: Adjustments for the above.
2003-11-07 23:43:55 +00:00
Pavel Roskin
0a9c708bec Fixes for bad strings:
"In this cases"
  "~/.netrc file has not correct mode"
Reported by Arpad Biro <biro_arpad@yahoo.com>
2003-11-05 00:33:34 +00:00
Pavel Roskin
cea13079c3 * ftpfs.c: Use HAVE_STRUCT_LINGER_L_LINGER instead of
HAVE_STRUCT_LINGER.
2003-10-29 17:23:35 +00:00
Pavel Roskin
cd644b527c * fish.c (fish_fh_open): Use vfs_mkstemps() for write buffers as
well, since the file can be reopened for reading later.
* ftpfs.c (ftpfs_fh_open): Likewise.
2003-10-29 01:35:36 +00:00
Pavel Roskin
8e3a0c9d65 * direntry.c (vfs_s_init_class): Improve interface to allow more
code reuse.  Change all callers.
(vfs_s_getlocalcopy): New implementation.  Don't use
mc_def_getlocalcopy().  Use vfs_s_open() to create local copy.
(vfs_s_ungetlocalcopy): New function.
* xdirentry.h: Add new field "flags" to struct vfs_s_subclass.
* extfs.c (extfs_ungetlocalcopy): Don't use
mc_def_ungetlocalcopy() in the dead branch.
* vfs.c (mc_def_getlocalcopy): Make static.
(mc_def_ungetlocalcopy): Likewise.
2003-10-28 07:09:39 +00:00
Pavel Roskin
7d16d65e35 * vfs.h: Constify some arguments for many functions.
* xdirentry.h: Likewise.  Adjust all dependencies.
2003-10-28 02:10:33 +00:00
Pavel Roskin
5bc20fd294 * *.c: Rename functions that don't have an a prefix indicating
what file they are defined in.  This simplifies debugging.
2003-10-28 00:57:02 +00:00
Pavel Roskin
511321bcfd * direntry.c (vfs_s_add_dots): Remove. Fix all callers.
(vfs_s_free_inode): Remove support for "." and ".." entries.
* ftpfs.c (dir_load): Likewise.
Support for "." and ".." entries was a hack that could make the
cache non-traversible from inodes to the root and cause infinite
loop in vfs_s_fullpath().
Reported by Frédéric L. W. Meunier <lists1@pervalidus.net>
2003-10-27 01:26:18 +00:00
Pavel Roskin
211ce16fac * wtools.c: Merge mc_message() and message() into one background
safe function message().  Fix all callers.
2003-10-26 04:47:20 +00:00
Pavel Roskin
50045218ab Remove unneeded includes in ../src 2003-10-25 21:34:57 +00:00
Pavel Roskin
2d33b5047e * background.c: Replace all message stubs with a new function
mc_message().  Protect against strlen(MSG_ERROR).  Adjust all
dependencies.
2003-10-25 19:54:24 +00:00
Pavel Roskin
be3fa535ba * ftpfs.c: Remove the rest of source routing code.
* xdirentry.h: Likewise.
2003-10-24 20:08:38 +00:00
Pavel Roskin
79d3e0a85f * ftpfs.c (setup_source_route): Remove. It's a badly
implemented hack that was never enabled.
2003-10-24 19:03:27 +00:00
Pavel Roskin
7c4fc715da * direntry.c (vfs_s_setctl): Implement VFS_SETCTL_FLUSH.
* ftpfs.c: Remove ftpfs_flushdir.  Use MEDATA->flush.
* fish.c: Use MEDATA->flush.
2003-10-16 18:51:41 +00:00
Pavel Roskin
e9ffcceae5 * direntry.c (vfs_s_setctl): Add support to VFS_SETCTL_LOGFILE.
* ftpfs.c (ftpfs_set_debug): Remove.
2003-10-16 17:08:38 +00:00
Pavel Roskin
63740624ea * xdirentry.h: Rename vfs_s_data to vfs_s_subclass.
* cpio.c: Initialize only non-zero fields in vfs_s_subclass.
* fish.c: Likewise.
* ftpfs.c: Likewise.
* tar.c: Likewise.
2003-10-16 16:40:11 +00:00
Pavel Roskin
52844a3092 * vfs.h: Rename commands for mc_ctl() and mc_setctl() to make it
clear which function they are used with.
* vfs.c (mc_ctl): Change last argument to (void*).
(mc_set): Likewise.
Adjust all dependencies.
2003-10-16 16:12:19 +00:00
Pavel Roskin
fc7267906f * xdirentry.h: Move system includes to the files that need them. 2003-10-16 08:47:33 +00:00
Pavel Roskin
dcd2b9e8fc * xdirentry.h: Fix typos in field names. 2003-10-16 06:05:39 +00:00
Pavel Roskin
a6754ce841 * xdirentry.h: Cleanup unused or write-only fields. Adjust all
dependencies.
2003-10-16 05:47:23 +00:00
Pavel Roskin
b7efdfa380 * xdirentry.h: Remove magic numbers. Move some constants ...
* ftpfs.c: ... here.
2003-10-16 05:06:24 +00:00
Pavel Roskin
6cf97f4069 * xdirentry.h: Remove all typedefs, there is no need to hide the
fact that structures are structures.  Fix all dependencies.
2003-10-12 01:00:44 +00:00
Pavel Roskin
00b57fd4bf * vfs.h: Remove typedef vfs, it's too ambiguous. Massive
changes to use struct vfs_class instead.
2003-10-12 00:24:00 +00:00
Pavel Roskin
c028805b33 * ftpfs.c: Switch to self-registration. 2003-10-11 09:27:37 +00:00
Pavel Roskin
1d6e00faf0 * vfs.h: Introduce new VFS flags instead of the old unused ones.
* vfs.c (vfs_file_class_flags): New function.
(vfs_file_is_ftp): Eliminate.
(vfs_file_is_smb): Likewise.
(vfs_file_is_local): Likewise.
(vfs_current_is_local): Use new VFSF_LOCAL flag.
2003-10-11 08:21:16 +00:00
Pavel Roskin
ef9371e3fa * ftpfs.c (initconn): Use more portable initialization.
* xdirentry.h: Use safer definition of ERRNOR.
2003-08-29 22:32:21 +00:00