Store default port number in each back end
[u/mdw/putty] / raw.c
diff --git a/raw.c b/raw.c
index dd0f64a..b0c8370 100644 (file)
--- a/raw.c
+++ b/raw.c
@@ -1,7 +1,13 @@
 #include <windows.h>
 #include <stdio.h>
 #include <stdlib.h>
+#ifndef AUTO_WINSOCK
+#ifdef WINSOCK_TWO
+#include <winsock2.h>
+#else
 #include <winsock.h>
+#endif
+#endif
 
 #include "putty.h"
 
@@ -131,6 +137,11 @@ static char *raw_init (HWND hwnd, char *host, int port, char **realhost) {
          default: return "WSAAsyncSelect(): unknown error";
        }
 
+    /*
+     * We have no pre-session phase.
+     */
+    begin_session();
+
     return NULL;
 }
 
@@ -232,5 +243,6 @@ Backend raw_backend = {
     raw_size,
     raw_special,
     raw_socket,
-    raw_sendok
+    raw_sendok,
+    1
 };