diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-03-28 15:02:10 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-03-29 09:48:25 (GMT) |
commit | aa67255608d7b752fcdd6fcbabf518dbdbf4f98e (patch) | |
tree | ccd6b17c2ebc2634b0bf194ae3cc0a38f369ae52 /tests/auto/networkselftest | |
parent | a970c3334bba3b7e1e27fa8b1b4ad4e4724ce015 (diff) | |
download | Qt-aa67255608d7b752fcdd6fcbabf518dbdbf4f98e.zip Qt-aa67255608d7b752fcdd6fcbabf518dbdbf4f98e.tar.gz Qt-aa67255608d7b752fcdd6fcbabf518dbdbf4f98e.tar.bz2 |
Symbian workaround for networkselftest
The frox ftp proxy closes connections using TCP RST instead of a normal
TCP FIN. On symbian, this causes the received but unacknowledged
preceding packet to be discarded (the "221 Goodbye" ftp response).
As QNAM and QFTP don't care about this, the network self test won't
either. (only for symbian, as windows and unix TCP/IP stacks retain
the unacknowledged packet in the receive queue)
Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/auto/networkselftest')
-rw-r--r-- | tests/auto/networkselftest/tst_networkselftest.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index ed070d7..f40ea3e 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -495,7 +495,8 @@ void tst_NetworkSelfTest::fileLineEndingTest() static QList<Chat> ftpChat(const QByteArray &userSuffix = QByteArray()) { - return QList<Chat>() << Chat::expect("220") + QList<Chat> rv; + rv << Chat::expect("220") << Chat::discardUntil("\r\n") << Chat::send("USER anonymous" + userSuffix + "\r\n") << Chat::expect("331") @@ -530,10 +531,15 @@ static QList<Chat> ftpChat(const QByteArray &userSuffix = QByteArray()) // << Chat::send("SIZE nonASCII/german_\344\366\374\304\326\334\337\r\n") // << Chat::expect("213 40\r\n") - << Chat::send("QUIT\r\n") - << Chat::expect("221") - << Chat::discardUntil("\r\n") - << Chat::RemoteDisconnect; + << Chat::send("QUIT\r\n"); +#ifdef Q_OS_SYMBIAN + if (userSuffix.length() == 0) // received but unacknowledged packets are discarded by TCP RST, so this doesn't work with frox proxy +#endif + rv << Chat::expect("221") + << Chat::discardUntil("\r\n"); + + rv << Chat::RemoteDisconnect; + return rv; } void tst_NetworkSelfTest::ftpServer() |