Use platform's native types for recv() and send() arguments.

This commit is contained in:
Yang Tse 2006-07-12 05:19:00 +00:00
parent 10489879f7
commit 58176d1484
5 changed files with 70 additions and 20 deletions

View file

@ -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! */

View file

@ -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;
}