diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-06-27 12:35:01 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-06-27 12:35:01 +0000 |
commit | 324432f99dacec27908efb29ac60bee96091a3f5 (patch) | |
tree | eea55a59b75d2aed5af943928b2f86599389a42f | |
parent | 603dee7e51c02b5fdf340fada903e3e7aab4899e (diff) | |
download | libgpod-324432f99dacec27908efb29ac60bee96091a3f5.tar.gz libgpod-324432f99dacec27908efb29ac60bee96091a3f5.tar.xz libgpod-324432f99dacec27908efb29ac60bee96091a3f5.zip |
* src/itdb_device.c: fixed endianness autodetection for big endian
mobile phones. Thanks to Rached Ben Mustapha for the patch.
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1305 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/itdb_device.c | 7 |
2 files changed, 9 insertions, 3 deletions
@@ -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); |