On 10-Sep-07, at 10:06 PM, Christian Biere wrote: >> As best I can figure, the problem was caused by a hackneyed attempt >> to use dmesh_fill_alternate() with, um, an uninitialized gnet_host_t >> pointer as the 'vector', which as far as I can tell means 'pointer to >> the array that gets filled in'. > > I can't quite follow you. Where do you see dmesh_fill_alternate() > in this > code path?
Apologies. A context error, I had relied on a clause of the previous message for disambiguation. I was referring to my own code appending sha1 (properly) and source (very improperly) information to the completed files via xattr. >> I would have identified this as a >> mistake if I had caught it, but I didn't. > > Which code exactly looks dubious to you? Dubious code circa 10760 in "downloads.c", commented out: > /* Send a notification */ > dbus_util_send_message(DBS_EVT_DOWNLOAD_DONE, > download_pathname(d)); > > > /* Append attributes to file? > */ > > setxattr(fi->pathname,"SHA1Value", sha1_base32(d->sha1), > 64,0,XATTR_CREATE); > > // gnet_host_t *hostlist; <--- WRONG! > // gint thecount = dmesh_count(d->sha1); > // dmesh_fill_alternate(d->sha1,hostlist,thecount); I'd been reading too many data structure notes too quickly. C. Biere wrote: > So something shortly before the crash must have corrupted the > fileinfo structure. Yes. Cargo cult coding. - Matt ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ gtk-gnutella-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
