Loweynet
Revisão | 8ef4e07fd1e721b0181b517444b4dffc859e9c09 (tree) |
---|---|
Hora | 2012-01-27 21:41:03 |
Autor | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Enhance routines for extra commands.
@@ -1601,7 +1601,7 @@ int DoSIZE(SOCKET cSkt, char *Path, LONGLONG *Size, int *CancelCheckWork); | ||
1601 | 1601 | int DoMDTM(SOCKET cSkt, char *Path, FILETIME *Time, int *CancelCheckWork); |
1602 | 1602 | // 同時接続対応 |
1603 | 1603 | //int DoQUOTE(char *CmdStr); |
1604 | -int DoQUOTE(SOCKET cSkt, char *CmdStr); | |
1604 | +int DoQUOTE(SOCKET cSkt, char *CmdStr, int *CancelCheckWork); | |
1605 | 1605 | SOCKET DoClose(SOCKET Sock); |
1606 | 1606 | int DoQUIT(SOCKET ctrl_skt); |
1607 | 1607 | int DoDirListCmdSkt(char *AddOpt, char *Path, int Num, int *CancelCheckWork); |
@@ -59,7 +59,7 @@ | ||
59 | 59 | static INT_PTR CALLBACK QuickConDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam); |
60 | 60 | // 同時接続対応 |
61 | 61 | //static int SendInitCommand(char *Cmd); |
62 | -static int SendInitCommand(SOCKET Socket, char *Cmd); | |
62 | +static int SendInitCommand(SOCKET Socket, char *Cmd, int *CancelCheckWork); | |
63 | 63 | static void AskUseFireWall(char *Host, int *Fire, int *Pasv, int *List); |
64 | 64 | static void SaveCurrentSetToHistory(void); |
65 | 65 | static int ReConnectSkt(SOCKET *Skt); |
@@ -240,7 +240,7 @@ void ConnectProc(int Type, int Num) | ||
240 | 240 | DispWindowTitle(); |
241 | 241 | SoundPlay(SND_CONNECT); |
242 | 242 | |
243 | - SendInitCommand(CmdCtrlSocket, CurHost.InitCmd); | |
243 | + SendInitCommand(CmdCtrlSocket, CurHost.InitCmd, &CancelFlg); | |
244 | 244 | |
245 | 245 | if(strlen(CurHost.LocalInitDir) > 0) |
246 | 246 | { |
@@ -611,7 +611,7 @@ void HistoryConnectProc(int MenuCmd) | ||
611 | 611 | DispWindowTitle(); |
612 | 612 | SoundPlay(SND_CONNECT); |
613 | 613 | |
614 | - SendInitCommand(CmdCtrlSocket, CurHost.InitCmd); | |
614 | + SendInitCommand(CmdCtrlSocket, CurHost.InitCmd, &CancelFlg); | |
615 | 615 | |
616 | 616 | DoLocalCWD(CurHost.LocalInitDir); |
617 | 617 | GetLocalDirForWnd(); |
@@ -650,7 +650,9 @@ void HistoryConnectProc(int MenuCmd) | ||
650 | 650 | * cmd1\r\ncmd2\r\n\0 |
651 | 651 | *----------------------------------------------------------------------------*/ |
652 | 652 | |
653 | -static int SendInitCommand(SOCKET Socket, char *Cmd) | |
653 | +// 同時接続対応 | |
654 | +//static int SendInitCommand(char *Cmd) | |
655 | +static int SendInitCommand(SOCKET Socket, char *Cmd, int *CancelCheckWork) | |
654 | 656 | { |
655 | 657 | char Tmp[INITCMD_LEN+1]; |
656 | 658 | char *Pos; |
@@ -661,7 +663,8 @@ static int SendInitCommand(SOCKET Socket, char *Cmd) | ||
661 | 663 | if((Pos = strchr(Tmp, '\r')) != NULL) |
662 | 664 | *Pos = NUL; |
663 | 665 | if(strlen(Tmp) > 0) |
664 | - DoQUOTE(Socket, Tmp); | |
666 | +// DoQUOTE(Tmp); | |
667 | + DoQUOTE(Socket, Tmp, CancelCheckWork); | |
665 | 668 | |
666 | 669 | if((Cmd = strchr(Cmd, '\n')) != NULL) |
667 | 670 | Cmd++; |
@@ -1108,7 +1111,7 @@ int ReConnectTrnSkt(SOCKET *Skt, int *CancelCheckWork) | ||
1108 | 1111 | // if((*Skt = DoConnect(CurHost.HostAdrs, CurHost.UserName, CurHost.PassWord, CurHost.Account, CurHost.Port, CurHost.FireWall, NO, CurHost.Security)) != INVALID_SOCKET) |
1109 | 1112 | if((*Skt = DoConnect(&HostData, CurHost.HostAdrs, CurHost.UserName, CurHost.PassWord, CurHost.Account, CurHost.Port, CurHost.FireWall, NO, CurHost.Security, CancelCheckWork)) != INVALID_SOCKET) |
1110 | 1113 | { |
1111 | - SendInitCommand(*Skt, CurHost.InitCmd); | |
1114 | + SendInitCommand(*Skt, CurHost.InitCmd, CancelCheckWork); | |
1112 | 1115 | // AskRemoteCurDir(Path, FMAX_PATH); |
1113 | 1116 | // DoCWD(Path, YES, YES, YES); |
1114 | 1117 | Sts = FFFTP_SUCCESS; |
@@ -1150,7 +1153,7 @@ static int ReConnectSkt(SOCKET *Skt) | ||
1150 | 1153 | // if((*Skt = DoConnect(CurHost.HostAdrs, CurHost.UserName, CurHost.PassWord, CurHost.Account, CurHost.Port, CurHost.FireWall, NO, CurHost.Security)) != INVALID_SOCKET) |
1151 | 1154 | if((*Skt = DoConnect(&CurHost, CurHost.HostAdrs, CurHost.UserName, CurHost.PassWord, CurHost.Account, CurHost.Port, CurHost.FireWall, NO, CurHost.Security, &CancelFlg)) != INVALID_SOCKET) |
1152 | 1155 | { |
1153 | - SendInitCommand(*Skt, CurHost.InitCmd); | |
1156 | + SendInitCommand(*Skt, CurHost.InitCmd, &CancelFlg); | |
1154 | 1157 | AskRemoteCurDir(Path, FMAX_PATH); |
1155 | 1158 | DoCWD(Path, YES, YES, YES); |
1156 | 1159 | Sts = FFFTP_SUCCESS; |
@@ -3075,7 +3075,7 @@ void SomeCmdProc(void) | ||
3075 | 3075 | { |
3076 | 3076 | // 同時接続対応 |
3077 | 3077 | //DoQUOTE(Cmd); |
3078 | - DoQUOTE(AskCmdCtrlSkt(), Cmd); | |
3078 | + DoQUOTE(AskCmdCtrlSkt(), Cmd, &CancelFlg); | |
3079 | 3079 | } |
3080 | 3080 | EnableUserOpe(); |
3081 | 3081 | } |
@@ -470,12 +470,12 @@ int DoMDTM(SOCKET cSkt, char *Path, FILETIME *Time, int *CancelCheckWork) | ||
470 | 470 | |
471 | 471 | // 同時接続対応 |
472 | 472 | //int DoQUOTE(char *CmdStr) |
473 | -int DoQUOTE(SOCKET cSkt, char *CmdStr) | |
473 | +int DoQUOTE(SOCKET cSkt, char *CmdStr, int *CancelCheckWork) | |
474 | 474 | { |
475 | - int Sts, CancelCheckWork; | |
475 | + int Sts; | |
476 | 476 | |
477 | - CancelCheckWork = NO; | |
478 | - Sts = CommandProcTrn(cSkt, NULL, &CancelCheckWork, "%s", CmdStr); | |
477 | +// Sts = CommandProcCmd(NULL, "%s", CmdStr); | |
478 | + Sts = CommandProcTrn(cSkt, NULL, CancelCheckWork, "%s", CmdStr); | |
479 | 479 | |
480 | 480 | if(Sts/100 >= FTP_CONTINUE) |
481 | 481 | SoundPlay(SND_ERROR); |
@@ -704,10 +704,10 @@ void SwitchOSSProc(void) | ||
704 | 704 | |
705 | 705 | /* DoPWD でノード名の \ を保存するために OSSフラグも変更する */ |
706 | 706 | if(AskOSS() == YES) { |
707 | - DoQUOTE(AskCmdCtrlSkt(), "GUARDIAN"); | |
707 | + DoQUOTE(AskCmdCtrlSkt(), "GUARDIAN", &CancelFlg); | |
708 | 708 | SetOSS(NO); |
709 | 709 | } else { |
710 | - DoQUOTE(AskCmdCtrlSkt(), "OSS"); | |
710 | + DoQUOTE(AskCmdCtrlSkt(), "OSS", &CancelFlg); | |
711 | 711 | SetOSS(YES); |
712 | 712 | } |
713 | 713 | /* Current Dir 再取得 */ |