OSDN Git Service

Fix bugs of resetting host on reconnecting.
authors_kawamoto <s_kawamoto@users.sourceforge.jp>
Mon, 24 Oct 2011 11:04:00 +0000 (20:04 +0900)
committers_kawamoto <s_kawamoto@users.sourceforge.jp>
Mon, 24 Oct 2011 11:04:00 +0000 (20:04 +0900)
FFFTP_Eng_Release/FFFTP.exe
Release/FFFTP.exe
connect.c

index 5ddc897..b46c757 100644 (file)
Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
index a27e6b4..fb4deb7 100644 (file)
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
index 09fca6e..186bfca 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -927,24 +927,15 @@ static void SaveCurrentSetToHistory(void)
 int ReConnectCmdSkt(void)\r
 {\r
        int Sts;\r
-       SOCKET s;\r
 \r
 \r
        // 同時接続対応\r
 //     if(CmdCtrlSocket != TrnCtrlSocket)\r
-//             do_closesocket(TrnCtrlSocket);\r
-//     TrnCtrlSocket = INVALID_SOCKET;\r
-       s = TrnCtrlSocket;\r
+       if(CmdCtrlSocket != TrnCtrlSocket && TrnCtrlSocket != INVALID_SOCKET)\r
+               do_closesocket(TrnCtrlSocket);\r
        TrnCtrlSocket = INVALID_SOCKET;\r
-       if(CmdCtrlSocket != s && s != INVALID_SOCKET)\r
-               do_closesocket(s);\r
 \r
-       // 同時接続対応\r
-//     Sts = ReConnectSkt(&CmdCtrlSocket);\r
-       s = CmdCtrlSocket;\r
-       CmdCtrlSocket = INVALID_SOCKET;\r
-       Sts = ReConnectSkt(&s);\r
-       CmdCtrlSocket = s;\r
+       Sts = ReConnectSkt(&CmdCtrlSocket);\r
 \r
        TrnCtrlSocket = CmdCtrlSocket;\r
 \r