On Apr 2, 2005 8:49 PM, Christian Biere <[EMAIL PROTECTED]> wrote: > Daniel Grace wrote: > > On Apr 2, 2005 1:40 AM, Christian Biere <[EMAIL PROTECTED]> wrote: > > > I'm not sure what's the best place to put the tigertree. One > > > possibility is to use the fileinfo infrastructure and just > > > put it into the partial file. Otherwise, the tigertree needs > > > to put into a separate file which is somewhat uglier to handle. > > > I wasn't even thinking of where to store stuff when gtk-gnutella is > > closed. That _is_ an interesting problem. If we stick it in the > > partial file, we risk breaking the ability to view/read/hear the > > partial. > > The fileinfo stuff is added behind the end of the file. If the > download is finished, the file is truncated to get rid of > that.
Doh! Why didn't I even think about the possibility of adding to the _end_ instead of the beginning? Yes, that does seem much better compatibility-wise. > > I know that mplayer is pretty good about playing movies/music > > even if it has garbage at the beginning, but I don't think we should > > assume that everyone will be using such forgiving programs. > > Well, since it's not at the beginning but the the end, there > shouldn't be a problem for files that can actually be used > as partials at all. I don't even had problems with pre-viewing > JPEGs this way. If the player/viewer is broken, it's broken - > not our problem, IMNSHO. While I agree that at the end of the day if it comes down to adding a feature or not because of someone else's brokenness, we should go ahead and add it, I was just trying to find a way to do both. Sadly, the way to do both was as obvious as adding to the end of the file instead of the beginning. > > > One further issue is that Gtk-Gnutella cannot download files > > > without knowing the filesize in advance. There were some > > > half-baken attempts to fix this but it's very bug at the moment. > > > Cannot download without knowing the filesize in advance? Ouch. I can > > see where that might be a problem though, given untrusted sources. > > Technically, we cannot "trust" the filesize from the search results > either. It's really just a problem in the download logic which > uses the filesize for hashtables and creating the fileinfo trailer. > This would need to be delayed until the first source could be > contacted. If the sources then disagree about the filesize that's > actually not different from now. > > Anyway, maybe it's not that good to reuse the download facility > to download the tigertree at all. It might be better to use > the lower level http stuff e.g., like gwebcache.c. Some interesting problems to ponder. I work a 12 hour night shift for the next two days (at least), so have time to do little more than work and sleep. I have been, however, going over these things in my mind at work. I appoligize for the seemingly endless discussion with no code. It seems on this email I didn't have much to contribute besides "oh, I see your point." Perhaps pondering things at work will bring to light more issues that need discussion first. > -- > Christian ~Daniel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Gtk-gnutella-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
