From 14691417b05401957a72ec0ed35b9eed3ddd8e87 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 6 Jan 2009 20:52:16 +0100 Subject: piano: Detect pandora's ip restriction error messages --- libpiano/src/xml.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libpiano/src/xml.c') diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index a07542b..9db2644 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -37,6 +37,10 @@ void PianoXmlStructParser (const xmlNode *structRoot, char *PianoXmlGetNodeText (const xmlNode *node); /* parse fault and get fault type + * @param xml content + * @param xml node + * @param return error string + * @return nothing */ void PianoXmlIsFaultCb (const char *key, const xmlNode *value, void *data) { PianoReturn_t *ret = data; @@ -82,6 +86,11 @@ void PianoXmlIsFaultCb (const char *key, const xmlNode *value, void *data) { } } } + } else if (strcmp ("faultCode", key) == 0) { + /* some error can only be identified by looking at their id */ + if (strcmp ("12", valueStr) == 0) { + *ret = PIANO_RET_IP_REJECTED; + } } } -- cgit v1.2.3