Gustavo André dos Santos Lopes
660aa6701d
- Updating UPGRADING for r309516 and modest merge to 5.3.
2011-03-23 00:51:22 +00:00
Gustavo André dos Santos Lopes
0de2e61cab
- Added socket_import_stream().
...
- Fixed socket_strerror.phpt
- Made php_set_sock_blocking return FAILURE on fcntl error.
- Made socket_set_block()/socket_set_nonblock() emit warning on error.
2011-03-22 00:44:23 +00:00
Gustavo André dos Santos Lopes
95a3bfb1bc
- Fixed SKIPIF section of bug51958.phpt.
2011-03-20 22:12:11 +00:00
Gustavo André dos Santos Lopes
bc13636bfe
- Fixed SKIPIF section of bug51958.phpt.
2011-03-20 22:12:11 +00:00
Gustavo André dos Santos Lopes
2ddfe19120
- Normalized line endings, added native eol-style.
2011-03-20 02:05:41 +00:00
Gustavo André dos Santos Lopes
c9d397d59f
- Adding copyright headers to the new files, gotta do something about the
...
windows line endings too, but I'm separating the commits.
2011-03-20 02:03:29 +00:00
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
be87834321
- Merged fix for bug #51958 socket_accept() fails on IPv6 server sockets.
...
See r309238 for commit in trunk.
2011-03-17 15:36:52 +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
927bf09c29
- Year++
2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Eyal Teutsch
8e47365a97
fixed 6 tests to pass on non-linux os, by removing the generic linux error string from the exp result. on socket_strerror on the other hand, added to the SKIPIF a condition to run on linux only, as the test checks specifically various error strings
2010-12-26 13:10:23 +00:00
Eyal Teutsch
f21100b7f9
fixed 6 tests to pass on non-linux os, by removing the generic linux error string from the exp result. on socket_strerror on the other hand, added to the SKIPIF a condition to run on linux only, as the test checks specifically various error strings
2010-12-26 13:10:23 +00:00
Pierre Joye
aea6771d19
- add phpize support for windows, need a nmake install for now (nmake devel-pkg version is coming), works exactly the same as on unix, or should :)
2010-12-13 18:43:10 +00:00
Pierre Joye
a7ffa09e18
- add PHP_INSTALL_HEADERS to all parts (core&exts) exposing headers, generate the install-headers cmd
2010-12-11 22:18:10 +00:00
Rob Richards
0a34d10783
revert change #298288 : Remove old dsp/dsw/makefile files
2010-04-28 14:41:51 +00:00
Kalle Sommer Nielsen
518a17e7bf
Remove old dsp/dsw/makefile files, these arent used by the build system anymore and are barely updated nor available for all extensions
2010-04-21 23:36:49 +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
Jani Taskinen
70a2b56337
fix test
2009-12-11 15:06:50 +00:00
Kalle Sommer Nielsen
1063c8346b
MFT: VC10 build support
2009-12-03 11:50:32 +00:00
Jani Taskinen
91cc127ce4
- Fix bad section names (extra - in the end..)
2009-11-09 17:08:48 +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
Zoe Slattery
4cc35aeaaf
The last of the 2009 testfest tests
2009-08-30 18:18:50 +00:00
Zoe Slattery
6a22ec3eda
More tests from 2009 testfest
2009-08-30 09:30:13 +00:00
Zoe Slattery
1c98e49afd
Test from 2009 testfest
2009-08-26 17:17:58 +00:00
Rasmus Lerdorf
a2c564b9e6
Make these socket tests less Linux-specific
2009-08-09 14:50:51 +00:00
Antony Dovgal
5725982614
stop polluting my /tmp dir
2009-07-03 14:02:28 +00:00
Andrei Zmievski
1787a2272a
MFB
2009-06-04 18:17:43 +00:00
Arnaud Le Blanc
808acd6b64
MFH: Fix skipif
2009-05-20 09:13:29 +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
47f87a58aa
- New tests (testfest BerlinUG)
2009-05-17 18:08:09 +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
Hannes Magnusson
cbd8949ab5
Fix build
2009-01-24 12:42:19 +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
Pierre Joye
41976c7ab6
- do not enable an ext when a lib/header fails
...
- use MESSAGE in mysql*
- use correct CFLAGS for ext/libxml headers
2008-06-23 18:40:29 +00:00
Felipe Pena
079bfadbe7
MFB: Fixed Bug #44197 (socket array keys lost on socket_select)
2008-02-21 02:56:57 +00:00
Nuno Lopes
61eb7ae554
remove unused PHP_EXTNAME_API macros.
...
#in preparation for the gcc 4 visibility patch
2008-01-03 16:20:33 +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
10da2d994b
MFH: removed useless file
2007-07-24 11:15:59 +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
Jani Taskinen
257405eda6
- Test properly for socketpair inside an extension.
2007-07-22 22:18:41 +00:00
Ilia Alshanetsky
9db4812366
Remove pointless RINIT
2007-05-19 17:58:22 +00:00
Martin Kraemer
9c62ddde34
Typo
2007-03-14 09:58:14 +00:00
Antony Dovgal
b42addcc54
MFH: zerofill socket structs
2007-02-25 22:59:32 +00:00
Antony Dovgal
634615cd42
MFH: fix tests
2007-02-12 14:49:05 +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
28f0397803
Nuke unused code
2005-02-14 08:21:34 +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
Hartmut Holzgraefe
cc0894b788
more visa to sibira ;)
2004-03-24 18:43:23 +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
foobar
f4983c0d3f
- Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5
2004-01-17 13:00:38 +00:00
foobar
ccfc46b0aa
- Happy new year and PHP 5 for rest of the files too..
...
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
2004-01-08 08:18:22 +00:00
Wez Furlong
51c342efae
Make these build with new win32 build system.
2003-12-19 17:00:14 +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
Ilia Alshanetsky
3652ab6032
Fixed bugs in various tests.
2003-08-12 00:44:05 +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
foobar
afdc3e9530
Missing headers
2003-07-20 10:53:22 +00:00
Andrey Hristov
66bcb6529b
Id tags added
2003-07-19 18:32:04 +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
Derick Rethans
05db82333d
- Correct stray commit
2003-06-19 08:41:51 +00:00
Sterling Hughes
651854a6dd
enable sockets by default.
2003-06-19 04:39:42 +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
f2654df92c
Basic IPv4 and IPv6 loopback tests for ext/sockets
2003-04-17 23:09:17 +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
foobar
78365069f0
Better ifdef it out here too
2003-04-05 17:33:55 +00:00
foobar
392f3c2d7c
- Checks specific to some extension belong in the extension's config.m4
2003-04-04 15:42:54 +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
Jason Greene
5e1741fd48
Revert patch that should have been reverted a long time ago.
...
There was a memory leak in the error handling system on win32, that this patch
circumvented (by preventing the errors (EAGAIN mesages) from being generated).
# I must have forgotten to remove this when I fixed the leak
2002-12-02 05:45:13 +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
Jason Greene
5d554c20d2
Sockets is no longer experimental
2002-11-29 23:44:06 +00:00
Sander Roobol
a207b641e5
Fix proto and #20137
2002-10-28 18:00:30 +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
Rasmus Lerdorf
2ca6f26918
Kill warning
2002-10-04 18:01:52 +00:00
Jason Greene
06ad8620db
Fix thread safety issue
2002-09-30 02:09:42 +00:00
Jason Greene
a8ca9932f4
Implement contstants on win32
...
@Implement platform independant socket error constants, which benefits error handling
2002-09-23 03:34:21 +00:00
Jason Greene
565492248a
Fix crash bug and memory leak in vectors
...
#still need to revisit how these are done, i.e. they are not binary safe
2002-09-10 04:12:55 +00:00
foobar
f05db43a68
Fix bug: #19212
2002-09-04 14:30:36 +00:00
Jason Greene
b3a1998386
@socket_recvfrom is now binary safe (Jason)
...
Zero the structure so that when the tcp layer of the OS decides to ignore it,
we do not think we are getting a value
2002-08-28 06:15:13 +00:00
Jason Greene
1ce75e3a63
Implement socket errno values for UNIX based platforms.
...
They are all prefixed with SOCKET_ to preserve name space
Win32 will follow...
2002-08-25 23:28:42 +00:00
Jason Greene
980feb5e98
Nuke warnings on strict compilers
2002-08-16 14:23:27 +00:00
Jason Greene
0cd2d8bd38
Remove sleep workaround, and fix the actual win32 memory leak which
...
was occurring in the error reporting system. The reason why sleepex appeared
to be working was because it suppressed EWOULDBLOCK errors in the example
(which was non-blocking)
@Fix win32 memory leak in /ext/sockets that would occur on any error condition
@Fix host resolution error messages on win32
2002-07-07 07:01:17 +00:00
Markus Fischer
c15d83b9ed
- Fix proto.
2002-06-25 06:24:45 +00:00
Harald Radi
a3c79eca49
workaround for a win32 memleak
...
# this definitely has to be revisited !
# maybe we should use winsock2 and overlapped IO
2002-06-15 16:04:59 +00:00
Harald Radi
f7bdde218e
workaround for a win32 memleak
...
# this definitely has to be revisited !
# maybe we should use winsock2 and overlapped IO
2002-06-15 15:58:16 +00:00
Sascha Schumann
226e1ed246
As far as I can tell, the AC_CHECK_MEMBER could not succeed,
...
because it does not include <sys/socket.h> which is necessary
for the definition of struct msghdr. This include file is not
part of ac_includes_default.
Regardless, AC_CHECK_MEMBER is a autoconf-2.5x macro and thus we
expand it here for 2.13 compatibility.
2002-05-12 17:28:12 +00:00
Jason Greene
969d7e5a82
Fix build on IRIX for both mips and gcc
2002-05-12 07:22:47 +00:00
Jason Greene
cfb285a391
Fix overflow
2002-05-08 15:30:04 +00:00
Jason Greene
d4b11fb33f
Fix 10830, and 17074
...
FreeBSD requires the exact length of the socket type
2002-05-07 18:47:17 +00:00
Jason Greene
89c59569ba
socket_write() should just use the standard socket error macro so that errors will be consistent if the macro ever changes
2002-05-02 16:45:22 +00:00
Markus Fischer
07efbff856
- Update protos for socket_read() and socket_write().
...
- Set last_error in socket_write().
2002-05-01 16:38:22 +00:00
Markus Fischer
ae5bc7c0f6
- Update protos for getpeer/getsock-name.
2002-05-01 16:08:50 +00:00
Jason Greene
38a6325178
Fix BYREF_FORCE that was not being read
...
Fix error message
2002-05-01 15:14:49 +00:00
Markus Fischer
1a5501ddfd
- Rename setopt and getopt to set_option and get_option, provide alias.
2002-05-01 11:08:08 +00:00
Markus Fischer
a2fbdad20e
- Fix couple of problems with socket_create_pair():
...
- Force fourth argument to be passed by reference
- Since the argument is modified there is no need to force it to be an array
since it's destroyed anyway
- Only modify the argument if socketpair() was successfully
- Fix string modified for error message message
- Set global last_error when socketpair() fails
2002-05-01 10:41:10 +00:00
Markus Fischer
7ee9e9d9e5
- Add SOMAXCONN constant.
2002-05-01 09:25:26 +00:00
Markus Fischer
cc4ff9c3ac
- WS fixes
2002-05-01 07:35:01 +00:00
Jason Greene
9a841d116b
Changed socket_select to force reference copy, the older code would modify all references
...
@Fixed a bug in socket_select() that could cause unexpected behavior when using a statement
@ like $w=$e=array($sock);
@This change unfortunately prevents the use of constant values(NULL) for the socket array paramaters.
@Instead use a temporary variable or an expression with the leftmost member being a temporary variable.
@ ex. socket_select($w, $r, $e=NULL, 10);
Also fix small memory leak.
2002-05-01 04:46:59 +00:00
Markus Fischer
a369d06bea
- Forgot to update proto
2002-04-30 22:03:51 +00:00
Markus Fischer
c1c1ee9f6e
- Allow resetting the module global last_error too.
2002-04-30 22:01:06 +00:00
Markus Fischer
8cf30c79ff
- Fix WS and CS a bit
2002-04-29 15:06:48 +00:00
Markus Fischer
c970490d28
- Store last errno in the module global 'last_error' implicitely
...
- Set the global 'last_error' explicitely for functions which can't return an
error withing a single socket context (socket_create and socket_select)
- Modified socket_last_error() to return global modules last
error if no socket resource is given
- Added a couple of more E_WARNING messages in case something
goes foobar so the user isn't left alone in the dark.
2002-04-29 14:52:29 +00:00
Sascha Schumann
5cba3a99c2
extension converted automatically to PHP_NEW_EXTENSION. Manually confirmed
2002-03-12 16:44:00 +00:00
Jason Greene
cd4954b7b5
Fix WS
2002-03-11 01:24:42 +00:00
Jason Greene
494d2d0d5a
Fix build on win32
2002-03-09 06:41:19 +00:00
Jason Greene
3c9c83640f
Fixed bug where NULL specified in sec was not waiting infinately as it should
...
Fixed bug where socket_select was not producing an error message on error
Fixed bug where -1 was getting returned instead of FALSE in socket_recv(),
socket_send(), socket_sendto(), and socket_select()
2002-03-09 04:37:54 +00:00
Jason Greene
165a97c90f
Sockets Rework Patch 3 of 3
...
Nuked all fd code
Rewrote socket_select to use arrays instead of the fd code
(This has the side-effect of fixing quite a few bugs)
2002-03-06 20:19:09 +00:00
Jason Greene
e228b16885
Socket Rework Patch 2
...
Redesigned socket_recv() as outlined on php-dev
Modified socket_last_error() to no longer clear the error
Added socket_clear_error()
Fixed socket_set_nonblock()
Added socket_set_block()
Fixed a proto
Saved 1 byte of RAM : )
2002-03-06 05:21:56 +00:00
Jason Greene
7d7b1ae9b5
Style Improvement
2002-03-05 03:45:23 +00:00
Jason Greene
c6c7380d88
Style mismatch: Jon's catch
2002-03-04 15:02:23 +00:00
Jason Greene
03baef7a3d
Patch 1 of 3 (2 in 3 still in progress) of sockets rework
...
Abstracted string -> ipv4 value conversion which unifies all functions
Standardized Host Lookups
Fixed Broken host error values
Fixed error detection in sendmsg
Added some safety struct zeroing
Modified bind to consitentlyy use sockaddr_storage(not just for AF_UNIX)
#Note this could potentially break the build on other platforms, as I have
#not tested them yet (Will soon though)
2002-03-04 05:27:04 +00:00
Jason Greene
0a2438b057
Fix parse string
...
(Since arg6 is initialized at null this still catches the wrong param condition)
2002-02-15 17:33:08 +00:00
Frank M. Kromann
d036b10062
Fixing release and debug build on Win32
2002-02-13 23:27:45 +00:00
Jon Parise
539114339c
Use socklen_t (instead of int) where appropriate.
2002-01-27 07:06:09 +00:00
Jon Parise
d7523c883b
Because php_network.h includes <sys/socket.h>, it must be included after
...
_XPG4_2 is defined.
This fixes the build under Solaris 8.
2002-01-27 06:55:10 +00:00
Markus Fischer
98220d2a82
- Correct some protos.
2002-01-09 16:51:53 +00:00
Sterling Hughes
4afe145a10
Changed proto via Georg Richter's request.
2002-01-08 06:06:58 +00:00
Stig Venaas
6e1878b0fc
Added some consts for arguments in network.c declarations. Moved
...
php_sockaddr_storage to php_network.h and added check for struct
sockaddr_storage
2002-01-06 11:54:19 +00:00
Jason Greene
2807e1742f
Add myself as a maintainer
2001-12-14 05:58:28 +00:00
Sebastian Bergmann
38933514e1
Update headers.
2001-12-11 15:32:16 +00:00
Hartmut Holzgraefe
7a3c3e85ad
proto fix
2001-12-06 19:18:41 +00:00
Jason Greene
49c3d762ee
Fix broken format string in socket_recv -> zend_parse_parameters
...
Rewrote socket_setopt and socket_getopt to be cleaner
@Added support for SO_RCVTIMEO and SO_SNDTIMEO to ext/sockets (Jason)
2001-12-06 04:44:23 +00:00
foobar
f1397d5339
Unified the configure messages.
2001-11-30 19:00:13 +00:00
Thies C. Arntzen
3ee263e348
i'm sure i had this compile before;-)
2001-11-29 08:18:50 +00:00
Thies C. Arntzen
5a67b295e6
fix a crash in socket_connect (if hostname was not resolvable)
...
initialize max_fd in various fdset function
fix error checking in _read and _write
2001-11-29 08:09:39 +00:00
Markus Fischer
abe67fdb83
Unified error/warning messages.
2001-11-12 01:54:55 +00:00
Markus Fischer
80a58cd23c
WS
2001-11-12 01:07:17 +00:00
Markus Fischer
6cc12e1450
Fix #14020 and some minor leaks.
2001-11-12 00:58:16 +00:00
Jon Parise
f8fb5e5d98
Include <sys/socket.h> for 'struct sockaddr'.
...
# This fixes my FreeBSD build.
2001-11-06 14:35:26 +00:00
Markus Fischer
dceb1e7814
Remove prototype warnings under linux.
2001-11-01 22:40:43 +00:00
Daniel Beulshausen
54ca6f05b1
nuke remaining warnings
2001-11-01 20:10:17 +00:00
Daniel Beulshausen
d0433b6d1c
make this function static
2001-11-01 17:25:56 +00:00
Daniel Beulshausen
2fba036202
- convert to use new zend_parse_parameters API
...
- unify errormessages + add socket_last_error()
- fix linklibrary under windows
- some streamlining
2001-11-01 16:51:59 +00:00
Markus Fischer
963226543b
Fix possible leak.
2001-10-30 06:40:06 +00:00
Stig Bakken
689252082c
* zend_module_entry change: apino, debug and zts are moved first,
...
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Sterling Hughes
1c7e920a9e
make this work under OSX
2001-10-05 07:12:27 +00:00
Sascha Schumann
bfef93878c
Force proper alignment of php_sockaddr_storage. Sparc will throw
...
a SIGBUS, when accessing the family part of a char-aligned structure.
2001-09-26 15:12:20 +00:00
Jeroen van Wolffelaar
6cfba2a3ea
2nd phase in back-substitution those macro's
...
I've got pretty much everything now...
2001-09-25 22:49:04 +00:00
Jeroen van Wolffelaar
c033288573
Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know.
2001-09-25 21:58:48 +00:00
Wez Furlong
ad72c064bc
doh\!
2001-09-19 15:12:30 +00:00
Wez Furlong
c6a957e012
Fix silly bugs
2001-09-19 10:59:12 +00:00
Daniel Beulshausen
75aa3cfc51
fix fcntl
2001-09-17 13:21:10 +00:00
Derick Rethans
78747bd2df
- Don't wrap lines... this is annoying while coding.
2001-09-09 13:29:31 +00:00
Jason Greene
54905782b6
Prevent incorrect warning message from occuring on an EOF of socket_read.
2001-09-05 15:30:34 +00:00
Jason Greene
9fe46a52d4
Much better fix for non forte compilers on Solaris.
...
Removed pragma hack.
Renamed socket struct to bsd_socket.
2001-09-04 22:27:30 +00:00
Sterling Hughes
580d41b3af
Break the entire PHP build
...
# just kidding, noet work :)
2001-08-24 01:21:14 +00:00
Rasmus Lerdorf
4d11d90880
Track down a few more functions that don't check for 0 args and use
...
faster mechanism
2001-08-13 07:55:39 +00:00
Rasmus Lerdorf
8c497f05c4
We don't consistently check for args passed to functions that don't
...
take any args. In some cases we probably want to skip the check for
performance reasons, but in other cases where performance is unlikely
to be a factor, not throwing a warning on the wrong number of args passed
to a function is at best inconsistent, and at worst it could hide a bug.
So, add a few such checks. There are still lots of cases out there.
2001-08-13 06:43:47 +00:00
Zeev Suraski
aa1772ca72
More TSRMLS_FETCH annihilation
2001-07-31 05:44:11 +00:00
Zeev Suraski
c43806f415
Zend compatibility patch
2001-07-30 08:24:42 +00:00
Daniel Beulshausen
69a4760b48
fix recently discovered api flaws
...
- nuke first parameter to socket_select (detemine it ourself)
- swap parameters for socket_fd_set, socket_fd_clear & socket_fd_isset
- allow to pass an array of sockets to socket_fd_set + socket_fd_clear
2001-07-25 22:03:55 +00:00
Rasmus Lerdorf
721c562e2a
Fix a couple of build warnings
2001-07-16 04:31:13 +00:00
foobar
531ec3623f
No need for this constant.
2001-06-26 10:39:15 +00:00
Sterling Hughes
c01ab20f01
Bunch of fixes, tested a bit, folks, please test with your scripts. changes
...
include nuking unnecessary extra copies, fixing handling of optional args,
adding an additional argument.
also, fix socket_read() which used the php_read function by
default (by default, reading 4k would cause 4k calls to the read() function),
now it uses the system's built-in read() function, only uses php_read()
when its explicitly specified.
2001-06-26 04:19:39 +00:00
Sascha Schumann
5f51da8c58
Remove bogus use of volatile and add a note about using inet_ntop
...
instead.
2001-06-24 21:16:21 +00:00
Daniel Beulshausen
0d6661b436
fix build
2001-06-12 21:06:01 +00:00
Daniel Beulshausen
d5e9942bfb
get rid of some getsockname() calls
2001-06-12 16:41:51 +00:00
foobar
9ddd6300de
Fix the compile problem on some systems that do not have hstrerror()
2001-06-12 04:42:01 +00:00
Rasmus Lerdorf
81e2cf03ac
Fix folding and clean up some extensions
2001-06-06 13:06:12 +00:00
Sterling Hughes
d892b34a36
fix this (mea culpa, stray commit)
2001-06-03 21:38:23 +00:00
Sterling Hughes
304ac03be4
ops..
...
#coffee good
2001-06-01 18:54:14 +00:00
Sterling Hughes
c6402b2a2f
# see
...
.
2001-06-01 18:47:03 +00:00
Sterling Hughes
015e1d3d68
# testing changes is a good idea.
...
We were passing the php socket resource identifier to select instead of
the socket fd...
2001-06-01 18:41:06 +00:00
Andi Gutmans
91f4eec7e9
- tmpbuf is emalloc()'ed so this patch would be faster.
2001-05-28 19:38:30 +00:00
Wez Furlong
65b0e70e58
Fix leak
2001-05-28 18:29:07 +00:00
Stig Bakken
1beda9ee1e
* include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build)
2001-05-24 10:07:29 +00:00
Sterling Hughes
d3b4074ed7
Fix compile warning.
2001-05-21 19:36:22 +00:00
Sterling Hughes
fc741eb754
one of these days I'll get this commit correct, just you watch!
...
# must not commit before coffee
# must not commit before coffee
# *ploink*
2001-05-21 18:35:47 +00:00
Sterling Hughes
b376e5b03e
typo
2001-05-21 18:07:17 +00:00
Sterling Hughes
77cf892176
Fix socket_read to work under Linux again.
2001-05-21 17:48:19 +00:00
Sterling Hughes
7d15e8cce3
WS fix (php_read) and correct checking of the return value from inet_aton,
...
which returns *non-zero* on success (fix by Till Gerken).
2001-05-21 17:34:18 +00:00
Sterling Hughes
dc38b40eb8
Fixed bug where socket_connect() return the wrong value (report and fix by
...
Till Gerken)
2001-05-21 16:55:27 +00:00
Daniel Beulshausen
9820c2a5af
update sockets to work with winsock as well
2001-05-17 17:02:37 +00:00
Sterling Hughes
59d4dfc4c6
fix crash bug (unlikely, but this is the only place where the reported bug
...
would make sense, and it can't hurt)...
2001-05-09 04:54:46 +00:00
Jason Greene
86c2eaf741
Fix for PR #9729 , 9664, 9656, 8667.
...
All compilers on Solaris should build this extension correctly now.
It turns out the SUN CC, by default, enables a define that enables the use of
#pragma redefine extname in sun header files. This is why cc would work,
and gcc wouldn't.
-Jason
2001-04-10 03:16:05 +00:00
foobar
679b914dc0
Cleaned up a bit. Removed some checks for header files that are
...
already checked in configure.in
2001-04-04 00:06:49 +00:00
foobar
f6e4cbd434
Fix bugs: #9920 , #9190
2001-03-22 13:16:58 +00:00