Patch for timestamp extenstion of libtorrent

Atul Aggarwal searchatul at gmail.com
Thu Jun 18 04:24:28 UTC 2009


Patch including all suggestions.

Known Issue:
Does not work well with symlinks. (Will try to incorporate in next patch for
symlink extension).

On Wed, Jun 17, 2009 at 12:33 PM, <arvid at cs.umu.se> wrote:

> Quoting Atul Aggarwal <searchatul at gmail.com>:
>
> > This is a patch for adding timestamp extention to libtorrent. Some of the
> > points regarding patch is
> >
> > 1. It fixes the issue of storing attribute for single file.
> > 2. The key used to store timestamp is "timestamp".
> > 3. When dump_torrent example is called,it shows timestamp in GMT timezone
> > (i.e. torrent_info returns timestamp in GMT time). This might not be an
> > issue for IM project and may serve as a feature than an issue.
> >
> > I will soon send the symlink extension patch.
> > For any improvement, mail me.
>
> It seems a bit redundant to me to retrieve the time_t, then convert it to
> ptime,
> then convert it back to time_t (by subtracting the Jan 1st, 1970 date). I
> believe time_t is already well defined to be relative to that date.
>
> Also, I wonder if it might be better to name the key one of "ctime",
> "mtime" or
> "atime", to more closely match the posix standard. Since you're using the
> write
> time, "mtime" would be the corresponding posix name.
>
> The timestamp to add_file() should have a default value to remain backwards
> compatible.
>
> looks good otherwise.
>
> --
> Arvid Norberg
>



-- 
Regards,

Atul Aggarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/instantmirror-list/attachments/20090618/515345fd/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtime.patch
Type: text/x-patch
Size: 6915 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/instantmirror-list/attachments/20090618/515345fd/attachment.bin>


More information about the instantmirror-list mailing list