summaryrefslogtreecommitdiff
path: root/libwaitress
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-05-22 21:45:58 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-05-22 21:47:37 +0200
commit38eafbf8bf2aaae998aae3801350cdc437fd9cd2 (patch)
treeefaa8749ad7268c7d4128736d9c0db458ac4bd0d /libwaitress
parenta3a12a524c41f45d9cd9ebaa94cb22dc1456e6b1 (diff)
downloadpianobar-38eafbf8bf2aaae998aae3801350cdc437fd9cd2.tar.gz
pianobar-38eafbf8bf2aaae998aae3801350cdc437fd9cd2.tar.bz2
pianobar-38eafbf8bf2aaae998aae3801350cdc437fd9cd2.zip
waitress: Add _RET_READ_ERR, retry on read error in player
Enhances commit 279f3ba93b729684e54300352c59523bd05e54bc
Diffstat (limited to 'libwaitress')
-rw-r--r--libwaitress/src/main.c2
-rw-r--r--libwaitress/src/waitress.h3
2 files changed, 3 insertions, 2 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 *);