diff --git a/ChangeLog b/ChangeLog index d75c4e914..3a6aee0e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-02-23 Pavel Tsekov + + * doc/mc.1.in: Document `fish_directory_timeout'. + 2006-02-18 David Martin < * doc/es/mc.1.in: Cleanup. Fix key naming. diff --git a/doc/mc.1.in b/doc/mc.1.in index 12ae7ad78..3d4221560 100644 --- a/doc/mc.1.in +++ b/doc/mc.1.in @@ -3183,6 +3183,10 @@ mc.ext file\&. If this variable is on (default is off) when you browse the file system on a Tree panel, it will automatically reload the other panel with the contents of the selected directory. +.TP +.I fish_directory_timeout +This variable holds the lifetime of a directory cache entry in seconds. The +default value is 900 seconds. .\"NODE "Terminal databases" .SH "Terminal databases" The Midnight Commander provides a way to fix your system terminal diff --git a/src/ChangeLog b/src/ChangeLog index 116aed77a..531a5881c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-02-23 Pavel Tsekov + + * setup.c [USE_NETCODE]: Include fish.h . + (int_options) [USE_NETCODE]: Add support for user configurable + expiration timeout of FISH directory cache entries. + 2006-02-21 Pavel Tsekov * cons.saver.c [HAVE_CONFIG_H]: Include config.h . diff --git a/src/setup.c b/src/setup.c index a30d8ead3..38306ce50 100644 --- a/src/setup.c +++ b/src/setup.c @@ -52,6 +52,7 @@ #ifdef USE_NETCODE # include "../vfs/ftpfs.h" +# include "../vfs/fish.h" #endif #ifdef USE_INTERNAL_EDIT @@ -197,6 +198,7 @@ static const struct { { "ftpfs_use_passive_connections", &ftpfs_use_passive_connections }, { "ftpfs_use_unix_list_options", &ftpfs_use_unix_list_options }, { "ftpfs_first_cd_then_ls", &ftpfs_first_cd_then_ls }, + { "fish_directory_timeout", &fish_directory_timeout }, #endif /* USE_NETCODE */ #endif /* USE_VFS */ #ifdef USE_INTERNAL_EDIT diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 7cd13c0f6..47f61fe5d 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,12 @@ +2006-02-23 Pavel Tsekov + + * fish.h: New file. + * fish.c (fish_directory_timeout): Define new global variable. + (FISH_DIRECTORY_TIMEOUT): Eliminate - this macro is not used + anywhere. + (fish_dir_load): Use `fish_directory_timeout' to calculate the + expiration time of a newly created directory entries. + 2006-02-23 Pavel Tsekov * ftpfs.c (ftpfs_dir_uptodate): Remove. diff --git a/vfs/fish.c b/vfs/fish.c index 8bdcbcdd7..8eed9e7e4 100644 --- a/vfs/fish.c +++ b/vfs/fish.c @@ -50,8 +50,9 @@ #include "gc.h" /* vfs_stamp_create */ #include "tcputil.h" #include "../src/unixcompat.h" +#include "fish.h" -#define FISH_DIRECTORY_TIMEOUT 30 * 60 +int fish_directory_timeout = 900; #define DO_RESOLVE_SYMLINK 1 #define DO_OPEN 2 @@ -367,8 +368,7 @@ fish_dir_load(struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path) print_vfs_message(_("fish: Reading directory %s..."), remote_path); gettimeofday(&dir->timestamp, NULL); - dir->timestamp.tv_sec += 10; /* was 360: 10 is good for - stressing direntry layer a bit */ + dir->timestamp.tv_sec += fish_directory_timeout; quoted_path = name_quote (remote_path, 0); fish_command (me, super, NONE, "#LIST /%s\n" diff --git a/vfs/fish.h b/vfs/fish.h new file mode 100644 index 000000000..3876d8552 --- /dev/null +++ b/vfs/fish.h @@ -0,0 +1,6 @@ +#ifndef MC_VFS_FISH_H +#define MC_VFS_FISH_H + +extern int fish_directory_timeout; + +#endif