diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-01-06 20:52:16 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-01-06 20:52:16 +0100 |
commit | 14691417b05401957a72ec0ed35b9eed3ddd8e87 (patch) | |
tree | 66fc948874eef34da3b2a001acebf7604a1fbe9c /libpiano/src/xml.c | |
parent | 785819ed369fae59aef20a09779eaa0a627a8709 (diff) | |
download | pianobar-14691417b05401957a72ec0ed35b9eed3ddd8e87.tar.gz pianobar-14691417b05401957a72ec0ed35b9eed3ddd8e87.tar.bz2 pianobar-14691417b05401957a72ec0ed35b9eed3ddd8e87.zip |
piano: Detect pandora's ip restriction error messages
Diffstat (limited to 'libpiano/src/xml.c')
-rw-r--r-- | libpiano/src/xml.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 <name> content + * @param xml <value> 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; + } } } |