Revision: 2273
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2273&view=rev
Author: teuf
Date: 2009-03-14 18:12:13 +0000 (Sat, 14 Mar 2009)
Log Message:
-----------
Directly get firewire id from SysInfoExtended if possible
Modified Paths:
--------------
libgpod/trunk/ChangeLog
libgpod/trunk/src/itdb_device.c
Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog 2009-03-14 18:02:16 UTC (rev 2272)
+++ libgpod/trunk/ChangeLog 2009-03-14 18:12:13 UTC (rev 2273)
@@ -1,5 +1,10 @@
2009-03-14 Christophe Fergeau <[email protected]>
+ * src/itdb_device.c: directly read firewire ID from SysInfoExtended
+ when it's available.
+
+2009-03-14 Christophe Fergeau <[email protected]>
+
* src/itdb.h
* src/itdb_device.c
* src/itdb_device.h: add itdb_device_supports_chapter_image method
Modified: libgpod/trunk/src/itdb_device.c
===================================================================
--- libgpod/trunk/src/itdb_device.c 2009-03-14 18:02:16 UTC (rev 2272)
+++ libgpod/trunk/src/itdb_device.c 2009-03-14 18:12:13 UTC (rev 2273)
@@ -1694,7 +1694,8 @@
*
* Returns the Firewire ID for @device, this is useful to calculate the
* iTunesDB checksum which is expected by newer iPod models
- * (iPod classic/fat nanos)
+ * (iPod classic/fat nanos) and is needed on iPod plugged through USB contrary
+ * to what the name implies.
*
* Returns: the guint64 firewire id, or 0 if we don't know it
*
@@ -1702,14 +1703,20 @@
*/
guint64 itdb_device_get_firewire_id (const Itdb_Device *device)
{
- gchar *fwid;
+ const gchar *fwid = NULL;
- g_assert (device->sysinfo != NULL);
+ if (device->sysinfo_extended != NULL) {
+ fwid = itdb_sysinfo_properties_get_firewire_id
(device->sysinfo_extended);
+ }
+ if (fwid == NULL) {
+ fwid = (const gchar *)g_hash_table_lookup (device->sysinfo,
+ "FirewireGuid");
+ }
- fwid = g_hash_table_lookup (device->sysinfo, "FirewireGuid");
if (fwid == NULL) {
return 0;
}
+
return g_ascii_strtoull (fwid, NULL, 16);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2