OSDN Git Service

Fix conditions of sending commands for keep alive.
authors_kawamoto <s_kawamoto@users.sourceforge.jp>
Wed, 16 May 2012 15:00:33 +0000 (00:00 +0900)
committers_kawamoto <s_kawamoto@users.sourceforge.jp>
Wed, 16 May 2012 15:00:33 +0000 (00:00 +0900)
Fix routines for queuing files.

FFFTP_Eng_Release/FFFTP.exe
Release/FFFTP.exe
common.h
ftpproc.c
getput.c

index 6f4dd73..8a4199b 100644 (file)
Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
index 5d4b0a9..d4d002a 100644 (file)
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
index 4d635fc..2576ba9 100644 (file)
--- a/common.h
+++ b/common.h
@@ -1662,6 +1662,8 @@ void EraseTmpTransFileList(TRANSPACKET **Base);
 int RemoveTmpTransFileListItem(TRANSPACKET **Base, int Num);\r
 \r
 void AddTransFileList(TRANSPACKET *Pkt);\r
 int RemoveTmpTransFileListItem(TRANSPACKET **Base, int Num);\r
 \r
 void AddTransFileList(TRANSPACKET *Pkt);\r
+// バグ対策\r
+void AddNullTransFileList();\r
 void AppendTransFileList(TRANSPACKET *Pkt);\r
 void KeepTransferDialog(int Sw);\r
 int AskTransferNow(void);\r
 void AppendTransFileList(TRANSPACKET *Pkt);\r
 void KeepTransferDialog(int Sw);\r
 int AskTransferNow(void);\r
index 01f2303..94ad8a2 100644 (file)
--- a/ftpproc.c
+++ b/ftpproc.c
@@ -314,6 +314,9 @@ void DownloadProc(int ChName, int ForceFile, int All)
 //             strcpy(Pkt.Cmd, "GOQUIT");\r
 //             AddTransFileList(&Pkt);\r
 \r
 //             strcpy(Pkt.Cmd, "GOQUIT");\r
 //             AddTransFileList(&Pkt);\r
 \r
+               // バグ対策\r
+               AddNullTransFileList();\r
+\r
                GoForwardTransWindow();\r
 //             KeepTransferDialog(NO);\r
 \r
                GoForwardTransWindow();\r
 //             KeepTransferDialog(NO);\r
 \r
@@ -427,6 +430,9 @@ void DirectDownloadProc(char *Fname)
 //             strcpy(Pkt.Cmd, "GOQUIT");\r
 //             AddTransFileList(&Pkt);\r
 \r
 //             strcpy(Pkt.Cmd, "GOQUIT");\r
 //             AddTransFileList(&Pkt);\r
 \r
+               // バグ対策\r
+               AddNullTransFileList();\r
+\r
                GoForwardTransWindow();\r
 //             KeepTransferDialog(NO);\r
 \r
                GoForwardTransWindow();\r
 //             KeepTransferDialog(NO);\r
 \r
@@ -697,6 +703,9 @@ void MirrorDownloadProc(int Notify)
                        else\r
                                EraseTmpTransFileList(&Base);\r
 \r
                        else\r
                                EraseTmpTransFileList(&Base);\r
 \r
+                       // バグ対策\r
+                       AddNullTransFileList();\r
+\r
                        DeleteFileList(&LocalListBase);\r
                        DeleteFileList(&RemoteListBase);\r
 \r
                        DeleteFileList(&LocalListBase);\r
                        DeleteFileList(&RemoteListBase);\r
 \r
@@ -1203,6 +1212,9 @@ void UploadListProc(int ChName, int All)
 //             strcpy(Pkt.Cmd, "GOQUIT");\r
 //             AddTransFileList(&Pkt);\r
 \r
 //             strcpy(Pkt.Cmd, "GOQUIT");\r
 //             AddTransFileList(&Pkt);\r
 \r
+               // バグ対策\r
+               AddNullTransFileList();\r
+\r
                GoForwardTransWindow();\r
 \r
                EnableUserOpe();\r
                GoForwardTransWindow();\r
 \r
                EnableUserOpe();\r
@@ -1379,6 +1391,9 @@ void UploadDragProc(WPARAM wParam)
 //             strcpy(Pkt.Cmd, "GOQUIT");\r
 //             AddTransFileList(&Pkt);\r
 \r
 //             strcpy(Pkt.Cmd, "GOQUIT");\r
 //             AddTransFileList(&Pkt);\r
 \r
+               // バグ対策\r
+               AddNullTransFileList();\r
+\r
                GoForwardTransWindow();\r
 \r
                EnableUserOpe();\r
                GoForwardTransWindow();\r
 \r
                EnableUserOpe();\r
@@ -1654,6 +1669,9 @@ void MirrorUploadProc(int Notify)
                        else\r
                                EraseTmpTransFileList(&Base);\r
 \r
                        else\r
                                EraseTmpTransFileList(&Base);\r
 \r
+                       // バグ対策\r
+                       AddNullTransFileList();\r
+\r
                        DeleteFileList(&LocalListBase);\r
                        DeleteFileList(&RemoteListBase);\r
 \r
                        DeleteFileList(&LocalListBase);\r
                        DeleteFileList(&RemoteListBase);\r
 \r
@@ -3675,7 +3693,7 @@ void NoopProc(void)
        CancelCheckWork = NO;\r
        if(AskConnecting() == YES && AskUserOpeDisabled() == NO)\r
        {\r
        CancelCheckWork = NO;\r
        if(AskConnecting() == YES && AskUserOpeDisabled() == NO)\r
        {\r
-               if(AskReuseCmdSkt() == NO || AskShareProh() == YES)\r
+               if(AskReuseCmdSkt() == NO || AskShareProh() == YES || AskTransferNow() == NO)\r
                {\r
                        DisableUserOpe();\r
                        DoDirListCmdSkt("", "", 999, &CancelCheckWork);\r
                {\r
                        DisableUserOpe();\r
                        DoDirListCmdSkt("", "", 999, &CancelCheckWork);\r
index 5cf007a..fb0e1f6 100644 (file)
--- a/getput.c
+++ b/getput.c
@@ -436,6 +436,15 @@ void AddTransFileList(TRANSPACKET *Pkt)
 }\r
 \r
 \r
 }\r
 \r
 \r
+// バグ対策\r
+void AddNullTransFileList()\r
+{\r
+       TRANSPACKET Pkt;\r
+       memset(&Pkt, 0, sizeof(TRANSPACKET));\r
+       strcpy(Pkt.Cmd, "NULL");\r
+       AddTransFileList(&Pkt);\r
+}\r
+\r
 /*----- 転送ファイル情報を転送ファイルリストに追加する ------------------------\r
 *\r
 *      Parameter\r
 /*----- 転送ファイル情報を転送ファイルリストに追加する ------------------------\r
 *\r
 *      Parameter\r