| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Instead of creating socket notifiers and sending faked events to them,
call the engine's notification functions directly.
Reviewed-by: Markus Goetz
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The proxy socket engines forward the network session to the "real" socket
they use natively.
Reviewed-by: Markus Goetz
|
| | | | |
| | | | |
| | | | |
| | | | | |
Reviewed-by: Markus Goetz
|
| | | | |
| | | | |
| | | | |
| | | | | |
Reviewed-by: Markus Goetz
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
RTimer is only usable in the thread it was created.
Reviewed-by: Markus Goetz
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
scm.dev.troll.no:qt/qt-symbian-network into symbian-socket-engine
Conflicts:
src/network/access/qnetworkaccessmanager.cpp
tests/auto/qsslsocket/tst_qsslsocket.cpp
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Symbian workarounds are better in the symbian socket engine than
generic layer, where this is possible.
Reviewed-by: Markus Goetz
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
qtcpsocket autotest checks for a specific error
Reviewed-by: Markus Goetz
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This ensures the specified QNetworkSession from the QNetworkAccessManager
is used to route the packets, when using a SOCKS proxy.
Reviewed-by: Markus Goetz
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Symbian API RecvOneOrMore only supports stream oriented sockets.
So for UDP we use RecvFrom instead and discard the source address.
Reviewed-by: Markus Goetz
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
| | |\ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The low level socket option returns the size including IP headers, as
there is an option in receive to include headers in the datagram.
This is OK for a "size will not exceed" metric for buffer allocation,
but Qt relies on it being an accurate size.
Open C did this by subtracting 28, but that isn't valid for IPv6
which has a 40 byte header. (we can't tell whether the buffered datagram
was received over IPv4 or IPv6)
To fix this, do a read with the peek option set, and only care about the
size. In future it would be good to not peek, but rather return this buffer
to a following call to readDatagram.
Reviewed-by: Aaron Tunney
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reviewed-by: Aaron Tunney
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
QTcpServer calls accept repeatedly until it fails.
So the KErrWouldBlock is an expected error - ignore this so warnings are
only emitted for unexpected errors.
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Symbian uses KErrBadName to indicate a badly formed socket address.
It also returns this error if the address is invalid for the attempted
operation, for example calling connect() with a broadcast address.
Now handle this error explicitly rather than returning unknown error.
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The active object used for socket notifications (QAsyncSelect) is
thread specific, so it needs to be deleted and recreated in the new thread.
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Symbian treats listening on "0.0.0.0" to mean "accept any IPv4"
and listening on "::" to mean "accept any IPv6".
To accept any connection, you must listen with an unspecified address
As the Qt documentation explicitly says QHostAddress::Any means to
accept any connection, this is converted to an unspecified address
(KAfUnspec) by the symbian socket engine.
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Incorrect usage of KAfInet6 in the symbian socket engine.
KAfInet is used for both IPv4 and IPv6 as a protocol family.
KAfInet6 is used as the address family for IPv6 addresses.
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
QAbstractSocket requires a handle of -1 to be returned when accept fails.
This is a common case, as it calls accept() in a loop to get all incoming
connections. Also the blank socket wasn't being closed properly on failure
so that is also fixed.
Fixed a possible race condition in QSymbianSocketEngine::close - the
socket descriptor is now deregistered before closing the symbian socket
to avoid another thread getting the symbian handle reused in open and
asserting when trying to register it.
This patch also adds debug around socket handle allocation when socket
engine debug is enabled.
Reviewed-by: Markus Goetz
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When the application (in this case, an autotest) ran out of memory by
calling readAll() in a slot, the exception propagated to the symbian
active scheduler where it caused an assertion failure.
Additionally, QAbstractSocket was left in a bad state because its
member variables that guard against re-entrancy were left set.
1. Catch exceptions and convert to leaves in QAsyncSelect
2. Implement RunError function to set the socket engine error state
3. Use QScopedValueRollback in QAbstractSocket to ensure the reentrancy
guards are reverted if an exception is thrown.
Reviewed-by: Markus Goetz
Reviewed-by: mread
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The socket server returns KErrAlreadyExists rather than KErrNone when
connect is called as second time after the select ioctl completes.
Reviewed-by: Markus Goetz
Reviewed-by: Aaron Tunney
|
| | | | | | | |
|
| | |\ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Reviewed-by: Markus Goetz
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
When waitForRead was called, it was selecting for read and write,
because we were checking the pointers instead of the bools.
Reviewed-by: Markus Goetz
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The select ioctl report everything not just the flags we asked for.
So mask off the results to only look at the requested flags.
Reviewed-by: Markus Goetz
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Reviewed-by: Trust Me
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Async select is implemented with an active object rather than using the
event dispatcher.
Sync select is implemented using User::WaitForRequest to block the thread
without requiring an event loop.
In both cases, RSocket's KIoctlSelect is used to query the socket state.
Reviewed-by: Markus Goetz
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
including qnativesocketengine_p.h causes link errors
Reviewed-by: Markus Goetz
|
| | | | | | | | |
|
| | | | | | | | |
|