diff options
-rw-r--r-- | libpiano/src/main.c | 4 | ||||
-rw-r--r-- | libpiano/src/piano.h | 3 | ||||
-rw-r--r-- | libpiano/src/xml.c | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/libpiano/src/main.c b/libpiano/src/main.c index d108c09..f5e9b85 100644 --- a/libpiano/src/main.c +++ b/libpiano/src/main.c @@ -868,6 +868,10 @@ const char *PianoErrorToStr (PianoReturn_t ret) { return "Out of memory."; break; + case PIANO_RET_OUT_OF_SYNC: + return "Out of sync. Please correct your system's time."; + break; + default: return "No error message available."; break; diff --git a/libpiano/src/piano.h b/libpiano/src/piano.h index 7d7554a..3bb9108 100644 --- a/libpiano/src/piano.h +++ b/libpiano/src/piano.h @@ -104,7 +104,8 @@ typedef enum {PIANO_RET_OK, PIANO_RET_ERR, PIANO_RET_XML_INVALID, PIANO_RET_NET_ERROR, PIANO_RET_NOT_AUTHORIZED, PIANO_RET_PROTOCOL_INCOMPATIBLE, PIANO_RET_READONLY_MODE, PIANO_RET_STATION_CODE_INVALID, PIANO_RET_IP_REJECTED, - PIANO_RET_STATION_NONEXISTENT, PIANO_RET_OUT_OF_MEMORY} PianoReturn_t; + PIANO_RET_STATION_NONEXISTENT, PIANO_RET_OUT_OF_MEMORY, + PIANO_RET_OUT_OF_SYNC} PianoReturn_t; void PianoInit (PianoHandle_t *); void PianoDestroy (PianoHandle_t *); diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index b02df5d..5045440 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -79,6 +79,8 @@ static void PianoXmlIsFaultCb (const char *key, const ezxml_t value, } else if (strcmp ("STATION_DOES_NOT_EXIST", matchStart) == 0) { *ret = PIANO_RET_STATION_NONEXISTENT; + } else if (strcmp ("OUT_OF_SYNC", matchStart) == 0) { + *ret = PIANO_RET_OUT_OF_SYNC; } else { *ret = PIANO_RET_ERR; printf (PACKAGE ": Unknown error %s in %s\n", |