summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2012-01-13 12:15:45 +0100
committerLars-Dominik Braun <lars@6xq.net>2012-01-13 12:15:45 +0100
commit9a380af719b0cdb599eaf86323bd7ca9a0526482 (patch)
tree53d7113c78fc346d8cb816c0c12b70b20a2d1a3f
parentb5664c83c02e0074d0211a0c48eeb1c3bc0fedb5 (diff)
downloadpianobar-9a380af719b0cdb599eaf86323bd7ca9a0526482.tar.gz
pianobar-9a380af719b0cdb599eaf86323bd7ca9a0526482.tar.bz2
pianobar-9a380af719b0cdb599eaf86323bd7ca9a0526482.zip
piano: New error EXCESSIVE_ACTIVITY
See #208
-rw-r--r--src/libpiano/piano.c4
-rw-r--r--src/libpiano/piano.h1
-rw-r--r--src/libpiano/xml.c2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/libpiano/piano.c b/src/libpiano/piano.c
index d4d8156..3a5e97c 100644
--- a/src/libpiano/piano.c
+++ b/src/libpiano/piano.c
@@ -1230,6 +1230,10 @@ const char *PianoErrorToStr (PianoReturn_t ret) {
return "Last seed cannot be removed.";
break;
+ case PIANO_RET_EXCESSIVE_ACTIVITY:
+ return "Excessive activity.";
+ break;
+
default:
return "No error message available.";
break;
diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h
index d953dec..aed8b75 100644
--- a/src/libpiano/piano.h
+++ b/src/libpiano/piano.h
@@ -253,6 +253,7 @@ typedef enum {
PIANO_RET_PLAYLIST_END = 14,
PIANO_RET_QUICKMIX_NOT_PLAYABLE = 15,
PIANO_RET_REMOVING_TOO_MANY_SEEDS = 16,
+ PIANO_RET_EXCESSIVE_ACTIVITY = 17,
} PianoReturn_t;
void PianoInit (PianoHandle_t *);
diff --git a/src/libpiano/xml.c b/src/libpiano/xml.c
index de05122..ce1074a 100644
--- a/src/libpiano/xml.c
+++ b/src/libpiano/xml.c
@@ -94,6 +94,8 @@ static void PianoXmlIsFaultCb (const char *key, const ezxml_t value,
*ret = PIANO_RET_QUICKMIX_NOT_PLAYABLE;
} else if (strcmp ("REMOVING_TOO_MANY_SEEDS", matchStart) == 0) {
*ret = PIANO_RET_REMOVING_TOO_MANY_SEEDS;
+ } else if (strcmp ("EXCESSIVE_ACTIVITY", matchStart) == 0) {
+ *ret = PIANO_RET_EXCESSIVE_ACTIVITY;
} else {
*ret = PIANO_RET_ERR;
printf (PACKAGE ": Unknown error %s in %s\n",