summaryrefslogtreecommitdiffstats
path: root/src/network/socket
Commit message (Collapse)AuthorAgeFilesLines
* Fix regression that caused waitForXXX(-1) to fail.Thiago Macieira2012-01-311-1/+1
| | | | | | | | | | | | | Regression was introduced by 8d4cd52b6981a4e6deea7fdb77f56e40c4f3e6ba when it failed to check when msecs == -1. This manifested visibly in KDE failing to connect to any SSL site -- kioslaves are synchronous and use waitForXXX(-1) (in this particular case, waitForEncrypted, which calls waitForReadyRead). Also, take the opportunity to convert these tests in QTcpSocket to use port 80 (a defined service in the test server) instead of port 22. Reviewed-by: Martin Petersson
* Various qt documentation fixes (wk 42)artoka2012-01-311-5/+8
| | | | | | | Fixes for bugs: QTBUG-8673, QTBUG-18101, QTBUG-14194, QTBUG-9109, QTBUG-8331, QTBUG-8329, QTBUG-8786, QTBUG-8787, QTBUG-21295, QTBUG-14554, QTBUG-19367, QTBUG-8323, QTBUG-9466, QTBUG-7924 and QTBUG-20355.
* fix QLocalSocket::isValid() on WindowsJoerg Bornemann2012-01-311-4/+1
| | | | | | | This function always returned false, even if the socket was connected. Task-number: QTBUG-18204 Reviewed-by: Martin Petersson
* QLocalSocket: fix abort on Windows.Martin Petersson2012-01-311-0/+5
| | | | | | | | | The socket will not close as long as there are bytes left to write. So by deleting the pipeWriter bytesToTrite will be 0 and the socket will close directly. Task-number: QTBUG-14939 Reviewed-by: Joerg Bornemann
* QAbstractSocket: Fix waitForReadyRead infinite loop.Martin Petersson2012-01-311-2/+2
| | | | | | | Make sure that waitForReadyRead times out if the read buffer is full. Task-number: QTBUG-16123 Reviewed-by: Peter Hartmann
* sockets: limit buffer size of the internal sockets in proxy enginesShane Kearns2011-05-242-0/+4
| | | | | | | | | | | | | | | | | | | | | The application can normally control the amount of buffering of a socket or QNetworkReply by using the setReadBufferSize API. This allows the application to flow control the TCP connection, and avoids out of memory errors when the data being downloaded is received faster than the application can process it. However when using a proxy, the proxy socket engine has an internal socket which is used to communicate with the proxy server. It is not visible to the user, and does not have awareness of the buffer size of the external socket. To solve this, we limit the internal sockets' buffer size to 64k bytes. Under normal operation, the data is swiftly copied to the external socket where the buffer can grow (or not) based on the application's set value for read buffer size. Task-number: QT-4966 Reviewed-by: Markus Goetz
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-05-1733-561/+561
|\ | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Updating file with CRLF line endings for the updated header Fix a regression in QList::mid() update gitignore remove -fno-stack-protector Fix make confclean Update licenseheader text in source files
| * Update licenseheader text in source filesJyri Tahtela2011-05-1333-561/+561
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Send User-Agent from the network request in http proxy CONNECT commandShane Kearns2011-05-052-1/+11
|/ | | | | | | | | | | | | Some proxies can discriminate based on the User-Agent when sent a CONNECT command for establishing a HTTPS connection. With this change, if the User-Agent header is set in the QNetworkRequest then it will be passed to the http socket engine for use in the connect command sent to the proxy. As before, "Mozilla/5.0" will be used by default when no user agent has been set. Task-number: QTBUG-17223 Reviewed-by: Markus Goetz
* Update copyright year to 2011.Jason McDonald2011-01-1033-33/+33
| | | | Reviewed-by: Trust Me
* Don't need to set FD_CLOEXEC since qt_safe_* will have done that.Thiago Macieira2010-12-151-13/+0
| | | | Reviewed-By: Trust Me
* Merge branch 4.6 into qt-4.7-from-4.6Qt Continuous Integration System2010-11-261-2/+2
|\
| * QLocalSocket/Win: do not emit error() when no error actually occurredJonathan Liu2010-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | This fixes a regression in 4d0c4b9f09b35d707d437611519d0024f6f87a8c. Previously the error string was set if the error is not ERROR_PIPE_NOT_CONNECTED but the commit changed this behaviour to set the error string if it is ERROR_PIPE_NOT_CONNECTED. Task-number: QTBUG-13646 Merge-request: 941 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | Network code: Fix code comment spellchecking errors.Markus Goetz2010-10-282-2/+2
| | | | | | | | | | | | Me no speak americano. Reviewed-by: Peter Hartmann
* | Sockets: Private function for pausing/resuming notifiersMarkus Goetz2010-10-272-0/+37
| | | | | | | | | | | | | | | | | | | | This will be used by QNAM to prevent event loop recursion while emitting signals that often spin an event loop, e.g. authenticationRequired() displaying a dialog for the user. Reviewed-by: Peter Hartmann Reviewed-by: Prasanth Task-Number: QTBUG-13234
* | Keep the scopeid that getaddrinfo(3) returns to us.Thiago Macieira2010-08-242-3/+7
| | | | | | | | | | Task-number: QTBUG-12608, QTBUG-12243 Reviewed-by: Markus Goetz
* | Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938.Jerome Pasion2010-08-093-3/+3
| | | | | | | | | | Reviewer: David Boddie Task number: QTBUG-11938
* | doc: Fixed several qdoc warnings.Martin Smith2010-07-131-1/+1
| |
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6Simon Hausmann2010-06-201-2/+17
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | src/3rdparty/* is left untouched and not merged from 4.6. The corresponding changes in Harfbuzz and WebKit are already in the 4.6 staging areas. Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebKit/qt/ChangeLog src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc tests/auto/qtextlayout/tst_qtextlayout.cpp tests/auto/qwidgetaction/tst_qwidgetaction.cpp
| * QLocalSocket/Win: handle ERROR_MORE_DATA after read operationJoerg Bornemann2010-06-171-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | If we're connected to a name pipe which is in message mode, we have to handle the following case: ReadFile() or GetOverlappedResult() return FALSE and GetLastError() returns ERROR_MORE_DATA. This just means, that the message didn't fit into the pipe's internal buffer. We must not handle this as error. Task-number: QTBUG-11490 Reviewed-by: ossi
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6Simon Hausmann2010-06-151-0/+13
|\ \ | |/
| * QLocalSocket/Win: check for broken pipe in waitForReadyReadJoerg Bornemann2010-06-141-0/+11
| | | | | | | | | | | | | | | | In waitForReadyRead we didn't check for synchronous connection loss. Autotest added: tst_QLocalSocket::syncDisconnectNotify Reviewed-by: ossi
| * QLocalSocket/Win: call close on async connection lossJoerg Bornemann2010-06-141-0/+2
| | | | | | | | | | | | | | | | | | If we notice a broken pipe via _q_notified, we should call close in case the internal read buffer is empty. Auto test added: tst_QLocalSocket::asyncDisconnectNotify Reviewed-by: ossi
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6Simon Hausmann2010-06-134-11/+23
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | src/3rdparty/webkit merged with checkout --ours Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp src/gui/kernel/qt_s60_p.h src/gui/text/qfontdatabase_s60.cpp src/script/api/qscriptengine.cpp
| * QLocalSocket: don't emit readChannelFinished() twice on WindowsJoerg Bornemann2010-06-101-0/+3
| | | | | | | | Reviewed-by: ossi
| * QLocalSocket/Win: QLocalSocketPrivate::bytesAvailable renamedJoerg Bornemann2010-06-102-6/+8
| | | | | | | | | | | | | | QLocalSocketPrivate::bytesAvailable has been renamed to QLocalSocketPrivate::checkPipeState to match the purpose of this method. Reviewed-by: ossi
| * QLocalSocket: fix reading from a socket after broken connectionJoerg Bornemann2010-06-101-4/+6
| | | | | | | | | | | | | | | | | | Reading from a socket with a broken connection didn't work, even if there were still bytes to read in the internal read buffer. Autotest: tst_QLocalSocket::writeToClientAndDisconnect Task-number: QTBUG-10921 Reviewed-by: ossi
| * QLocalServer: make many simultaneous connection attempts work on WindowsJoerg Bornemann2010-06-102-1/+6
| | | | | | | | | | | | | | | | | | Don't call GetOverlappedResult if ConnectNamedPipe connects instantly. Autotest: tst_qlocalsocket::threadedConnection Task-number: QTBUG-8477 Done-with: ossi Reviewed-by: ossi
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-05-251-8/+2
|\ \ | |/ | | | | | | | | | | | | Conflicts: demos/spectrum/app/app.pro src/gui/egl/qegl.cpp tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro tests/auto/qmenu/tst_qmenu.cpp
| * Removed double EINTR loop from nativeWrite and nativeRead.Janne Anttila2010-05-211-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | qt_safe_write and and qt_safe_read already contain EINTR_LOOP. It seems that this loop has been added to code due to merge/clean-up errors in commits: 4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1 f0a8feed9e9b4de10df76faa350201edaef98f1d Reviewed-by: Aleksandar Sasha Babic Reviewed-by: Markus Goetz
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-05-122-1/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (158 commits) qdoc: Yet another revision of the top doc page. Doc: Update on web template Added QDateTime::msecsTo() Doc: Fixed tables and images for the new docs qdoc: Yet another revision of the top doc page. Revert "Improve QUrl handling of local file paths" Revert "[QNAM FTP] Check for the "ftp" scheme case-insensitively" Revert "QUrl::fromLocalFile: fix silly mistake: it's fromNativeSeparators, not to" Revert "Use QUrl::isLocalFile and fix the scheme checking in local URLs." qdoc: Another revision of the top doc page. Doc correction to css Doc: Updates to the html template and javascript tst_SuiteTest: Fix a meaningless switch statement My 4.7.0 changelog entries. qdoc: Fixed annotated list generation to use <td>, not <th>. Doc: Tuning search script qdoc: Reorganized examples panel. Doc: Chages to search feature, css and table order QtDeclarative: avoid waiting for a network load on URIs with empty schemes. QtDeclarative: RFC 3986 requires schemes to be considered case-insensitively ...
| * \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-05-072-1/+18
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (132 commits) Make QCompleter cope with restricted screen real estate (mobile devices) Don't initialize Wintab if QT_NO_TABLETEVENT is defined. QDBusXmlGenerator: get the true name from QMetaType for the return type Add missing newline to static XML snippet Fix compilation in C++0x mode (narrowing of constants) My changelog entries for core and network Doc: updating html and search feature my changelog Doc - mention vcsubdirs as a possible value for TEMPLATE doc: Second attempt to begin reorganizing the top doc page. Fix syntax error in configure script fix qmake project file following msvc2010 addition remove extraneous return statement cosmetics: change enum value isOnActiveSpace is available from 10.6. QTcpServer: Fix documentation for previous commit Keep support for maximum pending connections in derived QTcpServer [QNAM FTP] Check for the "ftp" scheme case-insensitively Use QUrl::isLocalFile and fix the scheme checking in local URLs. Improve QUrl handling of local file paths ...
| | * | QTcpServer: Fix documentation for previous commitMarkus Goetz2010-05-061-1/+2
| | | |
| | * | Keep support for maximum pending connections in derived QTcpServerRobin Helgelin2010-05-062-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By adding a new function to the class QTcpServer it's now possible to extend QTcpserver functionality with for instance SSL capabilities and still keep the support for maximum pending connections. Task-number: QTBUG-1875 Reviewed-by: Peter Hartmann Reviewed-by: Markus Goetz Merge-Request: 568
* | | | Workaround for Symbian Open C bug in socket connect.Janne Anttila2010-05-101-0/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Socket connect in Symbian may return non-standard EPIPE error, after which the connection is terminated. Added Symbian specific workaround to set socket to UnconnectedState if EPIPE errno is received. In addition a bug report for Open C is created: http://developer.symbian.org/bugs/show_bug.cgi?id=2676 Task-number: QT-3362 Reviewed-by: Aleksandar Sasha Babic Reviewed-by: Markus Goetz
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-05-041-1/+1
|\ \ \ | |/ / |/| / | |/ | | Conflicts: translations/translations.pri
| * fix crash in QLocalServer::close on WindowsJoerg Bornemann2010-05-041-1/+1
| | | | | | | | | | | | | | | | | | If _q_onNewConnection failed, then QLocalServer got into a bad state. QLocalServer::isListening() still returned true and QLocalServer::close() crashed. Task-number: QTBUG-10388 Reviewed-by: ossi
| * Ensure we stop the name lookups in QAbstractSocket if we abort().Thiago Macieira2010-04-201-0/+4
| | | | | | | | | | | | | | If we're not even going to connect, there's no point in trying to get the host resolution Reviewed-By: Markus Goetz
* | Ensure we stop the name lookups in QAbstractSocket if we abort().Thiago Macieira2010-04-261-0/+4
| | | | | | | | | | | | | | If we're not even going to connect, there's no point in trying to get the host resolution Reviewed-By: Markus Goetz
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-141-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (55 commits) Revert "Removed double setting of _WIN32_WINNT" Revert "removed a few warnings on wince builds" removed a few warnings on wince builds Removed double setting of _WIN32_WINNT QTreeView: remove dead code. doc: Clarify effect of QFont::NoFontMerging Revert "Implement heightForWidth support for QTabWidget and QStackedLayout." build fix for S60 Improve handling of QAction in soft key manager Remove useless assert qdrawhelper: fix optim in 2245641ba QSlider and StyleSheet: fix one pixel error while drawing the SliderAddPage accelerate QWindowsPipeWriter for bigger chunks of data Fix antialiasing with transformed text in OpenGL2 paint engine Fix flattening of largely scaled, thin, dashed beziers. Increased the precision used to flatten beziers Fix QT_NO_MOVIE Fix compile error with QT_NO_ACTION in QtGui Fix QT_NO_COMPLETER Fix QT_NO_FSCOMPLETER ...
| * | accelerate QWindowsPipeWriter for bigger chunks of dataJoerg Bornemann2010-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | Don't put pipes into message mode. This makes it possible to not split data into 2k chunks. Reviewed-by: ossi
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-135-10/+59
|\ \ \ | |/ / |/| / | |/
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-04-124-9/+50
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixed app freeze if switching to offline in middle of HTTP transaction. Document Symbian platform security requirements on Qt APIs Fixed app freeze if switching to offline in middle of HTTP transaction. Removed QtDeclarative.dll deployment from qt.iby in 4.6 branch. Don't build QtXmlPatterns' command line tools on Symbian.
| | * Document Symbian platform security requirements on Qt APIsFrans Englich2010-04-123-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Work done jointly by Gareth and me. Yields no qdoc errors. Task-number: QTBUG-9342 Task-number: QTBUG-9120 Reviewed-by: Gareth Stockwell Reviewed-by: David Boddie
| | * Fixed app freeze if switching to offline in middle of HTTP transaction.Janne Anttila2010-04-121-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When active socket is disconnected by swithcing to offline mode, native RSocket completes the active socket operations with KErrCancel (-3). Open C maps this error code to POSIX errno EINTR (4). Normally in Posix EINTR is only used to indicate that some operation was interrupted by POSIX signal. Qt has a while loops in network operations to handle operations interrupterd by signals. These while loops will be effectively forever loops in Symbian due to Open C error code mapping. Because Symbian does not have native support for signals, i.e. the network operations can never be really interrupted by POSIX signal, it is ok to remove these while loops completely on Symbian platform. This fix is a workaround to Open C incorrect error mapping, and should be removed once Open C has fixed their error mapping. Task-number: QT-3274 Reviewed-by: Aleksandar Sasha Babic
| * | fix closing state in QLocalSocket on WindowsJoerg Bornemann2010-04-121-1/+9
| |/ | | | | | | | | | | | | | | When closing a QLocalSocket, which has unwritten data, the pipe writer was never deleted. Thus writing after a reconnect didn't work. Task-number: QTBUG-9681 Reviewed-by: ossi
* | Rename QTimestamp to QElapsedTimerThiago Macieira2010-03-175-19/+19
| |
* | Port QtNetwork uses of QTime as a stopwatch to QTimestamp.Thiago Macieira2010-03-175-21/+21
| |
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-061-2/+24
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts
| * Document some stuff in QHostInfo and QAbstractSocketMarkus Goetz2010-03-041-0/+8
| |