summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libwaitress/src/main.c2
-rw-r--r--libwaitress/src/waitress.h3
-rw-r--r--src/player.c4
3 files changed, 5 insertions, 4 deletions
diff --git a/libwaitress/src/main.c b/libwaitress/src/main.c
index 43721f0..a9acbd7 100644
--- a/libwaitress/src/main.c
+++ b/libwaitress/src/main.c
@@ -257,7 +257,7 @@ WaitressReturn_t WaitressPollRead (int sockfd, char *buf, size_t count,
return WAITRESS_RET_ERR;
}
if ((*retSize = read (sockfd, buf, count)) == -1) {
- return WAITRESS_RET_ERR;
+ return WAITRESS_RET_READ_ERR;
}
return WAITRESS_RET_OK;
}
diff --git a/libwaitress/src/waitress.h b/libwaitress/src/waitress.h
index b05d786..3bcf524 100644
--- a/libwaitress/src/waitress.h
+++ b/libwaitress/src/waitress.h
@@ -55,7 +55,8 @@ typedef enum {WAITRESS_RET_ERR = 0, WAITRESS_RET_OK, WAITRESS_RET_STATUS_UNKNOWN
WAITRESS_RET_NOTFOUND, WAITRESS_RET_FORBIDDEN, WAITRESS_RET_CONNECT_REFUSED,
WAITRESS_RET_SOCK_ERR, WAITRESS_RET_GETADDR_ERR,
WAITRESS_RET_CB_ABORT, WAITRESS_RET_HDR_OVERFLOW,
- WAITRESS_RET_PARTIAL_FILE, WAITRESS_RET_TIMEOUT} WaitressReturn_t;
+ WAITRESS_RET_PARTIAL_FILE, WAITRESS_RET_TIMEOUT, WAITRESS_RET_READ_ERR}
+ WaitressReturn_t;
void WaitressInit (WaitressHandle_t *);
void WaitressFree (WaitressHandle_t *);
diff --git a/src/player.c b/src/player.c
index abbd5c7..4768ecc 100644
--- a/src/player.c
+++ b/src/player.c
@@ -449,8 +449,8 @@ void *BarPlayerThread (void *data) {
snprintf (extraHeaders, sizeof (extraHeaders), "Range: bytes=%u-\r\n",
player->bytesReceived);
wRet = WaitressFetchCall (&player->waith);
- } while (wRet == WAITRESS_RET_PARTIAL_FILE ||
- wRet == WAITRESS_RET_TIMEOUT);
+ } while (wRet == WAITRESS_RET_PARTIAL_FILE || wRet == WAITRESS_RET_TIMEOUT
+ || wRet == WAITRESS_RET_READ_ERR);
switch (player->audioFormat) {
#ifdef ENABLE_FAAD