mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:41:41 +03:00
tests/server: replace 4 remaining send() calls with swrite()
They were masked by `()`, which was also not necessary anymore. Follow-up to483f4291fb#20459 Follow-up toa585cc35e5#20097 Follow-up tobf7375ecc5#18503 Closes #20460
This commit is contained in:
parent
483f4291fb
commit
2e5cc08d25
1 changed files with 4 additions and 4 deletions
|
|
@ -273,7 +273,7 @@ static curl_socket_t socks4(curl_socket_t fd,
|
|||
response[1] = cd; /* result */
|
||||
/* copy port and address from connect request */
|
||||
memcpy(&response[2], &buffer[SOCKS4_DSTPORT], 6);
|
||||
rc = (send)(fd, (char *)response, 8, 0);
|
||||
rc = swrite(fd, response, 8);
|
||||
if(rc != 8) {
|
||||
logmsg("Sending SOCKS4 response failed!");
|
||||
return CURL_SOCKET_BAD;
|
||||
|
|
@ -344,7 +344,7 @@ static curl_socket_t sockit(curl_socket_t fd)
|
|||
/* respond with two bytes: VERSION + METHOD */
|
||||
response[0] = s_config.responseversion;
|
||||
response[1] = s_config.responsemethod;
|
||||
rc = (send)(fd, (char *)response, 2, 0);
|
||||
rc = swrite(fd, response, 2);
|
||||
if(rc != 2) {
|
||||
logmsg("Sending response failed!");
|
||||
return CURL_SOCKET_BAD;
|
||||
|
|
@ -401,7 +401,7 @@ static curl_socket_t sockit(curl_socket_t fd)
|
|||
}
|
||||
response[0] = 1;
|
||||
response[1] = login ? 0 : 1;
|
||||
rc = (send)(fd, (char *)response, 2, 0);
|
||||
rc = swrite(fd, response, 2);
|
||||
if(rc != 2) {
|
||||
logmsg("Sending auth response failed!");
|
||||
return CURL_SOCKET_BAD;
|
||||
|
|
@ -548,7 +548,7 @@ static curl_socket_t sockit(curl_socket_t fd)
|
|||
memcpy(&response[SOCKS5_BNDADDR + len],
|
||||
&buffer[SOCKS5_DSTADDR + len], sizeof(socksport));
|
||||
|
||||
rc = (send)(fd, (char *)response, (SEND_TYPE_ARG3)(len + 6), 0);
|
||||
rc = swrite(fd, response, len + 6);
|
||||
if(rc != (len + 6)) {
|
||||
logmsg("Sending connect response failed!");
|
||||
return CURL_SOCKET_BAD;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue