402fb03e7c
(upstream commit c5a89908b05126fd59ea7d4fd42d9570a2ca6228)
38 lines
1.0 KiB
Plaintext
38 lines
1.0 KiB
Plaintext
$OpenBSD: patch-src_libpiano_xml_c,v 1.3 2011/07/18 15:04:08 dcoppa Exp $
|
|
|
|
Fix false bookmarking error message
|
|
(upstream commit c5a89908b05126fd59ea7d4fd42d9570a2ca6228)
|
|
|
|
--- src/libpiano/xml.c.orig Sat Jul 9 10:40:54 2011
|
|
+++ src/libpiano/xml.c Mon Jul 18 17:00:10 2011
|
|
@@ -560,26 +560,16 @@ PianoReturn_t PianoXmlParsePlaylist (PianoHandle_t *ph
|
|
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);
|