Hi,
I'm currently adding a file cache for the bitzi metadata to GTKG. The
last thing I need to do is parse the XML tickets to extract a urnsha1 so
a proper entry can be added into the hashtable.
I'm using the base32_sha1 function to convert the ASCI string into a
binary urn. As far as I can tell it should work the same as it does for
PARQ, so why is it failing.
My code looks like:
/*
* We extract the urn:sha1 from the ticket as we may be processing
* cached tickets not associated with any actual request
*/
s = xml_get_string(node, "about");
if (s) {
const gchar *urnsha1;
g_warning("found urnsha1: %s [%d/%
d]",&s[9],strlen(&s[9]),SHA1_BASE32_SIZE );
urnsha1 = base32_sha1(&s[9]);
data->urnsha1 = atom_sha1_get(urnsha1);
} else {
g_warning("process_rdf_description: No urnsha!");
}
And it fails thusly:
05/04/05 00:22:19 (WARNING): found urnsha1:
YO5NFLG6VMSUL6ZVLRNVB7MNMAOMWIVW [32/32]
** ERROR **: file atoms.c: line 411 (atom_get): assertion failed: (key !
= NULL)
aborting...
Aborted (core dumped)
As hte base32_sha1 function doesn't seem to grok the base32 encoded urn.
Am I missing something obvious here because the current failure makes no
sense to me. The [9] is to skip over the "urn:sha1:" prefix.
--
Alex, homepage: http://www.bennee.com/~alex/
A possum must be himself, and being himself he is honest. -- Walt Kelly
-------------------------------------------------------
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