summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/itdb_device.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 084f855..6b1d995 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-27 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+ * src/itdb_device.c: fixed endianness autodetection for big endian
+ mobile phones. Thanks to Rached Ben Mustapha for the patch.
+
2006-06-24 Jorg Schuler <jcsjcs at users.sourceforge.net>
* src/itdb_itunesdb.c
diff --git a/src/itdb_device.c b/src/itdb_device.c
index c239af0..ed4c277 100644
--- a/src/itdb_device.c
+++ b/src/itdb_device.c
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-10 15:14:18 jcs>
+/* Time-stamp: <2006-06-27 21:28:29 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -601,7 +601,7 @@ static guint endianess_check_path (const gchar *path, const gchar *hdr)
(buf[2] == hdr[1]) &&
(buf[3] == hdr[0]))
{
- byte_order = G_LITTLE_ENDIAN;
+ byte_order = G_BIG_ENDIAN;
}
}
}
@@ -654,10 +654,11 @@ itdb_device_autodetect_endianess (Itdb_Device *device)
if (control_dir)
{
gchar *cd_l = g_ascii_strdown (control_dir, -1);
+ /* check if cd_l ends on "itunes/itunes_control" */
if (strstr (cd_l, "itunes/itunes_control") ==
(cd_l + strlen (cd_l) - strlen ("itunes/itunes_control")))
{
- device->byte_order = G_BIG_ENDIAN;
+ byte_order = G_BIG_ENDIAN;
}
g_free (cd_l);
g_free (control_dir);