X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/10068a0b6f3b17af077f501d3ad9cbb2fe332118..48683854cb797009e8e72054eb61b7625b30af91:/proxy.c diff --git a/proxy.c b/proxy.c index 11054df7..4a2dd19c 100644 --- a/proxy.c +++ b/proxy.c @@ -234,7 +234,7 @@ static void plug_proxy_sent (Plug p, int bufsize) plug_sent(ps->plug, bufsize); } -static int plug_proxy_accepting (Plug p, void *sock) +static int plug_proxy_accepting (Plug p, OSSocket sock) { Proxy_Plug pp = (Proxy_Plug) p; Proxy_Socket ps = pp->proxy_socket; @@ -318,9 +318,9 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port, * match (ie. a specific IP) */ - if (addr && stricmp(hostip, exclude_list + s) == 0) + if (addr && strnicmp(hostip, exclude_list + s, e - s) == 0) return 0; /* IP/hostname excluded. do not use proxy. */ - if (stricmp(hostname, exclude_list + s) == 0) + if (strnicmp(hostname, exclude_list + s, e - s) == 0) return 0; /* IP/hostname excluded. do not use proxy. */ } @@ -349,11 +349,6 @@ SockAddr name_lookup(char *host, int port, char **canonicalname, return sk_namelookup(host, canonicalname); } -Socket platform_new_connection(SockAddr addr, char *hostname, - int port, int privport, - int oobinline, int nodelay, Plug plug, - const Config *cfg); - Socket new_connection(SockAddr addr, char *hostname, int port, int privport, int oobinline, int nodelay, Plug plug, @@ -387,8 +382,9 @@ Socket new_connection(SockAddr addr, char *hostname, char *proxy_canonical_name; Socket sret; - if ( (sret = platform_new_connection(addr, hostname, port, privport, - oobinline, nodelay, plug, cfg)) ) + if ((sret = platform_new_connection(addr, hostname, port, privport, + oobinline, nodelay, plug, cfg)) != + NULL) return sret; ret = snew(struct Socket_proxy_tag);