~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve the noise collection for the internal random pool.
[sgt/putty]
/
proxy.c
diff --git
a/proxy.c
b/proxy.c
index
1bcb2b2
..
0760e7e
100644
(file)
--- a/
proxy.c
+++ b/
proxy.c
@@
-5,8
+5,6
@@
* code and the higher level backend.
*/
* code and the higher level backend.
*/
-#include <windows.h>
-
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include <string.h>
@@
-155,7
+153,7
@@
static void sk_proxy_set_frozen (Socket s, int is_frozen)
* so we have to check each time.
*/
while (!ps->freeze && bufchain_size(&ps->pending_input_data) > 0) {
* so we have to check each time.
*/
while (!ps->freeze && bufchain_size(&ps->pending_input_data) > 0) {
-
char *
data;
+
void *
data;
int len;
bufchain_prefix(&ps->pending_input_data, &data, &len);
plug_receive(ps->plug, 0, data, len);
int len;
bufchain_prefix(&ps->pending_input_data, &data, &len);
plug_receive(ps->plug, 0, data, len);
@@
-314,7
+312,7
@@
Socket new_connection(SockAddr addr, char *hostname,
int port, int privport,
int oobinline, int nodelay, Plug plug)
{
int port, int privport,
int oobinline, int nodelay, Plug plug)
{
- static struct socket_function_table socket_fn_table = {
+ static
const
struct socket_function_table socket_fn_table = {
sk_proxy_plug,
sk_proxy_close,
sk_proxy_write,
sk_proxy_plug,
sk_proxy_close,
sk_proxy_write,
@@
-326,7
+324,7
@@
Socket new_connection(SockAddr addr, char *hostname,
sk_proxy_socket_error
};
sk_proxy_socket_error
};
- static struct plug_function_table plug_fn_table = {
+ static
const
struct plug_function_table plug_fn_table = {
plug_proxy_closing,
plug_proxy_receive,
plug_proxy_sent,
plug_proxy_closing,
plug_proxy_receive,
plug_proxy_sent,
@@
-641,7
+639,7
@@
int proxy_socks4_negotiate (Proxy_Socket p, int change)
int length;
char * command;
int length;
char * command;
- if (sk_addrtype(p->remote_addr) != A
F_INET
) {
+ if (sk_addrtype(p->remote_addr) != A
DDRTYPE_IPV4
) {
plug_closing(p->plug, "Proxy error: SOCKS version 4 does"
" not support IPv6", PROXY_ERROR_GENERAL, 0);
return 1;
plug_closing(p->plug, "Proxy error: SOCKS version 4 does"
" not support IPv6", PROXY_ERROR_GENERAL, 0);
return 1;
@@
-931,7
+929,7
@@
int proxy_socks5_negotiate (Proxy_Socket p, int change)
char command[22];
int len;
char command[22];
int len;
- if (sk_addrtype(p->remote_addr) == A
F_INET
) {
+ if (sk_addrtype(p->remote_addr) == A
DDRTYPE_IPV6
) {
len = 10;
command[3] = 1; /* IPv4 */
} else {
len = 10;
command[3] = 1; /* IPv4 */
} else {