summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enable IPv6 test in QNetworkInterface autotestShane Kearns2011-03-151-6/+32
| | | | | | | | IPv6 test was skipped for symbian, now enabled it. Also start the default bearer before testing, so there are interfaces other than loopback available to test. Reviewed-by: Markus Goetz
* Fix for server.listen getting IPv6 addressShane Kearns2011-03-151-1/+1
| | | | Reviewed-by: Markus Goetz
* Fix capabilities in qtpcsocket autotestShane Kearns2011-03-153-2/+5
| | | | | | Moved from the subdirs pro file to the executable pro files. Reviewed-by: Markus Goetz
* tst_QNetworkReply::ioGetFromBuiltinHttp issuesShane Kearns2011-03-151-3/+2
| | | | | | | | | The https:limited subtest was too slow and didn't fail in the expected place (it was expected to be too fast) Both limited test cases timed out when debug enabled in the socket engine, so the timeout is increased from 11->30 seconds Reviewed-by: Markus Goetz
* Remove indirection through fake socket notifier in symbian socket engineShane Kearns2011-03-152-171/+58
| | | | | | | Instead of creating socket notifiers and sending faked events to them, call the engine's notification functions directly. Reviewed-by: Markus Goetz
* QSymbianSocketEngine: Compile fixMarkus Goetz2011-03-141-1/+1
|
* QLocalServer: Fix compilationMarkus Goetz2011-03-141-1/+1
|
* QSymbianSocketEngine - return expected error code from bindShane Kearns2011-03-111-1/+9
| | | | | | | | | | | In the unix socket engine, EADDRNOTAVAIL is returned by the native call when attempting to bind to a non existant interface. On symbian, the generic KErrNotFound is returned. Specifically for bind() convert KErrNotFound to the expected error code QAbstractSocket::SocketAddressNotAvailableError which is relied on by autotest (and possibly but unlikely, existing applications) Reviewed-by: Markus Goetz
* Fixes for QTcpServer autotestShane Kearns2011-03-114-10/+34
| | | | | | | | | | Set symbian capabilities in the two sub .pro files Enable IPv6 test on symbian Disable tests that use open C functions on socket descriptors When bearer management is enabled, start the network interface at start of the test. Reviewed-by: Markus Goetz
* Fix network session use with the localhost optimisation in QNABShane Kearns2011-03-101-5/+2
| | | | | | | | | | | | | QNetworkAccessBackend has an optimisation to not start the bearer when the destination is localhost. On symbian, if the bearer is specified but not started, then socket creation will fail. To fix this, delay pushing the network session until start() is called, at which point we know if the localhost optmisation will be applied or not. When using localhost, don't specify any network session - symbian socket engine will create the socket successfully in thie case. Reviewed-by: Markus Goetz
* Bearer support for threaded http backendShane Kearns2011-03-103-0/+18
| | | | Reviewed-by: Markus Goetz
* Fix synchronous http deadlock when aborted by internal timeoutShane Kearns2011-03-101-2/+7
| | | | | | | | | | | | | QHttpThreadDelegate::abortRequest was deleting itself, but not exiting the event loop. For the synchronous usage, both these are incorrect. Without exiting the event loop, the main thread waits forever. If it deletes itself, then the main thread will access the deleted memory on return (the delegate->incomingErrorCode class member) which can crash with frequency depending on heap implementation. With this change, abort acts more like the synchronousFinishedWithErrorSlot. Reviewed-by: Markus Goetz
* Add debug logging to QHttpThreadDelegateShane Kearns2011-03-101-0/+38
| | | | | | Activated by defining QHTTPTHREADDELEGATE_DEBUG Reviewed-by: Markus Goetz
* Network session support for proxy socket enginesShane Kearns2011-03-102-0/+9
| | | | | | | The proxy socket engines forward the network session to the "real" socket they use natively. Reviewed-by: Markus Goetz
* tst_qudpsocket - add a non localhost test caseShane Kearns2011-03-091-0/+52
| | | | | | The echo test case uses the UDP echo service on the qt-test-server Reviewed-by: Markus Goetz
* tst_qtcpsocket - skip proxies for localhost testingShane Kearns2011-03-091-0/+18
| | | | | | | | | There is no point to test the proxy setting for connections to localhost, because the proxy is bypassed anyway. Skipping running the same test case multiple times makes this test complete a bit faster. Reviewed-by: Markus Goetz
* Handle errors returned through select in the waitForXXX socket functionsShane Kearns2011-03-091-0/+13
| | | | Reviewed-by: Markus Goetz
* tst_qtcpsocket stabilisationShane Kearns2011-03-092-3/+7
| | | | | | | | | | | | | Increased heap size to avoid OOM Increased timeouts in the timeoutConnect test, as these randomly fail at least in debug builds with 50ms (symbian threads have a 20ms timeslice for round robin scheduling of equal priority threads, so that could be related) Skip the setSocketDescriptor test on symbian, since native sockets are not ints, open c sockets are not supported, and we decided not to support RSocket adoption unless it's specifically requested. Reviewed-by: Markus Goetz
* Reduce excessive timeout in tst_qtcpsocketShane Kearns2011-03-091-1/+1
| | | | | | | | Timeout of 5000 seconds (which was probably intended to be 5000ms) reduced to a more reasonable 60 seconds, to prevent the test from hanging in case of errors in the proxy server. Reviewed-by: Markus Goetz
* Fix link error in qsocketnotifier testShane Kearns2011-03-091-4/+10
| | | | Reviewed-by: Markus Goetz
* Move some network tests from gui.pro to network.proShane Kearns2011-03-095-5/+8
| | | | | | | | | | | These network tests have no dependency on the QtGui dll, so I have moved them to the network autotest group. In some cases this was not stated in the tests' .pro files. The gui autotest group still has a network test (qtcpsocket), but this has a dependency on QtGui for one test case (which uses QMessageBox) Reviewed-by: Markus Goetz
* Fix crashShane Kearns2011-03-091-4/+4
| | | | Reviewed-by: Markus Goetz
* Thread safety - close RTimer handle when moving threadsShane Kearns2011-03-091-0/+10
| | | | | | RTimer is only usable in the thread it was created. Reviewed-by: Markus Goetz
* QTcpSocket autotest fixesShane Kearns2011-03-081-12/+21
| | | | | | | | | | | | | | | 1. Don't crash if qt-test-server isn't found, fail instead 2. symbian: 200ms is too short for the timeout test when using proxies, extended to 1000ms 3. Don't crash when the disconnectWhileConnectingNoEventLoop fails used a QScopedPointer with custom cleanup to shutdown the thread tidily. 4. Fast fail for downloadBigFile test if the connection is lost before the download is complete. This uses the disconnected signal to exit the event loop early. Previously on this type of failure it took 10 minutes for the event loop to time out. Reviewed-by: Markus Goetz
* Fix http proxy connections hanging on network errorShane Kearns2011-03-081-4/+3
| | | | | | | | | | The http socket engine was hiding errors other than RemoteHostClosedError. This caused problems, because for other errors, the low level socket is still closed in the native socket engine. By not emitting the read notification, the error was never informed to QAbstractSocket and as a result, the application never gets the disconnected signal. Reviewed-by: Martin Petersson
* Fix compile error introduced by mergeShane Kearns2011-03-081-3/+0
| | | | | | | Basically the same as f86e014bb6f2754bfed33106021a809ca8c2ce73. The declarations were appearing twice in the header file after merging Reviewed-by: Trust Me
* Merge branch 'symbian-socket-engine' of ↵Shane Kearns2011-03-0866-1313/+3248
|\ | | | | | | | | | | | | | | scm.dev.troll.no:qt/qt-symbian-network into symbian-socket-engine Conflicts: src/network/access/qnetworkaccessmanager.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
| * Move UDP send length workaround from generic code to symbian engineShane Kearns2011-02-282-11/+8
| | | | | | | | | | | | | | Symbian workarounds are better in the symbian socket engine than generic layer, where this is possible. Reviewed-by: Markus Goetz
| * Do not error socket when writeDatagram would blockShane Kearns2011-02-281-7/+12
| | | | | | | | | | | | | | | | | | | | | | When starting a connection implicitly, datagrams fail with KErrWouldBlock on S60 5.0 and earlier. On symbian 3, they are dropped without error, but the bytes written is set to 0. Due to an apparent bug in symbian, the first packet is failed/dropped on a UDP socket even if the bearer is up due to existing TCP connection. With blocking sockets or explicit RConnection usage, this doesn't happen. Reviewed-by: Markus Goetz
| * Change an error code for behavioural compatibilityShane Kearns2011-02-281-1/+1
| | | | | | | | | | | | qtcpsocket autotest checks for a specific error Reviewed-by: Markus Goetz
| * Make socks5 socket engine push session down to real socketsShane Kearns2011-02-251-0/+3
| | | | | | | | | | | | | | This ensures the specified QNetworkSession from the QNetworkAccessManager is used to route the packets, when using a SOCKS proxy. Reviewed-by: Markus Goetz
| * Fix for read on "connected" UDP socketsShane Kearns2011-02-251-4/+10
| | | | | | | | | | | | | | Symbian API RecvOneOrMore only supports stream oriented sockets. So for UDP we use RecvFrom instead and discard the source address. Reviewed-by: Markus Goetz
| * Fix symbian test failures for qsslsocketShane Kearns2011-02-241-3/+6
| | | | | | | | | | | | | | | | Increased timeout on some unstable test cases. Added a Q_EXPECT_FAIL if we can't connect to a server which is inside firewall. Reviewed-by: Markus Goetz
| * Fix qsslsocket test crashesShane Kearns2011-02-242-4/+4
| | | | | | | | | | | | | | | | Convert assertions to failure, increase heap size to allow creating 10MB buffers without std::bad_alloc exception or memory allocation error from openssl. Reviewed-by: Markus Goetz
| * bugfix: QDir::entryList(Files|Readable) not listing writable filesShane Kearns2011-02-242-2/+6
| | | | | | | | | | | | | | | | | | | | | | Mistake in the qfilesystemiterator_symbian implementation. Readable without Writable was thought to mean show only read-only files, but this isn't the expected behaviour of QDir[Iterator] Added an autotest, as this was only covered by ssl tests in the network layer. Reviewed-by: joao
| * Fix ignored messages in platformsocketengine testShane Kearns2011-02-231-3/+5
| | | | | | | | Reviewed-by: Markus Goetz
| * Fix compile errors in bearer testsShane Kearns2011-02-233-14/+12
| | | | | | | | | | | | Excluded maemo code from symbian builds. Reviewed-by: Markus Goetz
| * tst_qnetworkreply: Fix httpProxyCommands() on Windows.Martin Petersson2011-02-221-1/+4
| | | | | | | | Reviewed-by: Markus Goetz
| * Fix duplicate calls to _q_startOperationShane Kearns2011-02-223-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Because of the shared QNetworkSession, we need to disconnect the signals before detaching from the session. Otherwise we may receive signals from an old session after switching configurations. Also, when a session is connected, we get both the state change (connected) and the opened signals from the session. This needs to be distinguished from the roaming->connected state change to avoid getting the networkSessionConnected signal twice. Reviewed-by: Markus Goetz Task-Number: QTBUG-16901
| * Implement network session for HTTP backendShane Kearns2011-02-214-0/+45
| | | | | | | | Reviewed-by: Markus Goetz
| * Refactor dangerous multiple inheritanceShane Kearns2011-02-212-25/+86
| | | | | | | | | | | | | | | | | | QObject and CBase both expect to be the root class of the object hierarchy so it can cause problems if they are used in multiple inheritance. Refactored the CActive used for starting RConnection into a helper class. Reviewed-by: Markus Goetz
| * Fix RConnection handle leak in symbian bearer pluginShane Kearns2011-02-212-56/+40
| | | | | | | | | | | | | | | | | | | | | | | | The implementation was opening RConnection handles on top of previous instances, and not closing RConnection handles. Both of these cause a resource leak in the socket server which cannot clean up the connection until the Qt process has exited. After a lot of this (which could be triggered by the QNetworkReply auto test), the socket server may run out of memory resulting in all socket operations failing. Reviewed-by: Markus Goetz
| * Remove open C setdefaultif support from symbian QNetworkSessionShane Kearns2011-02-212-68/+3
| | | | | | | | | | | | Qt no longer uses open C sockets Reviewed-by: Markus Goetz
| * Explicit network session for QNetworkAccessManagerShane Kearns2011-02-1713-18/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented a tunnel to get the QNetworkSession from QNetworkAccessManager down to the socket engine. This is currently a private API for QNAM. This patch only implements the FTP backend - the other backends are to follow. On Symbian, the native socket engine will extract the native session (RConnection) from the QNetworkSession implementation, and use that to open sockets using the explicitly specified session. When no session is specified on the socket (default for networking usage outside of QNAM) then the socket is opened with no RConnection specified, which allows the IP stack to find any route via an open interface. The QFtp autotest is enhanced to test QFtp with an explicit session as well as implicit connectivity (where a QNetworkSession is opened by the user, and then QFtp is used without a specified connection). This autotest gives better coverage than the FTP test cases in QNetworkReply. Reviewed-by: Markus Goetz
| * Fix thread starvation when processEvents() is called in a tight loopShane Kearns2011-02-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | One of the qftp test cases calls processEvents() in a tight loop instead of using an event loop. This was causing the application to hang on symbian as it blocked a lower priority system thread and the WLAN connection never completed. Although calling processEvents in a tight loop is bad practice, it works on other OS where thread priorities are dynamic. Reviewed-by: mread
| * Workaround public header depending on private in symbian^3Shane Kearns2011-02-081-1/+6
| | | | | | | | | | | | | | f32file.h (public) depends on e32svr.h (private), and in symbian^3 the private headers have been moved to a different include path. Reviewed-by: axis
| * rebuild configure.exeShane Kearns2011-02-081-0/+0
| |
| * Merge remote branch 'qt/master' into symbian-socket-engineShane Kearns2011-02-0710819-32198/+98614
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkaccessmanager.cpp src/network/bearer/qnetworksession.cpp src/network/kernel/qnetworkproxy_symbian.cpp src/network/socket/qnativesocketengine_unix.cpp tests/auto/platformsocketengine/tst_platformsocketengine.cpp
| * | Fix for linux build errorShane Kearns2011-02-071-1/+1
| | |
| * | Fix GCC compiler warningShane Kearns2011-02-071-1/+1
| | |