| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
| |
other half of backport of guido's 1.188
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add sendall() method, which loops until all data is written or an
error occurs, and doesn't return a count. (This is my second patch
from SF patch #474307, with small change to the docstring for send().)
the 'partial' is because 1.188 also added a couple of Py_*_ALLOW_THREADS
wrappers around SSL_read and SSL_write, and I want to check those separately.
This is adding a new method to the socket object, which would normally
be a bad thing to do in a bugfix release - however, in this case, it
allows fixes for a nasty problem that would otherwise have a filthy
filthy fix to Get It Right. Still to-do is to patch the std library
modules to use sendall() where appropriate, rather than send().
|
| |
|
|
|
|
| |
Test for __sun instead of __sun__, since SUNWspro only defines the latter;
gcc defines both.
...must get sparc box at home out of cupboard for testing this stuff...
|
| |
|
|
|
| |
PySocketSock_connect_ex(): On Windows, return the correct Windows exit
code. The patch is from Jeremy, and allows test_asynchat to run again.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use PySocket_Err() instead of PyErr_SetFromErrno().
The former does the right thing on Windows, the latter does not.
The 'partial' is because the code's changed quite a lot and it's not clear
that the two that are still there of the form
return PyErr_SetFromErrno(SSLErrorObject);
can be replaced with PySocket_Err() - it looks like they need the new
PySSL_SetError, which is a tad large to be comfortable with just checking
in without reading it further.
|
| |
|
|
|
| |
(Not a merge from the code on the trunk -- the trunk has evolved
perhaps too much.)
|
| |
|
|
|
|
|
|
|
| |
this could cause invalid paths to be returned for AF_UNIX sockets on some
platforms (including FreeBSD 4.2-RELEASE), appearantly because there is
no assurance that the address will be nul-terminated when filled in by the
kernel.
This closes SF bug #416573.
|
| |
|
|
|
|
|
|
|
|
| |
OpenSSL versions beore 0.9.5. This just is too experimental to be
worth it, especially since the user would have to do some severe
hacking of the Modules/Setup file to even enable the EGD code, and
without the EGD code it would always spit out a warning on some
systems -- even when socket.ssl() is not used. Fixing that properly
is not my job; the EGD patch is clearly not so important that it
should hold up the 2.1 release.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
problem reported by Neil Schemenauer on python-dev on 4/12/01, wth
subject "Problem with SSL and socketmodule on Debian Potato?".
It's tentative because Moshe objected, but Martin rebutted, and Moshe
seems unavailable for comments.
(Note that with OpenSSL 0.9.6a, I get a lot of compilation warnings
for socketmodule.c -- I'm assuming I can safely ignore these until 2.1
is released.)
|
| | |
|
| | |
|
| |
|
|
| |
the entire string passed to it
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Adds support for raw packets (AF_PACKET) under Linux. I haven't
tested this code thoroughly; it compiles and the basic calls all work
without crashing. Not sure what to actually do with raw sockets though.
Not sure what other platforms this might be useful for.
|
| |
|
|
|
|
| |
socket -- as suggested by Clarence Gardner.
Fix httplib to comply with the new ssl-socket interface.
|
| | |
|
| | |
|
| |
|
|
| |
#125981: closing sockets was not thread-safe.
|
| |
|
|
| |
getsockaddrarg when the address is not a tuple.
|
| |
|
|
|
|
| |
tcp.h is not available on CygWin, so do not try to include it there.
This closes SourceForge patch #101802.
|
| |
|
|
| |
of the init_socket() function. This module is now *always* _socket.
|
| |
|
|
|
|
| |
This doesn't change the copyright status for these files -- just the
markings! Doing it on the main branch for these three files for which
the HEAD revision was pushed back into 1.6.
|
| | |
|
| |
|
|
| |
marked my*.h as obsolete
|
| |
|
|
| |
Leave the actual #define in for API compatibility.
|
| |
|
|
| |
version of SSLeay (now known as OpenSSL.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
for systems that are missing those declarations from system include files.
Start by moving a pointy-haired ones from their previous locations to the
new section.
(The gethostname() one, for instance, breaks on several systems, because
some define it as (char *, size_t) and some as (char *, int).)
I purposely decided not to include the summary of used #defines like Tim did
in the first section of pyport.h. In my opinion, the number of #defines
likedly to be used by this section would make such an overview unwieldy. I
would suggest documenting the non-obvious ones, though.
|
| |
|
|
| |
[Slight style differences from posted patch]
|
| |
|
|
| |
possible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.
All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:
long
func(a, b)
long a;
long b; /* flagword */
{
and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
|
| |
|
|
| |
Changed parameter in getsockaddrlen from unsigned to socklen_t.
|
| | |
|
| |
|
|
| |
(patch #100770 by Peter Schneider-Kamp)
|
| | |
|
| |
|
|
| |
Patch by T. Wouters.
|
| |
|
|
|
|
|
| |
the bind(), connect(), and connect_ex() methods must be a single
parameter.
Originally part of 1.98, reverted in 1.100.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes possible overflows in the socket module for 64-bit
platforms (mainly Win64). The changes are:
- abstract the socket type to SOCKET_T (this is SOCKET on Windows, int
on Un*x), this is necessary because sizeof(SOCKET) > sizeof(int) on
Win64
- use INVALID_SOCKET on Win32/64 for an error return value for
accept()
- ensure no overflow of the socket variable for: (1) a PyObject return
value (use PyLong_FromLongLong if necessary); and (2) printf
formatting in repr().
Closes SourceForge patch #100516.
|
| |
|
|
| |
BeOS (up to 5.0) lacks <netinet/tcp.h>.
|
| |
|
|
|
|
|
|
|
|
| |
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.
(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
|
| |
|
|
| |
MSG_DONTWAIT. Reported by Fredrik Lundh.
|
| |
|
|
|
| |
1) Adds MSG_DONTWAIT if defined (I needed this)
2) Spells "coreectly" correctly ;-)
|
| |
|
|
|
|
|
|
|
|
| |
socklen_t (unsigned int) for most size parameters. Apparently this is
part of the UNIX 98 standard.
[GvR: the changes to configure.in etc. that I just checked in make
sure that socklen_t is defined everywhere, so I deleted the little
part of Jack's mod to define socklen_t if not in GUSI2. I suppose I
will have to add it to the Windows config.h in a minute.]
|
| |
|
|
|
|
|
|
|
| |
Windows), soclose (on OS2), or to close (everywhere else).
Hopefully this fixes a new compilation error that I suddenly get on
Windows because the macro definition for close -> closesocket
apparently was done before including io.h, which contains a prototype
for close. (No idea why this wasn't an error before.)
|
| | |
|
| | |
|