Clarify that '-m' takes a _local_ file.
[u/mdw/putty] / proxy.c
diff --git a/proxy.c b/proxy.c
index 42b713e..4a2dd19 100644 (file)
--- a/proxy.c
+++ b/proxy.c
@@ -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);