PDA

View Full Version : QFTP - No finished or done events after close



doggrant
21st January 2010, 11:52
Hi,

In my application I test an FTP connection to see if i am able to connect to a server. I do this by doing :-

ftp->connectToHost("<any ftp site");
ftp->login();
ftp->close();

The login is fine, but with close I get the following events

close = 4
Started 4 command=5
STATE CHANGED - QFtp::Closing, id = 4
STATE CHANGED - QFtp::Unconnected, id = 4

I get no finished or done event being signalled. Has anyone any idea why this might be?

David

doggrant
28th January 2010, 10:23
I was just wondering whether anyone had any thoughts on this one.

After I login to my FTP server using the QFTP class, I get the finished and done signals, but when I then call close(), the state changes as follows :-

QFTP::LoggedIn
QFTP::Closing
QFTP::Unconnected

but I do not get any finished or done signals emitted. Therefore my app does not know everything is now done, and I can destroy that QFTP object. Does anyone see a similar behaviour, or know how to get around this problem?

This is on both QT 4.5.2 and the latest 4.6.1. This is on Windows XP

regards,

David

doggrant
28th January 2010, 17:07
this seems to be a windows only issue. because i do not get the same errors on linux.

I am going to test on other flavours of windows - other than xp, and see what occurs.

doggrant
29th January 2010, 13:56
This problems is caused by something on _my_ windows XP box. I'm not sure what thought.

I've tested the same code on linux, other flavors of windows, and someone elses XP box, and they all work as exoected. ie, not with the strange behaviour i have reported above. I think i'm going to have to reinstall my own xp box.

cerf
9th September 2013, 17:01
Hi doggrant,

Apparently I come to the same issue.
The version of Qt is Qt 4.8.4 on Windows XP with SP3.

For some reason, signal commandFinished() is not emitted after QFtp::close(). Actually sometimes the signal is correctly sent, but most of the time this is not the case.

Have you any clues about this problem ?

cerf
12th September 2013, 15:32
After deeper investigations it appears WinXP's firewall was causing hard to debug problems with FTP server responses.
Switch off the firewall and try again, it might help ...