summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-16135: Cleanup: Code rot left over from OS/2 support (GH-4147)Erik Bray2017-10-271-7/+0
| | | | Remove dangling references to PYCC_VACPP that are not relelvant since removal of OS/2 support.
* Fix _socket module compilation on Cygwin. (#4137)Erik Bray2017-10-271-1/+1
|
* bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in ↵Pablo Galindo2017-10-181-3/+3
| | | | | | | | | more functions (#4026) Fix timeout rounding in time.sleep(), threading.Lock.acquire() and socket.socket.settimeout() to round correctly negative timeouts between -1.0 and 0.0. The functions now block waiting for events as expected. Previously, the call was incorrectly non-blocking.
* Remove a null statement that was necessary for --without-threads (#3478)Zackery Spytz2017-09-111-1/+0
|
* bpo-31393: Fix the use of PyUnicode_READY(). (#3451)Serhiy Storchaka2017-09-081-1/+4
|
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-12/+2
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-27584: New addition of vSockets to the python socket module (#2489)caavery2017-09-061-2/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-27584: New addition of vSockets to the python socket module Support for AF_VSOCK on Linux only * bpo-27584: Fixes for V2 Fixed syntax and naming problems. Fixed #ifdef AF_VSOCK checking Restored original aclocal.m4 * bpo-27584: Fixes for V3 Added checking for fcntl and thread modules. * bpo-27584: Fixes for V4 Fixed white space error * bpo-27584: Fixes for V5 Added back comma in (CID, port). * bpo-27584: Fixes for V6 Added news file. socket.rst now reflects first Linux introduction of AF_VSOCK. Fixed get_cid in test_socket.py. Replaced PyLong_FromLong with PyLong_FromUnsignedLong in socketmodule.c Got rid of extra AF_VSOCK #define. Added sockaddr_vm to sock_addr. * bpo-27584: Fixes for V7 Minor cleanup. * bpo-27584: Fixes for V8 Put back #undef AF_VSOCK as it is necessary when vm_sockets.h is not installed.
* remove IRIX support (closes bpo-31341) (#3310)Benjamin Peterson2017-09-041-4/+2
| | | See PEP 11.
* bpo-30987 - Support for ISO-TP protocol in SocketCAN (#2956)Pier-Yves Lessard2017-08-281-5/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added support for CAN_ISOTP protocol * Added unit tests for CAN ISOTP * Updated documentation for ISO-TP protocol * Removed trailing whitespace in documentation * Added blurb NEWS.d file * updated Misc/ACKS * Fixed broken unit test that was using isotp const outside of skippable section * Removed dependecy over third party project * Added implementation for getsockname + unit tests * Missing newline at end of ACKS file * Accidentally inserted a type in ACKS file * Followed tiran changes review #1 recommendations * Added spaces after comma
* bpo-28261: Fixed err msgs where PyArg_ParseTuple is used to parse normal ↵Oren Milman2017-08-201-2/+4
| | | | tuples. (#3119)
* bpo-30319: socket.close() now ignores ECONNRESET (#2565)Victor Stinner2017-07-041-1/+3
| | | | socket.close() was modified in Python 3.6 to raise OSError on failure: see bpo-26685.
* bpo-23451: Fix socket deprecation warnings in socketmodule.c (#2318)Segev Finer2017-06-281-171/+16
| | | | | | | | | | | | | | | | | | * bpo-23451: Fix WSASocket and WSADuplicateSocket deprecation warnings * bpo-23451: Add backwards compatibility note about socket share/fromshare * bpo-23451: Fixed `WSAAddressToString`/`WSAStringToAddress` deprecation warnings * bpo-23451: Use `inet_pton`/`inet_ntop` instead of `WSAAddressToString`/`WSAStringToAddress` * bpo-23451: Move `HAVE_INET_PTON` from _socket.vcxproj to pyconfig.h * bpo-23451: Add SUPPRESS_DEPRECATED_CALL to socketmodule.c * bpo-23451: Add a NEWS.d entry * bpo-23451: Corrected NEWS.d entry
* bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux (#1370)Antoine Pitrou2017-05-021-3/+3
| | | | | | * bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux * Add NEWS entry
* bpo-29728: Provide socket.TCP_NOTSENT_LOWAT (#477)Nathaniel J. Smith2017-03-231-0/+3
| | | | | * Provide socket.TCP_NOTSENT_LOWAT * New TCP option available on recent MacOS and Linux. * Document addition of TCP_NOTSENT_LOWAT
* Add sockaddr_alg to sock_addr_t (#234)Christian Heimes2017-02-221-30/+0
| | | | | | | | | | sock_addr_t is used to define the minimum size of any socket address on the stack. Let's make sure that an AF_ALG address always fits. Coverity complains because in theory, AF_ALG might be larger than any of the other structs. In practice it already fits. Closes Coverity CID 1398948, 1398949, 1398950 Signed-off-by: Christian Heimes <christian@python.org>
* Remove double definition of IPPROTO_IPV6 (#100)Maximilian Hils2017-02-141-3/+0
| | | IPPROTO_IPV6 is already defined further above in the same way.
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-16/+8
| | | | possible. Patch is writen with Coccinelle.
* Address a minor Coverity warning re: unchecked PyArg_ParseTuple callsGregory P. Smith2017-01-181-5/+7
| | | | | in socket.sendto(). A PyErr_Occurred() check was happening later, but it is better to just use the return value and not call PyErr_Occurred().
* Add TCP_CONGESTION and TCP_USER_TIMEOUTVictor Stinner2016-11-291-0/+6
| | | | | | | Issue #26273: Add new socket.TCP_CONGESTION (Linux 2.6.13) and socket.TCP_USER_TIMEOUT (Linux 2.6.37) constants. Patch written by Omar Sandoval.
* Added the const qualifier to char* variables that refer to readonly internalSerhiy Storchaka2016-11-201-1/+1
| | | | UTF-8 represenatation of Unicode objects.
* Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-1/+1
|\ | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
| * Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-1/+1
| | | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
* | Merge AIX fixes from 3.6Martin Panter2016-11-141-1/+3
|\ \ | |/
| * Merge AIX fixes from 3.5 into 3.6Martin Panter2016-11-141-1/+3
| |\
| | * Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPATMartin Panter2016-11-141-1/+3
| | | | | | | | | | | | Patch by Matthieu S.
* | | Issue #28480: Merge multithreading fixes from 3.6Martin Panter2016-10-201-0/+1
|\ \ \ | |/ /
| * | Issue #28480: Avoid label at end of compound statement --without-threadsMartin Panter2016-10-201-0/+1
| | | | | | | | | | | | Based on patch by Masayuki Yamamoto.
* | | Merge 3.6 (issue #28471)Yury Selivanov2016-10-181-9/+15
|\ \ \ | |/ /
| * | Issue #28471: Fix crash (GIL state related) in socket.setblockingYury Selivanov2016-10-181-9/+15
| | |
* | | Issue #28332: Deprecated silent truncations in socket.htons and socket.ntohs.Serhiy Storchaka2016-10-021-14/+42
|/ / | | | | | | Original patch by Oren Milman.
* | Issue #28139: Merge indentation fixes from 3.5 into 3.6Martin Panter2016-09-171-5/+6
|\ \ | |/
| * Issue #28139: Fix messed up indentationMartin Panter2016-09-171-5/+6
| | | | | | | | | | Also update the classmethod and staticmethod doc strings and comments to match the RST documentation.
| * Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-1/+1
| |
* | Fix NULL check in sock_sendmsg_iovec. CID 1372885Christian Heimes2016-09-131-1/+1
| |
* | socket: Fix memory leak in sendmsg() and sendmsg_afalg()Victor Stinner2016-09-121-5/+12
| | | | | | | | | | | | | | Issue #27744: * Release msg.msg_iov memory block. * Release memory on PyMem_Malloc(controllen) failure
* | Cleanup socketmodule.cVictor Stinner2016-09-121-13/+31
| | | | | | | | | | | | | | | | Issue #27744: * PEP 7: add {...} around if blocks * assign variables and then check their value in if() to make the code easier to read and to debug.
* | Issue 18550: Check return value of ioctl() / fnctl() in internal_setblockingChristian Heimes2016-09-081-20/+41
| | | | | | | | | | | | | | The function internal_setblocking() of the socket module did not check the return values of ioctl() and fnctl(). CID 1294328
* | use the '__linux__' instead 'linux' preprocessor defineBenjamin Peterson2016-09-071-4/+4
| |
* | Issue #27744: correct comment and markupChristian Heimes2016-09-051-1/+1
| |
* | Issue #27744: Add AF_ALG (Linux Kernel crypto) to socket module.Christian Heimes2016-09-051-53/+378
| |
* | Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
| |
* | #26907: add some missing getsockopt constants.R David Murray2016-08-241-0/+12
| | | | | | | | Patch by Christian Heimes, reviewed by Martin Panter.
* | Issue #27702: Only expose SOCK_RAW when definedBerker Peksag2016-08-081-0/+3
| | | | | | | | | | | | | | | | SOCK_RAW is marked as optional in the POSIX specification: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html Patch by Ed Schouten.
* | Merge 3.5 (INVALID_SOCKET)Victor Stinner2016-07-221-6/+6
|\ \ | |/
| * socket: use INVALID_SOCKETVictor Stinner2016-07-221-5/+6
| | | | | | | | | | | | | | | | * Replace "fd = -1" with "fd = INVALID_SOCKET" * Replace "fd < 0" with "fd == INVALID_SOCKET": SOCKET_T is unsigned on Windows Bug found by Pavel Belikov ("Fragment N1"): http://www.viva64.com/en/b/0414/#ID0ECDAE
* | Merge 3.5 (fix internal_select)Victor Stinner2016-07-221-1/+1
|\ \ | |/
| * socket: Fix internal_select()Victor Stinner2016-07-221-1/+1
| | | | | | | | | | Bug found by Pavel Belikov ("Fragment N1"): http://www.viva64.com/en/b/0414/#ID0ECDAE
* | Remove duplicate AF_INET6 additionMartin Panter2016-06-251-3/+0
| |
* | Issue #26536: Use spaces instead of tabsBerker Peksag2016-06-181-4/+4
| |
* | Issue #26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by ↵Steve Dower2016-06-171-3/+23
| | | | | | | | Daniel Stokes.