Revision: 2236
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2236&view=rev
Author: teuf
Date: 2009-01-21 21:52:20 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
Set the hashing scheme field in the checksum writing functions
Modified Paths:
--------------
libgpod/trunk/ChangeLog
libgpod/trunk/src/itdb_device.c
libgpod/trunk/src/itdb_itunesdb.c
Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog 2009-01-21 21:51:35 UTC (rev 2235)
+++ libgpod/trunk/ChangeLog 2009-01-21 21:52:20 UTC (rev 2236)
@@ -1,5 +1,12 @@
2009-01-21 Christophe Fergeau <teuf at gnome.org>
+ * src/itdb_device.c: set the hashing scheme in
+ itdb_device_write_checksum instead of doing it in itdb_itunesdb,
+ allows more flexibility if we ever add different checksumming
+ methods
+
+2009-01-21 Christophe Fergeau <teuf at gnome.org>
+
* src/itdb_device.c:
* src/itdb_private.h: get rid of itdb_device_requires_checksum
which is now unused
Modified: libgpod/trunk/src/itdb_device.c
===================================================================
--- libgpod/trunk/src/itdb_device.c 2009-01-21 21:51:35 UTC (rev 2235)
+++ libgpod/trunk/src/itdb_device.c 2009-01-21 21:52:20 UTC (rev 2236)
@@ -1765,6 +1765,8 @@
memset(&header->unknown6, 0, sizeof (header->unknown6));
memset(&header->hash58, 0, sizeof (header->hash58));
+ header->hashing_scheme = GUINT16_FROM_LE (ITDB_CHECKSUM_HASH58);
+
checksum = itdb_compute_hash (fwid, itdb_data, itdb_len, &len);
if (checksum == NULL) {
g_set_error (error, 0, -1, "Failed to compute checksum");
Modified: libgpod/trunk/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/src/itdb_itunesdb.c 2009-01-21 21:51:35 UTC (rev 2235)
+++ libgpod/trunk/src/itdb_itunesdb.c 2009-01-21 21:52:20 UTC (rev 2236)
@@ -3500,7 +3500,9 @@
put16lint (cts, 2); /* always seems to be 2 */
put16_n0 (cts, 7); /* unknown */
/* 0x30 */
- put16lint (cts, itdb_device_get_checksum_type (fexp->itdb->device));
+ put16lint (cts, 0); /* set hashing scheme to 0 for now, will be set
+ * to the appropriate value in
+ * itdb_device_write_checksum */
put16_n0 (cts, 10); /* unknown */
/* 0x46 */
put16lint (cts, 0); /* langauge */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2