mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Tiny fixes in the SOCKS proxy code.
Just happened to jump out at me in an eyeball inspection just now. I
carefully moved all the protocol byte-value constants into a header
file with mnemonic names, but I still hard-coded SOCKS4_REPLY_VERSION
in the text of one diagnostic, and I got the wrong one of
SOCKS5_REQUEST_VERSION and SOCKS5_REPLY_VERSION at one point in the
code. Both benign (the right value was there, juste called by the
wrong name).
Also fixed some missing whitespace, in passing. (Probably the line it
was missing from had once been squashed up closer to the right margin.)
(cherry picked from commit 1cd0f1787f
)
This commit is contained in:
parent
53e7d2c024
commit
963aebc260
@ -95,8 +95,8 @@ static void proxy_socks4_process_queue(ProxyNegotiator *pn)
|
||||
|
||||
if (data[0] != SOCKS4_REPLY_VERSION) {
|
||||
pn->error = dupprintf("SOCKS proxy response contained reply "
|
||||
"version number %d (expected 0)",
|
||||
(int)data[0]);
|
||||
"version number %d (expected %d)",
|
||||
(int)data[0], SOCKS4_REPLY_VERSION);
|
||||
crStopV;
|
||||
}
|
||||
|
||||
|
@ -387,7 +387,7 @@ static void proxy_socks5_process_queue(ProxyNegotiator *pn)
|
||||
* byte[] address, with variable size (see below)
|
||||
* uint16 port
|
||||
*/
|
||||
put_byte(pn->output, SOCKS5_REPLY_VERSION);
|
||||
put_byte(pn->output, SOCKS5_REQUEST_VERSION);
|
||||
put_byte(pn->output, SOCKS_CMD_CONNECT);
|
||||
put_byte(pn->output, 0); /* reserved byte */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user