summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Performance: use select poll for timeout of 0msShane Kearns2011-03-291-30/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A timer of 0ms completes on the next kernel tick (up to 0.999ms) There is a poll GetOpt we can use instead that doesn't require using a timer to cancel the select ioctl. Reviewed-by: Markus Goetz
| | * | | Update DEF filesShane Kearns2011-03-287-15/+178
| | | | |
| | * | | Fix new http multipart test case on symbianShane Kearns2011-03-251-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new test added three reference data files required by the test, but these were not being included in the sis file. Reviewed-by: mread
| | * | | Merge remote branch 'earth/master' into symbian-socket-engineShane Kearns2011-03-251031-14425/+48704
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttpnetworkconnectionchannel.cpp src/network/socket/qlocalsocket.cpp src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtTestu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def
| | * | | | Fix for tst_QEventLoop::processEventsExcludeSocketShane Kearns2011-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the OS scheduling, the TCP data sent and flushed may not have been looped back to trigger the socket's ready to read notification before the test called processEvents. This caused a failure on CI system windows 7. Added a short delay before processEvents to allow the OS to catch up. Reviewed-By: Markus Goetz
| | * | | | QHostInfo: Don't mess with addr family orderingMarkus Goetz2011-03-251-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Aaron Tunney
| | * | | | tst_qnetworkreply: Use proper Content-TypeMarkus Goetz2011-03-231-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Peter Hartmann
| | * | | | Update Symbian .def filesShane Kearns2011-03-238-4/+293
| | | | | |
| | * | | | Fix bugs in tst_qnetworkreplyShane Kearns2011-03-231-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used a unix way to delete local servers. Changed this to the cross platform QLocalServer::removeServer API It reported XPASS on symbian due to SRCDIR being a relative path not absolute. (added a check for this, as SRCDIR could be relative on windows) Also fixed a couple of compiler warnings Reviewed-by: Martin Petersson
| | * | | | use QList instead of RPointerArrayShane Kearns2011-03-232-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For maintainability, it's better to use Qt's container classes Reviewed-by: Markus Goetz
| | * | | | Ensure QSymbianHostResolver::DoCancel does correct thing based on stateShane Kearns2011-03-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a host resolver async call in progress, cancel it. Otherwise don't. Reviewed-by: Markus Goetz
| | * | | | Ensure parameters of async function calls stay in scopeShane Kearns2011-03-232-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling symbian asynchronous functions with parameters on the stack, even "in" parameters is unsafe. If the server is blocked on another operation, then it will not read the parameters until later (at which time the stack is invalid) Reviewed-by: Markus Goetz
| | * | | | Fix event loop hangs caused by async QHostInfoShane Kearns2011-03-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declaring iStatus in a derived class hides the iStatus in CActive. This confuses the active scheduler (which is using CActive::iStatus) and would in a normal symbian application have caused a stray signal panic. However as Qt's event loop integration uses CActiveScheduler::RunIfReady instead of the normal CActiveScheduler::Start the panic does not happen. Instead the thread semaphore gets messed up and causes problems. Reviewed-by: Markus Goetz
| | * | | | Fixes to QSystemErrorShane Kearns2011-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. KErrNotReady message changed to have one file and one network example 2. Format error for the generic error code was generating a QWARN Reviewed-by: Markus Goetz
| | * | | | QHostInfo: Fix compilation with non-symbianMarkus Goetz2011-03-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Shane Kearns
| | * | | | Fix crashing debug messageShane Kearns2011-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing the socks5 socket engine, it closes the socket from within _q_controlSocketError. Frequently a data abort occurs after this when printing the debug message. Moved the debug message before emitting the signal to avoid this. Reviewed-by: Markus Goetz
| | * | | | Report correct error from QSymbianSocketEngine::nativeSelectShane Kearns2011-03-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the error is in the return code from the ioctl, other times it is in the select last error getopt. Treat both error sources the same way and call setError. Return code has higher priority. Reviewed-by: Markus Goetz
| | * | | | Fix a deadlock in symbian QHostInfo when abortingShane Kearns2011-03-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DoCancel was calling lookupFinished, which tries to acquire a mutex again that was already acquired in abortLookup (causing a deadlock). This call is un-necessary, as Cancel was only called from the destructor and from abortLookup - in neither case is this wanted. The run and RunError functions explicitly call lookupFinished. This fixes hang in autotests when attempting to lookup a bad host name. Reviewed-by: Markus Goetz
| | * | | | Fix SetActive being called twiceShane Kearns2011-03-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Markus Goetz
| | * | | | Implement network session support for synchronous QHostInfoShane Kearns2011-03-224-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Private API, QHostInfoPrivate::fromName, which is called from QAbstractSocket when the network session property is set. Reviewed-by: Markus Goetz
| | * | | | Fix bugs where = used instead of ==Shane Kearns2011-03-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Aaron Tunney
| | * | | | Add explicit network session support for async QHostInfoShane Kearns2011-03-183-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the shared network session pointer into the QSymbianHostResolver (which maintains a reference for its lifetime). This is used to open the RHostResolver handle, in order to get a host resolver which is associated with a particular session. The session is obtained from the _q_networksession property of the QAbstractSocket, as in the symbian socket engine Reviewed-by: Markus Goetz
| | * | | | handle errors in QSymbianHostResolver::requestHostLookupShane Kearns2011-03-182-31/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was hanging because although the error flags were set, the callback was not emitted and nothing was done with the return value from the function. Now, it sets the state to error, and self completes - so that the completion through RunL is used as normal. Because the state is error, the processing of name/address is skipped and the error string is not rewritten. Note, error being detected at this point is only common when using an explicit network session (as RHostResolver::Open can fail if the RConnection is in the wrong state) Reviewed-by: Markus Goetz
| | * | | | Fix "wrong lookup id" warning from QAbstractSocketShane Kearns2011-03-182-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Symbian host info implementation was using default constructor for the results, which sets the id to -1, and storing the id seperately. Changed this to use the constructor that specifies the id, and use the id inside the results instead of storing it separately (just a change to the accessor function) Reviewed-by: Markus Goetz
| | * | | | QHostInfo: Compile fix for non-SymbianMarkus Goetz2011-03-171-1/+1
| | | | | |
| | * | | | tst_qudpsocket - fix capabilitiesShane Kearns2011-03-173-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| | * | | | Implement QEventLoop::ExcludeSocketNotifiers for symbian socket engineShane Kearns2011-03-174-47/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the symbian socket engine is driven by an active object in the QtNetwork dll, this needs to hook into the event dispatcher in the QtCore dll. The QActiveObject base class is now a private export from QtCore The method of deferring socket events now works with any kind of QActiveObject, and not only the QSocketActiveObject (which handles "open C" sockets) The base class has a new function, to check if socket events are blocked. If so, it adds the active object to the deferred queue. The derived class should return from it's RunL in this case, which will be called again later. (same usage as the maybeQueueForLater function) reactivateAndComplete function in the event dispatcher is changed to complete the active object again with the same status code as originally. Previously it always used KErrNone, which is not ok for QAsyncSelect as it needs to check the error code from the asynchronous call. Reviewed-by: Markus Goetz Reviewed-by: mread
| | * | | | Make tst_QEventLoop::processEventsExcludeSocket stricterShane Kearns2011-03-172-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was only checking that the socket event is not processed when excluded. I have added an additional test that a further call with socket events included results in the deferred socket event being processed. i.e. makes sure events are deferred to later and not lost. Also fixed capabilities of the autotest, so this test case can run. Reviewed-by: Markus Goetz
| | * | | | Implementation of async DNS lookup.Aaron Tunney2011-03-173-18/+473
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Shane Kearns
| | * | | | Implement IPv6 in symbian QNetworkInterfaceShane Kearns2011-03-161-45/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For IPv6 interfaces, the network mask is reported correctly, so we use that. For IPv4 interfaces, the network mask is reported as 0.0.0.0 so the existing workaround to get the netmask from routes is used. For loopback interfaces, the mask can be statically determined. Skip checking the routes if proper masks were reported for all the interfaces. Added a helper function for converting TInetAddr -> QHostAddress using the constructors that take binary data. (better than conversion to/from strings) Task-number: QTBUG-18137 Reviewed-by: Markus Goetz
| | * | | | Make creating sockets with an explicit network session thread safeShane Kearns2011-03-154-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a mutex to QNetworkSessionPrivate Lock the mutex in the symbian bearer plugin for functions that change the validity of the RConnection. Added factory functions to open an RSocket or RHostResolver, which lock the mutex before the esock function calls. If there is no RConnection, then KErrNotReady is returned (the same as when there is an RConnection but it has not been started). Task-number: QTBUG-18143 Reviewed-by: Markus Goetz
| | * | | | tst_qhostinfo: FixesMarkus Goetz2011-03-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Peter Hartmann
| | * | | | SSL: fix compilation on WindowsMartin Petersson2011-03-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Markus Goetz
| | * | | | 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