diff options
Diffstat (limited to 'libpiano/src/xml.c')
-rw-r--r-- | libpiano/src/xml.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index 185002d..ad0cf7d 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -487,8 +487,10 @@ PianoReturn_t PianoXmlParseAddSeed (PianoHandle_t *ph, char *xml, /* parses playlist; used when searching too * @param piano handle * @param xml document + * @param return: playlist */ -PianoReturn_t PianoXmlParsePlaylist (PianoHandle_t *ph, char *xml) { +PianoReturn_t PianoXmlParsePlaylist (PianoHandle_t *ph, char *xml, + PianoSong_t **retPlaylist) { ezxml_t xmlDoc, dataNode; PianoReturn_t ret; @@ -511,10 +513,10 @@ PianoReturn_t PianoXmlParsePlaylist (PianoHandle_t *ph, char *xml) { PianoXmlStructParser (ezxml_child (dataNode, "struct"), PianoXmlParsePlaylistCb, tmpSong); /* begin linked list or append */ - if (ph->playlist == NULL) { - ph->playlist = tmpSong; + if (*retPlaylist == NULL) { + *retPlaylist = tmpSong; } else { - PianoSong_t *curSong = ph->playlist; + PianoSong_t *curSong = *retPlaylist; while (curSong->next != NULL) { curSong = curSong->next; } |