1 diff -ur kftpgrabber-0.8.1.old/kftpgrabber/src/engine/ftpsocket.cpp kftpgrabber-0.8.1/kftpgrabber/src/engine/ftpsocket.cpp
2 --- kftpgrabber-0.8.1.old/kftpgrabber/src/engine/ftpsocket.cpp 2009-08-06 04:12:45.938977940 +0300
3 +++ kftpgrabber-0.8.1/kftpgrabber/src/engine/ftpsocket.cpp 2009-08-06 04:13:52.117078262 +0300
7 // 229 Entering Extended Passive Mode (|||55016|)
8 - char *begin = strchr(socket()->getResponse().ascii(), '(');
9 + const char *begin = strchr(socket()->getResponse().ascii(), '(');
12 if (!begin || sscanf(begin, "(|||%d|)", &port) != 1) {
15 // Ok PASV command successfull - let's parse the result
17 - char *begin = strchr(socket()->getResponse().ascii(), '(');
18 + const char *begin = strchr(socket()->getResponse().ascii(), '(');
20 // Some stinky servers don't respect RFC and do it on their own
22 - begin = strchr(socket()->getResponse().ascii(), '=');
23 + begin = const_cast<char*> (strchr(socket()->getResponse().ascii(), '='));
25 if (!begin || (sscanf(begin, "(%d,%d,%d,%d,%d,%d)",&ip[0], &ip[1], &ip[2], &ip[3], &ip[4], &ip[5]) != 6 &&
26 sscanf(begin, "=%d,%d,%d,%d,%d,%d",&ip[0], &ip[1], &ip[2], &ip[3], &ip[4], &ip[5]) != 6)) {