Commit Graph

274 Commits

Author SHA1 Message Date
Gustavo André dos Santos Lopes
ff0fe17725 - Replaced calls to getprotobyname by constants to avoid
unnecessarily hitting /etc/protocols on MINIT.
2011-03-17 22:21:59 +00:00
Gustavo André dos Santos Lopes
76dd2d8e2c - Fixed bug #51958: socket_accept() fails on IPv6 sockets.
#On hold for 5.3
2011-03-14 22:59:05 +00:00
Gustavo André dos Santos Lopes
e4298bf0fb - Added multicast support to the sockets extension (bug #40510). 2011-03-14 00:08:29 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Mikko Koppanen
29b7cd5dcf Share the php_sockets.h header
Share php_sockets_le_socket_name
2009-12-27 01:00:50 +00:00
Kalle Sommer Nielsen
1063c8346b MFT: VC10 build support 2009-12-03 11:50:32 +00:00
Pierre Joye
a2cffa2590 - #49464, fix build 2009-09-04 19:53:39 +00:00
Sriram Natarajan
ac2d3990f2 - Fixed bug #49447 (php engine need to correctly check for socket API
return status on windows). (Sriram Natarajan)
2009-09-04 07:59:48 +00:00
Antony Dovgal
fe7e08432e export le_socket from ext/sockets 2009-08-31 08:41:03 +00:00
Andrei Zmievski
1787a2272a MFB 2009-06-04 18:17:43 +00:00
Arnaud Le Blanc
73553e8c77 MFH: Fixed bug #48326 (constant MSG_DONTWAIT not defined) 2009-05-20 09:05:46 +00:00
Felipe Pena
91bdeda644 - MFH: Fixed memory leak (patch by Christian Weiske) 2009-05-10 01:03:45 +00:00
Pierre Joye
ebc2912872 - #47978, typo in ext/sockets/sockets.c 2009-04-16 05:33:13 +00:00
Ilia Alshanetsky
59e6e127d2 MFB: Return empty string when recv() does not fetch any data 2009-02-03 19:22:55 +00:00
Antony Dovgal
8e2c587a51 fix build 2009-01-24 13:08:04 +00:00
Kalle Sommer Nielsen
73b17408fb MFH: Windows support for stream_socket_pair(), by moving the socketpair() implementation from ext/sockets to win32/ 2009-01-23 15:49:49 +00:00
Kalle Sommer Nielsen
2f2d910797 MFH:
[DOC] Renable socket_create_pair() on Windows

# ext/sockets have its own implementation of socketpair(), perhaps we should move it
# to the core. This will make stream_socket_pair() available on Windows aswell
2009-01-01 05:24:29 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Felipe Pena
fc2fb50d09 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-11-17 11:28:01 +00:00
Felipe Pena
7a37fa2d6b - Revert ZEND_BEGIN_ARG_INFO change 2008-11-02 21:19:39 +00:00
Felipe Pena
df10005563 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-10-24 14:35:40 +00:00
Arnaud Le Blanc
15aced54b0 MFH: Fixed bug #46360 (TCP_NODELAY constant for socket_{get,set}_option) 2008-10-22 18:59:33 +00:00
Arnaud Le Blanc
1d5ba8bb21 MFH: initialize optional vars 2008-10-21 23:39:15 +00:00
Pierre Joye
2620304003 - MFH:
- drop bindlib usage on windows
 - inet_pton, inet_ntop and inet_aton are always available (VC9 uses the CRT implementation, VC6 our own)
2008-08-23 19:22:10 +00:00
Jani Taskinen
d91bc9eca2 MFH:- Fixed bug #44127 (UNIX abstract namespace socket connect does not work) 2008-07-16 14:08:38 +00:00
Felipe Pena
026d7fe232 - Added arginfo
- Removed #include "zend_arg_defs.c" (it's unnecessary now)
2008-07-04 14:08:16 +00:00
Felipe Pena
079bfadbe7 MFB: Fixed Bug #44197 (socket array keys lost on socket_select) 2008-02-21 02:56:57 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Dmitry Stogov
6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Antony Dovgal
72fc33ef6a MFH 2007-09-26 10:55:07 +00:00
Jani Taskinen
c96c5ca91f MFH:- Added missing MSG_EOR and MSG_EOF constants 2007-07-24 11:35:08 +00:00
Jani Taskinen
0b40ec1f19 MFH:- Fixed bug #21197 (socket_read() outputs error with PHP_NORMAL_READ) 2007-07-22 23:01:20 +00:00
Jani Taskinen
815d8a9743 MFH: ws fix + sync U stuff for patches to MFB easier 2007-07-22 22:47:18 +00:00
Jani Taskinen
542d413277 MFH: sync 2007-07-22 22:22:09 +00:00
Ilia Alshanetsky
9db4812366 Remove pointless RINIT 2007-05-19 17:58:22 +00:00
Antony Dovgal
b42addcc54 MFH: zerofill socket structs 2007-02-25 22:59:32 +00:00
Hannes Magnusson
4e0f1992ed Add missing ifdefs for shutdown() 2007-01-10 15:25:07 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Antony Dovgal
fdfa403388 MFH 2006-12-28 14:17:38 +00:00
Ilia Alshanetsky
557838efa4 Last set of zend_hash_init() optimizations 2006-10-03 19:51:01 +00:00
Antony Dovgal
75b8cd741b last portion of z/Z fixes 2006-08-31 16:15:24 +00:00
Antony Dovgal
71df07ac9a improve checks and fix #38251 2006-07-30 11:54:17 +00:00
Dmitry Stogov
1dbaae2795 Added automatic module globals management 2006-06-15 18:33:09 +00:00
Pierre Joye
3511649498 - revert last commit, something else went wrong 2006-04-07 14:04:36 +00:00
Pierre Joye
670ed5d93f - fix leak when an error occured in socket_read, free tmpbuf 2006-04-07 13:33:55 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
3e669bc950 MFH: nuke php3 legacy 2005-12-06 02:28:41 +00:00
Ilia Alshanetsky
15afc78f85 Fixed bug #35062 (socket_read() produces warnings on non blocking sockets). 2005-12-04 17:30:43 +00:00
Antony Dovgal
d66e492c3d MFH: yet another compile warning 2005-12-03 23:24:29 +00:00
Antony Dovgal
7a652e397b fix #35490 (socket_sendto() unable to handle IPv6 addresses) 2005-12-01 14:02:54 +00:00
Michael Wallner
17d16cf2af - MFB44: #34851 (SO_RECVTIMEO and SO_SNDTIMEO socket options expect integer
parameter on Windows)
2005-11-03 15:00:51 +00:00
Anantha Kesari H Y
a3a2fe37af NetWare LibC don't have socketpair function. So enabling socket_create_pair functionality only if socketpair is available in the host LibC.
--Kamesh
2005-09-23 09:54:31 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Antony Dovgal
cee979d5a9 fix #33019 (socket errors cause memory leaks in php_strerror())
patch by jwozniak23 at poczta dot onet dot pl
2005-05-12 16:26:26 +00:00
foobar
b6b3659224 - More sock->error resets 2005-02-14 23:44:23 +00:00
foobar
a66b053ac9 - Removed duplicate error + reset error in new sockets 2005-02-14 22:16:06 +00:00
foobar
30deea4d30 Remove unused set_h_errno 2005-02-12 18:14:03 +00:00
Wez Furlong
99e290f882 Fix for Bug #24189: possibly unsafe select(2) usage.
We avoid the problem by using poll(2).

On systems without poll(2) (older bsd-ish systems, and win32), we emulate
poll(2) using select(2) and check for valid descriptors before attempting
to access them via the descriptor sets.

If an out-of-range descriptor is detected, an E_WARNING is raised suggesting
that PHP should be recompiled with a larger FD_SETSIZE (and also with a
suggested value).

Most uses of select(2) in the source are to poll a single descriptor, so
a couple of handy wrapper functions have been added to make this easier.

A configure option --enable-fd-setsize has been added to both the unix and
win32 builds; on unix we default to 16384 and on windows we default to 256.
Windows FD_SETSIZE imposes a limit on the maximum number of descriptors that
can be select()ed at once, whereas the unix FD_SETSIZE limit is based on the
highest numbered descriptor; 256 should be plenty for PHP scripts under windows
(the default OS setting is 64).

The win32 specific parts are untested; will do that now.
2004-09-17 12:44:56 +00:00
Sara Golemon
3838fb99de MFB: Missing length limit parameter. 2004-06-07 05:00:37 +00:00
Derick Rethans
17df3ec21b - Fixed bug #28523 (Typo in ext/sockets/sockets.c) 2004-05-26 06:53:04 +00:00
Edin Kadribasic
3b64493a3d No length parameter -> estrdup() 2004-05-18 10:49:06 +00:00
Ilia Alshanetsky
bb88a86240 Do not allocate error buffer at the start of every request. 2004-05-16 15:34:53 +00:00
Jan Lehnardt
4ed1b9a193 - improve error message 2004-03-14 17:53:28 +00:00
Melvyn Sopacua
21ecfd57fd Fix a typo, dating back from 1.145. 2004-03-14 11:42:17 +00:00
Ilia Alshanetsky
337b23bd93 Fixed bug #21760 (Use of uninitialized pointer inside php_read()).
Fixed 3 possible crashes due to integer overflow or invalid user input
inside the sockets extension.
2004-02-25 22:10:09 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
foobar
f0c110d4bf nuke unused code 2003-12-16 20:39:40 +00:00
Wez Furlong
dbb152b96a Detect and enable IPv6 support under win32.
The ws2tcpip.h header links to IPv6 functions dynamically
and the generated binary will run on win98 and later.
2003-12-06 00:00:31 +00:00
Marcus Boerger
eabcb173b1 Revert accidential commit 2003-10-24 18:44:40 +00:00
Marcus Boerger
071eaf8576 Zend/ZEND_CHANGES 2003-10-24 18:24:28 +00:00
Ilia Alshanetsky
9c82b1fa75 Fixed compiler warnings. 2003-08-31 20:45:51 +00:00
Zeev Suraski
8767205afa Fix Win32 linkage problems 2003-08-31 12:41:53 +00:00
Jason Greene
90289924c0 Remove all vector based functions for the following reasons:
- This solves alot of platform compatibility problems
- The possible security issue of allocating an incredibly large vector
pool is prevented
- They are of little to no benefit in a high level language
- 99% of all things done with these functions can be done using
sendto/recvfrom
2003-08-16 06:34:36 +00:00
Ilia Alshanetsky
93bcd55eaf emalloc -> safe_emalloc 2003-08-12 00:58:52 +00:00
Marcus Boerger
55f947aa13 Fix build 2003-08-03 18:55:51 +00:00
Zeev Suraski
538d58dd5f Use new infrastructure.
There are bound to be some messups, please report build/runtime bugs!
2003-08-03 17:44:39 +00:00
Jason Greene
7eea6525a7 Fix EINVAL errors for OS's (Solaris + BSD) that do not appreciate microseconds >= 1 second
Patch submitted from meebery@php.net
2003-07-22 07:20:55 +00:00
Sara Golemon
6cb8ce2880 gethostbyname2() not thread safe. Use getaddrinfo() or nothing at all. 2003-07-08 05:00:13 +00:00
Sara Golemon
010f5a12c7 Make php_set_inet6_addr happy with any environment. Use getaddrinfo() if available, gethostbyname2() if not, and simply fail if neither is present. 2003-07-08 03:38:00 +00:00
Sara Golemon
acc587fdfa Fix non-GNU build. Use getaddrinfo() rather than gethostbyname2() 2003-07-07 22:27:32 +00:00
Sterling Hughes
3de4afa454 rename SOCKET to PHP_SOCKET to avoid conflicts with Mono 2003-06-17 04:44:30 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Ilia Alshanetsky
4a240c6a50 Fixed compiler warnings. 2003-05-28 01:04:06 +00:00
foobar
93b154fea4 Some AIX version failed to compile if this was redefined. 2003-04-25 08:10:11 +00:00
foobar
1e3e1d5880 CS cleanup + NS protection for some functions (used only in sockets.c btw) 2003-04-17 23:18:58 +00:00
Sara Golemon
d06232a871 Add IPv6 support to ext/sockets 2003-04-17 21:04:47 +00:00
Moriyoshi Koizumi
8e15c4daff compiler warning fix and possible 64bit fix 2003-04-16 19:18:35 +00:00
Moriyoshi Koizumi
ec91e86850 Fixed bug #23080 2003-04-16 17:31:31 +00:00
Moriyoshi Koizumi
da4cf6f9d8 Fixed memleak in socket_select 2003-04-04 14:16:59 +00:00
Moriyoshi Koizumi
b78e3c5155 Added cmsghdr check. Now sockets extension can be built under cygwin. 2003-04-04 13:02:43 +00:00
David Hill
4f8ae7b111 fixing missed int to long with zend_parse_parameters 2003-03-10 15:52:10 +00:00
David Hill
5c90216d2c 64-bit correction to variables passed to zend_parse_parameters
@64-bit correction to variables passed to zend_parse_parameters (Dave)
2003-03-06 23:07:28 +00:00
Ilia Alshanetsky
72b356c1bc Removed pointless memory allocation checks. 2003-01-18 19:28:10 +00:00
Ilia Alshanetsky
6fb507b53e Changed php_error to php_error_docref().
Removed pointless checks around array_init().
2003-01-14 02:39:10 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Sterling Hughes
3cb16973ef silly error, will MFH 2002-12-20 15:44:51 +00:00
Edin Kadribasic
3994fbbc86 MFB: Fix for #20894. 2002-12-09 13:35:57 +00:00
Sterling Hughes
065104b8fe TODO: Cleanup elements that have happened, or most likely won't happen. There
is probably more that should be gone, but its still a move in the right
direction.

Other stuff is ws/formatting changes
2002-12-01 22:15:39 +00:00
Sterling Hughes
62d10bc969 make one-line read work on win32...
# The implementation of this function is brain-dead, but at least
# now its brain-dead on win32 too... ;-)
2002-10-28 03:05:04 +00:00