Magellan Linux

Annotation of /trunk/kftpgrabber/patches/kftpgrabber-0.8.1-inf-recursion-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 562 - (hide annotations) (download)
Sun Apr 6 15:15:35 2008 UTC (16 years, 1 month ago) by niro
File size: 1644 byte(s)
-fixes an inivitive rucursion in the cwd command

1 niro 562 --- kftpgrabber/src/engine/ftpsocket.cpp 2007/04/29 10:50:17 659051
2     +++ kftpgrabber/src/engine/ftpsocket.cpp 2007/05/03 15:56:28 660745
3     @@ -1247,6 +1247,12 @@
4     break;
5     }
6     case SentCwd: {
7     + if (!socket()->getConfigInt("status.cwd")) {
8     + // Change directory has failed and we should be silent (=error reporting is off)
9     + socket()->resetCommandClass();
10     + return;
11     + }
12     +
13     // Check the directory listing cache
14     DirectoryListing cached = Cache::self()->findCached(socket(), socket()->getCurrentDirectory());
15     if (cached.isValid()) {
16     @@ -1560,6 +1566,7 @@
17     switch (currentState) {
18     case None: {
19     targetDirectory = socket()->getConfig("params.cwd.path");
20     + socket()->setConfig("status.cwd", 1);
21    
22     // If we are already there, no need to CWD
23     if (socket()->getCurrentDirectory() == targetDirectory) {
24     @@ -1608,6 +1615,7 @@
25     socket()->emitError(socket()->getPreviousCommand() == Commands::CmdList ? ListFailed : FileNotFound);
26     socket()->resetCommandClass(Failed);
27     } else {
28     + socket()->setConfig("status.cwd", 0);
29     socket()->resetCommandClass();
30     }
31     }
32     @@ -1629,6 +1637,7 @@
33     socket()->emitError(socket()->getPreviousCommand() == Commands::CmdList ? ListFailed : FileNotFound);
34     socket()->resetCommandClass(Failed);
35     } else {
36     + socket()->setConfig("status.cwd", 0);
37     socket()->resetCommandClass();
38     }
39     break;