[Developers] HTTPDExtra should not add multiply announced files more than once to its list

Frank Loeffler knarf at cct.lsu.edu
Wed Oct 7 13:06:14 CDT 2009


Hi,

currently, when a file is announced more than once (e.g. a jpeg because
it changed and needs to get uploaded to e.g. flickr), HTTPDExtra adds it
to its list which then grows longer and longer as the simulation goes
on, but essentially without new information, as the old file gets
overwritten anyway.

This patch lets the internal list not grow if a file was already added
to that list. It is in some way not the ideal way of doing this, because
it does not let the advertising thorn change e.g. the mime type and
other information like the description, but this would require either
making the list entries non-const (which I refrain from because that
would probably be a big change, although it would probably be the best
path to go), or it would require to remove the entry and add a new -
which is possible, but has a potential of breaking something which does
not expect entries to be removed and it might slow down things if that
list is long.

So, this patch only looks for an entry with the filename of an advertised
file and if there is already one, it does not touch it, nor is a new
entry added.

Please comment.

Frank



--- StripMime Report -- processed MIME parts ---
multipart/signed
  text/plain (text body -- kept)
  application/pgp-signature
---


More information about the Developers mailing list