mirror of
https://github.com/curl/curl.git
synced 2026-06-15 01:25:38 +03:00
telnet.c rename to sockerr
This commit is contained in:
parent
73daec6620
commit
5703615d77
1 changed files with 18 additions and 18 deletions
36
lib/telnet.c
36
lib/telnet.c
|
|
@ -240,8 +240,8 @@ static void send_negotiation(struct Curl_easy *data, int cmd, int option)
|
|||
|
||||
bytes_written = swrite(conn->sock[FIRSTSOCKET], buf, 3);
|
||||
if(bytes_written < 0) {
|
||||
int err = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", err);
|
||||
int sockerr = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", sockerr);
|
||||
}
|
||||
|
||||
printoption(data, "SENT", cmd, option);
|
||||
|
|
@ -680,7 +680,7 @@ static void sendsuboption(struct Curl_easy *data,
|
|||
struct TELNET *tn, int option)
|
||||
{
|
||||
ssize_t bytes_written;
|
||||
int err;
|
||||
int sockerr;
|
||||
unsigned short x, y;
|
||||
const unsigned char *uc1, *uc2;
|
||||
struct connectdata *conn = data->conn;
|
||||
|
|
@ -714,8 +714,8 @@ static void sendsuboption(struct Curl_easy *data,
|
|||
/* we send the header of the suboption... */
|
||||
bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer, 3);
|
||||
if(bytes_written < 0) {
|
||||
err = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", err);
|
||||
sockerr = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", sockerr);
|
||||
}
|
||||
/* ... then the window size with the send_telnet_data() function
|
||||
to deal with 0xFF cases ... */
|
||||
|
|
@ -723,8 +723,8 @@ static void sendsuboption(struct Curl_easy *data,
|
|||
/* ... and the footer */
|
||||
bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer + 7, 2);
|
||||
if(bytes_written < 0) {
|
||||
err = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", err);
|
||||
sockerr = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", sockerr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -987,7 +987,7 @@ static CURLcode suboption(struct Curl_easy *data, struct TELNET *tn)
|
|||
unsigned char temp[2048];
|
||||
ssize_t bytes_written;
|
||||
size_t len;
|
||||
int err;
|
||||
int sockerr;
|
||||
struct connectdata *conn = data->conn;
|
||||
|
||||
if(!CURL_SB_LEN(tn)) /* ignore empty suboption */
|
||||
|
|
@ -1010,8 +1010,8 @@ static CURLcode suboption(struct Curl_easy *data, struct TELNET *tn)
|
|||
bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len);
|
||||
|
||||
if(bytes_written < 0) {
|
||||
err = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", err);
|
||||
sockerr = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", sockerr);
|
||||
return CURLE_SEND_ERROR;
|
||||
}
|
||||
printsub(data, '>', &temp[2], len-2);
|
||||
|
|
@ -1029,8 +1029,8 @@ static CURLcode suboption(struct Curl_easy *data, struct TELNET *tn)
|
|||
CURL_SE);
|
||||
bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len);
|
||||
if(bytes_written < 0) {
|
||||
err = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", err);
|
||||
sockerr = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", sockerr);
|
||||
return CURLE_SEND_ERROR;
|
||||
}
|
||||
printsub(data, '>', &temp[2], len - 2);
|
||||
|
|
@ -1062,8 +1062,8 @@ static CURLcode suboption(struct Curl_easy *data, struct TELNET *tn)
|
|||
len += 2;
|
||||
bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len);
|
||||
if(bytes_written < 0) {
|
||||
err = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", err);
|
||||
sockerr = SOCKERRNO;
|
||||
failf(data, "Sending data failed (%d)", sockerr);
|
||||
}
|
||||
printsub(data, '>', &temp[2], len - 2);
|
||||
break;
|
||||
|
|
@ -1247,7 +1247,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
DWORD obj_count;
|
||||
DWORD wait_timeout;
|
||||
DWORD readfile_read;
|
||||
int err;
|
||||
int sockerr;
|
||||
#else
|
||||
timediff_t interval_ms;
|
||||
struct pollfd pfd[2];
|
||||
|
|
@ -1385,9 +1385,9 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
case WAIT_OBJECT_0: {
|
||||
events.lNetworkEvents = 0;
|
||||
if(WSAEnumNetworkEvents(sockfd, event_handle, &events) != 0) {
|
||||
err = SOCKERRNO;
|
||||
if(err != SOCKEINPROGRESS) {
|
||||
infof(data, "WSAEnumNetworkEvents failed (%d)", err);
|
||||
sockerr = SOCKERRNO;
|
||||
if(sockerr != SOCKEINPROGRESS) {
|
||||
infof(data, "WSAEnumNetworkEvents failed (%d)", sockerr);
|
||||
keepon = FALSE;
|
||||
result = CURLE_READ_ERROR;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue