summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-11-13 17:12:57 +0100
committerLars-Dominik Braun <lars@6xq.net>2011-11-13 17:16:38 +0100
commit7439155029db1c0273b4a034f1ab6532aa74e1cb (patch)
tree2a62b07ceed382b44862d7460999964bd9a1b996 /src
parent19c81bb9fa9209a24ccf3d8c6843cd37a8120a1e (diff)
downloadpianobar-windows-7439155029db1c0273b4a034f1ab6532aa74e1cb.tar.gz
pianobar-windows-7439155029db1c0273b4a034f1ab6532aa74e1cb.tar.bz2
pianobar-windows-7439155029db1c0273b4a034f1ab6532aa74e1cb.zip
waitress: Check return code for proxy CONNECT writes
Diffstat (limited to 'src')
-rw-r--r--src/libwaitress/waitress.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c
index a43c81e..d3487c8 100644
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -822,15 +822,15 @@ static WaitressReturn_t WaitressConnect (WaitressHandle_t *waith) {
snprintf (buf, sizeof (buf), "CONNECT %s:%s HTTP/"
WAITRESS_HTTP_VERSION "\r\n",
waith->url.host, WaitressDefaultPort (&waith->url));
- waith->request.write (waith, buf, strlen (buf));
+ WRITE_RET (buf, strlen (buf));
/* write authorization headers */
if (WaitressFormatAuthorization (waith, &waith->proxy, "Proxy-",
buf, WAITRESS_BUFFER_SIZE)) {
- waith->request.write (waith, buf, strlen (buf));
+ WRITE_RET (buf, strlen (buf));
}
- waith->request.write (waith, "\r\n", 2);
+ WRITE_RET ("\r\n", 2);
if ((wRet = WaitressReceiveHeaders (waith, &size)) !=
WAITRESS_RET_OK) {