diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-07-15 14:51:07 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-07-15 14:51:07 +0200 |
commit | c5a89908b05126fd59ea7d4fd42d9570a2ca6228 (patch) | |
tree | e25a24ae4bd00f11eaed366c7efd03ffc9f93e76 /src | |
parent | 71774028f08edd8ff70f0afd7617ee0cd76d30c8 (diff) | |
download | pianobar-c5a89908b05126fd59ea7d4fd42d9570a2ca6228.tar.gz pianobar-c5a89908b05126fd59ea7d4fd42d9570a2ca6228.tar.bz2 pianobar-c5a89908b05126fd59ea7d4fd42d9570a2ca6228.zip |
piano: Check for exception only in ParseSimple
Fixes false bookmarking error message (bookmarking still worked).
Closes #140
Diffstat (limited to 'src')
-rw-r--r-- | src/libpiano/xml.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/libpiano/xml.c b/src/libpiano/xml.c index a21a109..a8dd576 100644 --- a/src/libpiano/xml.c +++ b/src/libpiano/xml.c @@ -563,28 +563,18 @@ PianoReturn_t PianoXmlParsePlaylist (PianoHandle_t *ph, char *xml, return ret; } -/* parse simple answers like this: <?xml version="1.0" encoding="UTF-8"?> - * <methodResponse><params><param><value>1</value></param></params> - * </methodResponse> +/* check for exception only * @param xml string - * @return + * @return _OK or error */ PianoReturn_t PianoXmlParseSimple (char *xml) { - ezxml_t xmlDoc, dataNode; + ezxml_t xmlDoc; PianoReturn_t ret; if ((ret = PianoXmlInitDoc (xml, &xmlDoc)) != PIANO_RET_OK) { return ret; } - dataNode = ezxml_get (xmlDoc, "params", 0, "param", 0, "value", -1); - - if (strcmp (ezxml_txt (dataNode), "1") == 0) { - ret = PIANO_RET_OK; - } else { - ret = PIANO_RET_ERR; - } - ezxml_free (xmlDoc); return ret; |