From c726c163e606c81b377afec6d470086431f773ea Mon Sep 17 00:00:00 2001 From: Jorg Schuler Date: Fri, 17 Mar 2006 15:38:08 +0000 Subject: * itdb_itunesdb.c (mk_mhod): fixed bug when writing podcast urls. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1222 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 4 ++++ src/itdb_itunesdb.c | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b33dd8..dfe6897 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-02-18 Jorg Schuler + + * itdb_itunesdb.c (mk_mhod): fixed bug when writing podcast urls. + 2005-02-17 Jorg Schuler * itdb_device.[ch]: rewrote ipod-device.c, removed all hal-code, diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 7723f62..3bcb584 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -1,4 +1,4 @@ -/* Time-stamp: <2006-03-17 23:09:15 jcs> +/* Time-stamp: <2006-03-18 00:35:07 jcs> | | Copyright (C) 2002-2005 Jorg Schuler | Part of the gtkpod project. @@ -2783,8 +2783,13 @@ static void put_header (WContents *cts, gchar *header) gchar rdata[4]; gint i, offset, sign; + g_return_if_fail (cts); g_return_if_fail (header); + if (strlen (header) != 4) + { + printf ("wrong header: '%s'\n", header); + } g_return_if_fail (strlen (header) == 4); /* reverse data for write if necessary */ @@ -3333,9 +3338,9 @@ static void mk_mhod (WContents *cts, MHODData *mhod) put_header (cts, "mhod"); /* header */ put32lint (cts, 24); /* size of header */ put32lint (cts, 24+len); /* size of header + data */ - put32lint (cts, mhod->type); /* type of the mhod */ + put32lint (cts, mhod->type);/* type of the mhod */ put32_n0 (cts, 2); /* unknown */ - put_header (cts, mhod->data.string); /* the string */ + put_string (cts, mhod->data.string);/* the string */ } break; case MHOD_ID_PLAYLIST: -- cgit