If there are no saved sessions, put a grayed "(No sessions)" entry on the saved
[sgt/putty] / windows / winnet.c
index bcfc004..db5f54e 100644 (file)
@@ -204,7 +204,7 @@ DECL_WINSOCK_FUNCTION(static, int, getnameinfo,
 DECL_WINSOCK_FUNCTION(static, char *, gai_strerror, (int ecode));
 DECL_WINSOCK_FUNCTION(static, int, WSAAddressToStringA,
                      (LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFO,
-                      LPTSTR, LPDWORD));
+                      LPSTR, LPDWORD));
 #endif
 
 static HMODULE winsock_module = NULL;
@@ -335,7 +335,8 @@ void sk_cleanup(void)
        sktree = NULL;
     }
 
-    p_WSACleanup();
+    if (p_WSACleanup)
+       p_WSACleanup();
     if (winsock_module)
        FreeLibrary(winsock_module);
 #ifndef NO_IPV6