Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 23 Apr 2012 12:13:13 +0400
From: "Alexander V. Lukyanov" <lav@...is.ru>
To: Solar Designer <solar@...nwall.com>
Cc: owl-dev@...ts.openwall.com
Subject: Re: lftp update

On Sun, Apr 22, 2012 at 11:49:35PM +0400, Solar Designer wrote:
> > This patch is about "Inaccurate timestamps" (
> > https://bugzilla.redhat.com/show_bug.cgi?id=666580). This situation occurs
> > always. So I want to add this patch into the package.
> 
> Yes, but that patch is a dirty hack, which will have side-effects: the
> time_fmt string doesn't have to consist solely of format specifiers, it
> may also contain arbitrary text, so with that patch behavior might
> differ depending on whether e.g. an English word contains one of the
> letters matching the format specifiers being checked for or not.
> 
> The patch proposed by JW on the bug entry above makes more sense to me:
> it fixes only one aspect of the issue (adds "%s"), but at least it
> doesn't make things worse in any other aspect (as far as I am aware).
> 
> JW suggests that lftp should keep the maximum possible timestamp
> precision in all cases, which sounds right to me, but I don't know why
> that need_exact_time thing exists in lftp in the first place (nor did I
> try to find out why).  There ought to be a reason for that, so simply
> patching it to "need_exact_time=true;" without figuring that out would
> also be wrong.  (I guess this might have to do with extra round-trips
> being needed to request the exact time with certain protocols - e.g.,
> the usual ls-like listings via FTP vs. the MDTM command.  So maybe the
> protocol in use should be taken into consideration.)

cls command does not need to output precise time always, so it is possible
to optimize it by allowing backend not to try to get exact time when
getting exact time is expensive.

There would be no harm if need_exact_time will be true when it may be false,
cls would only spend more time getting unneeded info.

So I think the simplest thing is to set need_exact_time always when the time
is needed at all. Please test this patch.

-- 
   Alexander.

View attachment "diff" of type "text/plain" (1002 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.