In the function vfs_expire(), curr_time and exp_time are declared
guint64. curr_time is initialised with a timestamp and exp_time
with this timestamp minus vfs_timeout seconds. Later there is if
(stamping->time <= exp_time). Prior to commit
a94dd7d2de curr_time was initialised with
a value larger than vfs_timeout seconds, so everything was fine. This
commit changed the initialisation to a timer starting when mc is
started. So for the first vfs_timeout seconds, the result of the
subtraction is negative, but it is a guint64, so we just get a VERY
large unsigned value and the if (stamping->time <= exp_time) is always
true. So mc thinks the vfs hasn't been used recently and goes into an
infinite loop.
If one opens a .rpm file with mc and goes into the CONTENTS.cpio and
then tries to go into the .tar.gz there (this is the usual structure of
a .rpm) after waiting vfs_timeout seconds, everything is fine. However,
before vfs_timeout seconds, mc hangs.
Solution: use g_get_real_time() instead of mc_timer_elapsed().
Thanks nvwarr at hotmail.com for finding out the reason for this bug.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>