From: Jaroslav Kysela Date: Tue, 10 Jun 2014 13:07:58 +0000 (+0200) Subject: httpc: fix for the previous commit X-Git-Tag: v4.1~1946 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaec1c216c02e58362c0cb4e52973a1c6c91b46f;p=thirdparty%2Ftvheadend.git httpc: fix for the previous commit --- diff --git a/src/httpc.c b/src/httpc.c index d6b6129a2..1e1f20600 100644 --- a/src/httpc.c +++ b/src/httpc.c @@ -470,12 +470,13 @@ http_client_send_partial( http_client_t *hc ) if (hc->hc_einprogress) { /* this seems like OSX specific issue */ /* send() in the EINPROGRESS state closes the file-descriptor */ - int err; + int err = 0; socklen_t errlen = sizeof(err); - r = 0; getsockopt(hc->hc_fd, SOL_SOCKET, SO_ERROR, (void *)&err, &errlen); - if (err == EINPROGRESS) + if (err == EINPROGRESS) { + r = err; goto skip; + } hc->hc_einprogress = 0; } if (hc->hc_ssl)