summaryrefslogtreecommitdiffstats
path: root/src/network/socket
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix silly mistake: 0 is a valid file descriptorThiago Macieira2014-12-241-1/+1
| | | | | | | | | | Change-Id: I60baa01f0ef9419a73535c761c4722c5abd6f26e Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-102-1/+5
|\| | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * WinRT: Only set keepalive socket option in certain socket statesOliver Wolff2014-12-052-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The keepalive socket can only be set if the socket is not connected (see http://msdn.microsoft.com/en-us/library/ie/windows.networking.sockets.streamsocketcontrol.keepalive) Task-number: QTBUG-38623 Change-Id: Ia40dc66f071a8109538e4be7a8f420de81d5be8d Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-037-131/+131
|/ | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* WinRT: Fill data in QUdpSocket::readDatagramOliver Wolff2014-11-162-45/+56
| | | | | | | | | | There was still a TODO left in there and the data was never filled. In addition to filling the data, some pointer checks for addr and port were added. Task-number: QTBUG-42244 Change-Id: I8e358b5544edcdb4077a52f433e4bc17d92014ce Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
* Fix QLocalServer, create a temp path as small as possible.BogDan Vatra2014-10-281-2/+3
| | | | | | | | | If requestedServerName is a full path e.g. "/tmp/some/long/path" the temp path will end up "/tmp/some/long/path.balblabla/tmp/some/long/path" and it might fail because it doesn't fit in addr.sun_path. Change-Id: I6a138fd92be9e0b3b432ab9ac977d04cb330f3fd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove redundant permission set.BogDan Vatra2014-10-281-7/+0
| | | | | | | | The temp socket is in a safe place. There is no need to set any permissions at this point. Change-Id: I18ea4b71b7c20db65dc46c57ddc5d34d8b93f577 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Removed pointless conditional.BogDan Vatra2014-10-281-6/+4
| | | | | | | | | Mode is always != 0 at this point (QLocalServer::WorldAccessOption is a combination of the bits tested later). Change-Id: I5abfb4e49fdc7903e21398525af05989f40d7f94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Fix indentation & coding style.BogDan Vatra2014-10-281-18/+18
| | | | | Change-Id: Id974abca3ee2be9cb70c380a842e76c0ba1520bd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Windows native socket: handle WSAENETRESET the same as WSAECONNRESETShawn Rutledge2014-10-221-1/+1
| | | | | | | | Task-number: QTBUG-41934 Change-Id: Ib92d8a83965e11e2706ef0daba945cb00692d2c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* prevent if_nametoindex being called with empty stringTom Hirst2014-10-121-11/+22
| | | | | | | | | | | Calling if_nametoindex with an empty string will always return 0, but on ARM linux platforms this call seems to be very expensive (~30ms), adding a large overhead to calls such as QUdpSocket::writeDatagram() Task-number: QTBUG-37092 Change-Id: Iad00867585d9534af1ddaee936dd4e4dc5e03611 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removing a few unneeded "? true : false"Alessandro Portale2014-10-091-1/+1
| | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-291-2/+2
|\ | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| * Fix a mishandling of the fd returned by socket(2)Giuseppe D'Angelo2014-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | socket(2) is allowed to return 0, so 0 should not be included when checking for errors. Change-Id: I0454ea60347d90078d3ab3046969add8d5c37935 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update license headers and add new license filesMatti Paaso2014-09-2435-665/+385
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-09-241-4/+6
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-231-4/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| | * Network: Fix NTLM (SSPI) with HTTP and HTTPS proxiesMarkus Goetz2014-08-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit should fix proxy authentication when NTLM is used. NTLM differs from normal HTTP(S) authentication by having 2 roundtrips instead of 1, some parts of our code however were not prepared for that. I've tested this patch with Microsoft Forefront, both with normal NTLM and with NTLM SSPI (in Windows domain). I removed an optimization added in 3c3ea9a8, I could not see that behavior anymore. That commit was the wrong fix in my opinion. [ChangeLog][QtNetwork] Fix NTLM (SSPI) Proxy Authentication (HTTP/HTTPS) Task-number: QTBUG-30829 Task-number: QTBUG-35101 Change-Id: Idcc9c0dbf388b011d49f2806e9a6dd55ebc35cec Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | | Fix QAbstractSocket::readData() behavior on buffered socketAlex Trotsenko2014-09-231-1/+1
|/ / | | | | | | | | | | | | | | | | Remove an useless check which spontaneously allow direct reads from the socket engine. Change-Id: Ia3d2a572d6f1563d613fe2f00d0d6849df259827 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | WinRT: Fixed initialization of udp socketOliver Wolff2014-09-031-1/+1
| | | | | | | | | | | | | | udpSocket() can only be called after the socket descriptor is set. Change-Id: If651ff58507cd66c98de4b699a80149913d9ffcf Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | WinRT: Fixed construction of QNativeSocketEngine without parentOliver Wolff2014-09-031-4/+3
| | | | | | | | | | Change-Id: If55a8049224a7dceca33a3cf3089d541a3a97b8e Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | winrt: Refactor internal socket bufferAndrew Knight2014-08-282-121/+70
| | | | | | | | | | | | | | | | Simplify the temporary buffer usage by using the built-in WinRT Buffer class. This also allows one use of the local event loop to be removed. Change-Id: Ice552910227ffbe31c6e8716ff7896af7c4532ef Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | winrt: Fix socket descriptor storage in native socket engineAndrew Knight2014-08-282-79/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | This stores the socket pointer in the descriptor, rather than an abitrary handle, so that it is easier to access from e.g. SSL socket. To further support SSL sockets, a special case for SSL sockets is made so that the the socket reader installation can be delayed until after the socket is encrypted (as this is the only supported mode of operation with StreamSocket). Change-Id: I693229189722dc43b221b167e8256f5497a50346 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-121-0/+23
|\| | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| * Doc: document that we have unfixed bugs with waitForXxx on WindowsThiago Macieira2014-08-111-0/+23
| | | | | | | | | | | | | | | | | | | | | | We have to document because we don't know how to fix the bug and don't know when they will be fixed. We should also disable the unit tests related to those functions, as they probably cause CI instability. Task-number: QTBUG-24451 Change-Id: I0e60682ec4af7570258b13735339051ba8f4a6e4 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNativeSocketEngine: Add debug in createNewSocket.Robin Burchell2014-08-041-1/+13
| | | | | | | | | | | | | | If this fails, we want to know about it when trying to debug. Change-Id: I33f05186e93fcd9284a7e7c609d00fe7ac87cd4e Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNativeSocketEngine: use stream-style qDebug to fix a warning about FD types.Robin Burchell2014-08-041-2/+2
| | | | | | | | | | | | | | | | FD types differ depending on the platform, so using the stream form is the easiest way to make this work. Change-Id: I00b1a303f3d865fe5e89ba97bd438c51c6cd8f09 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-291-3/+0
|\| | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: Ic62419fa1fee5f4de6c372459d72e6e16f9a810b
| * Fix buffer overrun error with some proxy serversArtem Shevchenko2014-07-281-3/+0
| | | | | | | | | | | | | | | | | | | | | | In some cases, depending on the proxy server response, the current implementation of QHttpSocketEngine may write to memory beyond the allocated buffer size. That will trigger undefined behavior on UNIX systems and a buffer overrun exception if compiled with visual studio. Change-Id: I5769d10c56b6a7483d6d94672aa4321287b82651 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-012-4/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * QProcess: Handle spurious socket notifications for stdout and stderrThiago Macieira2014-06-121-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Unix systems where the GUI event dispatcher uses a notification system for socket notifiers that is out of band compared to select(), it's possible for the QSocketNotifier to activate after the pipe has been read from. When that happened, the ioctl(2) call with FIONREAD might return 0 bytes available, which we interpreted to mean EOF. Instead of doing that, always try to read at least one byte and examine the returned byte count from read(2). If it returns 0, that's a real EOF; if it returns -1 EWOULDBLOCK, we simply ignore the situation. That's the case on OS X: the Cocoa event dispatcher uses CFSocket to get notifications and those use kevent (and, apparently, an auxiliary thread) instead of an in-thread select() or poll(). That means the event loop would activate the QSocketNotifier even though there is nothing to be read. Task-number: QTBUG-39488 Change-Id: I1a58b5b1db7a47034fb36a78a005ebff96290efb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * winrt: set error if tcp socket initialization failsOliver Wolff2014-06-061-1/+4
| | | | | | | | | | Change-Id: I31a2684ffdc864c69fe896829bca860e88c4a6ca Reviewed-by: Andrew Knight <andrew.knight@digia.com>
| * winrt: do not try to close non existent socketsOliver Wolff2014-06-061-2/+2
| | | | | | | | | | Change-Id: I41103db89985f8fbde1faaccaf33c7a76c275f7d Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | winrt: use ComPtr in network classesAndrew Knight2014-06-252-15/+11
| | | | | | | | | | | | | | | | | | | | This removes extra code and potential memory leaks by using smart pointers instead of calling Release() directly. Task-number: QTBUG-38115 Change-Id: If799d6948af8c3df3d0c1617742653b104087e3b Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-053-36/+39
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * remove HSTRING instancesMaurice Kalinowski2014-06-031-28/+28
| | | | | | | | | | | | | | | | | | | | | | HSTRING needs to be released or handles will be leaked. Instead use HString which takes care of resource management on its own. Task-Number: QTBUG-38115 Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * WinRT: Fix compile warningsMaurice Kalinowski2014-05-261-2/+2
| | | | | | | | | | Change-Id: If223dd73b9558a0f5144be38f19a61316f8c807b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * IPv6 scope ID of zero is not validThiago Macieira2014-05-262-6/+9
| | | | | | | | | | | | | | | | IANA reserves scope ID of 0x0 to mean "no scope ID", so make sure that we don't try to set it when reading from the sockaddr_in6 structure. Change-Id: I71b207e6f8262ab2bf9fde993288a71ba63c7572 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-05-131-1/+1
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-1/+1
| |\| | | | | | | | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| | * Fix debug output when enabling QABSTRACTSOCKET_DEBUG.David Faure2014-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some calls pass len=32, so garbage was shown when maxlen (readBytes) is smaller. Change-Id: I97e61dcdf5a0db032317c57afb4bfb406437d8d5 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | | Change debug output to use stream version of debug.Robin Burchell2014-05-101-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | df757e30f816bee8bed5f65ff8e63cec57fe46b1 may have fixed this for one platform, but different platforms appear to have different ideas on what constitutes a FD. Just use the stream operator to avoid having to face this nightmare all the time. Change-Id: I298c5a4b31e8a4af6b613d039cb9aee6e8263b5a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-063-123/+216
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * QAbstractSocket: enable read notification for unbuffered socketsPeter Hartmann2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | This restores behavior for UDP sockets as it was in 5.2.1. Change 13c246ee119fdb10d91f509b968a221d4fc1d8ba introduced a behavioral change / regression in that respect. Task-number: QTBUG-37489 Change-Id: I8f0b26d763dd66ea6edcc343e91ff5c9c7bdc0f2 Reviewed-by: Richard J. Moore <rich@kde.org>
| * WinRT: Fix TCP socket readsAndrew Knight2014-04-222-122/+215
| | | | | | | | | | | | | | | | | | | | | | | | All read calls are now pulled from an intermediate buffer which is populated from the asynchronous callback (this was a TODO previously, and was breaking downloads of large requests). As a side-benefit, the use of only async callbacks ensures fewer first-chance exceptions appear in the debug output. Task-number: QTBUG-30196 Change-Id: I5653742d8d94934a4b4a4227298865d20518bc4c Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-243-13/+59
|\| | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * BlackBerry networking: call special select() methodPeter Hartmann2014-03-201-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... so that the socket notifiers are enabled after selecting and thus emit signals even after selecting (select() is called e.g. by the waitFor* methods). Task-number: QTBUG-36144 Change-Id: I385f288e8c42f92a9c84e53bce843e52f8094ada Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Fanda Vacek <fvacek@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix compilation with QNATIVESOCKETENGINE_DEBUG enabledFrederik Gladhorn2014-03-141-9/+9
| | | | | | | | | | Change-Id: Ie60b70aaa1fe11de613ba99427be00e307b6769d Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * fix namespaced WinRT buildJoerg Bornemann2014-03-141-2/+2
| | | | | | | | | | | | Change-Id: I613a737600f85ef90155e3b8647197b4fd092998 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * fix warningJoerg Bornemann2014-03-141-2/+0
| | | | | | | | | | | | Change-Id: I7afedbf679ae1c8467eea749e79eb10f2516d039 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>