mirror of
https://github.com/curl/curl.git
synced 2026-08-26 10:03:33 +03:00
Use platform's native types for recv() and send() arguments.
This commit is contained in:
parent
10489879f7
commit
58176d1484
5 changed files with 70 additions and 20 deletions
|
|
@ -173,6 +173,7 @@ static int juggle(curl_socket_t *sockfdp,
|
|||
unsigned char buffer[256]; /* FIX: bigger buffer */
|
||||
char data[256];
|
||||
curl_socket_t sockfd;
|
||||
ssize_t bytes_written;
|
||||
|
||||
timeout.tv_sec = 120;
|
||||
timeout.tv_usec = 0;
|
||||
|
|
@ -301,7 +302,7 @@ static int juggle(curl_socket_t *sockfdp,
|
|||
}
|
||||
else
|
||||
/* send away on the socket */
|
||||
swrite(sockfd, buffer, len);
|
||||
bytes_written = swrite(sockfd, buffer, len);
|
||||
}
|
||||
else if(!memcmp("DISC", buffer, 4)) {
|
||||
/* disconnect! */
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ static int get_request(int sock, struct httprequest *req)
|
|||
/* returns -1 on failure */
|
||||
static int send_doc(int sock, struct httprequest *req)
|
||||
{
|
||||
int written;
|
||||
ssize_t written;
|
||||
size_t count;
|
||||
const char *buffer;
|
||||
char *ptr;
|
||||
|
|
@ -519,7 +519,7 @@ static int send_doc(int sock, struct httprequest *req)
|
|||
count = strlen(STREAMTHIS);
|
||||
while(1) {
|
||||
written = swrite(sock, STREAMTHIS, count);
|
||||
if(written != (int)count) {
|
||||
if(written != count) {
|
||||
logmsg("Stopped streaming");
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue