FFFTPのソースコードです。
修订版 | 7a44bacac555b6892eb18fb3985acb35b49f0316 (tree) |
---|---|
时间 | 2011-10-24 20:04:00 |
作者 | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Fix bugs of resetting host on reconnecting.
@@ -927,24 +927,15 @@ static void SaveCurrentSetToHistory(void) | ||
927 | 927 | int ReConnectCmdSkt(void) |
928 | 928 | { |
929 | 929 | int Sts; |
930 | - SOCKET s; | |
931 | 930 | |
932 | 931 | |
933 | 932 | // 同時接続対応 |
934 | 933 | // if(CmdCtrlSocket != TrnCtrlSocket) |
935 | -// do_closesocket(TrnCtrlSocket); | |
936 | -// TrnCtrlSocket = INVALID_SOCKET; | |
937 | - s = TrnCtrlSocket; | |
934 | + if(CmdCtrlSocket != TrnCtrlSocket && TrnCtrlSocket != INVALID_SOCKET) | |
935 | + do_closesocket(TrnCtrlSocket); | |
938 | 936 | TrnCtrlSocket = INVALID_SOCKET; |
939 | - if(CmdCtrlSocket != s && s != INVALID_SOCKET) | |
940 | - do_closesocket(s); | |
941 | 937 | |
942 | - // 同時接続対応 | |
943 | -// Sts = ReConnectSkt(&CmdCtrlSocket); | |
944 | - s = CmdCtrlSocket; | |
945 | - CmdCtrlSocket = INVALID_SOCKET; | |
946 | - Sts = ReConnectSkt(&s); | |
947 | - CmdCtrlSocket = s; | |
938 | + Sts = ReConnectSkt(&CmdCtrlSocket); | |
948 | 939 | |
949 | 940 | TrnCtrlSocket = CmdCtrlSocket; |
950 | 941 |