Commit Graph

434 Commits

Author SHA1 Message Date
Xinchen Hui
3cbdcdc2c8 Fixed several tests failes 2014-05-18 12:02:54 +08:00
Pierre Joye
c0bd24b502 Z_TYPE_PP > Z_TYPE_P 2014-05-17 05:44:26 +02:00
Xinchen Hui
489da59b08 Refactoring socket (only compilable now) 2014-05-17 10:23:46 +08:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Felipe Pena
37897e258d Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  - Fixed bug #66381 (__ss_family was changed on AIX 5.3)
2014-01-01 09:56:49 -02:00
Felipe Pena
5967fb194f - Fixed bug #66381 (__ss_family was changed on AIX 5.3) 2014-01-01 09:55:14 -02:00
Anatol Belski
f0cf312d8c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  added missing prototype
2013-12-11 14:16:07 +01:00
Anatol Belski
edf601a41f added missing prototype 2013-12-11 14:15:40 +01:00
Felipe Pena
a2f478cd94 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  - Fixed bug #65923 (ext/socket assumes AI_V4MAPPED is defined)
2013-11-30 11:40:42 -02:00
Felipe Pena
78f69a2b4f - Fixed bug #65923 (ext/socket assumes AI_V4MAPPED is defined) 2013-11-30 11:39:57 -02:00
Rasmus Lerdorf
259c74654c Merge branch 'PHP-5.5'
* PHP-5.5:
  Trivial Coverity fix
2013-10-19 17:56:21 -07:00
Rasmus Lerdorf
4a205092f7 Trivial Coverity fix 2013-10-19 17:55:34 -07:00
Michael Wallner
bc16dfda1f Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #65808 	the socket_connect() won't work with IPv6 address
  5.4.22-dev now
2013-10-02 15:56:09 +02:00
Michael Wallner
2ba3926815 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #65808 	the socket_connect() won't work with IPv6 address
  5.4.22-dev now

Conflicts:
	configure.in
	ext/sockets/sockets.c
	main/php_version.h
2013-10-02 15:55:38 +02:00
Michael Wallner
9209c19f8f fix bug #65808 the socket_connect() won't work with IPv6 address 2013-10-02 15:19:25 +02:00
Anatol Belski
c6651942ce Merge branch 'PHP-5.5'
* PHP-5.5:
  fix header include
  new NEWS for next release
2013-07-18 15:29:17 +02:00
Anatol Belski
d8dd4d9b02 fix header include
stddef.h is needed to have offsetof macros on windows (at least)
2013-07-18 15:28:20 +02:00
Gustavo Lopes
2443df37fd Merge branch 'PHP-5.5'
* PHP-5.5:
  NEWS for 710150c and e2744f1
  socket: support unix paths in the abstract namespace
  socket: fix bug #65260 (SCM_RIGHTS)
2013-07-16 00:03:00 +02:00
Gustavo Lopes
710150ccb7 socket: support unix paths in the abstract namespace
Those starting with '\0'.
2013-07-15 23:57:51 +02:00
Gustavo Lopes
e2744f1aa3 socket: fix bug #65260 (SCM_RIGHTS)
The data for messages of type SOL_SOCKET/SCM_RIGHTS was not being
passed correctly. There were actually two bugs: (1) the number of file
descriptors being passed was being read incorrectly (the length of the
cmsg array was being read instead of that of its 'data' element), as a
result it was generally being reported as always three elements
('level', 'type' and 'data') and (2) the allocated block for writing
the file descriptors was being acessed incorrectly because a 1-based
counter was being used as if it was 0-based.

Any of these two bugs would probably be enough to cause heap
corruption.
2013-07-15 23:57:49 +02:00
Veres Lajos
b79b13b4ef less serious compatAbility fixes 2013-07-15 00:21:39 -07:00
Veres Lajos
d17e8ac32f less serious compatAbility fixes 2013-07-15 00:19:39 -07:00
Veres Lajos
227556c6a2 less serious compatAbility fixes 2013-07-15 00:17:35 -07:00
Stanislav Malyshev
e02b41d25c Merge branch 'PHP-5.5'
* PHP-5.5:
  Implements feature Bug #63472 ability to set SO_BINDTODEVICE on socket.
2013-06-23 15:26:30 -07:00
Stanislav Malyshev
1beb24bd6f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Implements feature Bug #63472 ability to set SO_BINDTODEVICE on socket.

Conflicts:
	ext/sockets/sockets.c
2013-06-23 15:26:14 -07:00
Damjan Cvetko
a0b4348abc Implements feature Bug #63472 ability to set SO_BINDTODEVICE on socket. 2013-06-23 15:20:54 -07:00
Anatol Belski
bc656cde04 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed error handling for ext/sockets under win
2013-05-16 19:29:42 +02:00
Anatol Belski
d565e8f0eb Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed error handling for ext/sockets under win
2013-05-16 19:29:25 +02:00
Anatol Belski
8dec06ea2a Fixed error handling for ext/sockets under win
WSAGetLastError() must be the very next call after a socket
function had an invalid return. Any function call inbetween
will clear the error information.
2013-05-16 19:23:31 +02:00
Gustavo Lopes
8687332e08 Fix bug #64506: fix build with --disable-ipv6 2013-05-08 19:58:27 +02:00
Gustavo Lopes
ab38bf1931 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix bug #64506: fix build with --disable-ipv6
2013-05-08 19:57:23 +02:00
Gustavo Lopes
6f3c3862ca Fix bug #64506: fix build with --disable-ipv6 2013-05-08 19:56:40 +02:00
Sara Golemon
e836f8e38f Oops 2013-04-30 19:43:52 -07:00
Sara Golemon
e217db8e69 Harden loopback tests
These tests depend on being able to bind port 31337.
Try a range of ports until one binds or we give up trying.
2013-04-30 19:30:55 -07:00
Xinchen Hui
082741814a skip if no IPv6 support 2013-03-05 17:18:13 +08:00
Xinchen Hui
e5d0dc24d2 Fix tests temporary
seems IPV6_PKTINFO are not avaiable in some OS
2013-03-05 16:56:00 +08:00
Xinchen Hui
1978dae309 Skip test on Apple 2013-03-05 14:02:28 +08:00
Xinchen Hui
3f67d5ae43 Revert "Fixed Bug #64340 (sockets tests failed) Patch by Reeze"
build break, will only leave the test script fix first

This reverts commit f2246f352f.
2013-03-05 13:58:20 +08:00
Xinchen Hui
46e612ada4 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-03 11:25:29 +08:00
Xinchen Hui
9bda6a25a5 Fix test (skip on unable to create socket) 2013-03-03 11:24:45 +08:00
Xinchen Hui
f2246f352f Fixed Bug #64340 (sockets tests failed) Patch by Reeze
Add __APPLE_USE_RFC_3542 for OS X 10.7 because IPv6 options are incompatible with RFC 2292.
2013-03-03 10:51:04 +08:00
Gustavo Lopes
59ec22b370 sendrecvmsg_shutdown function moved to mshutdown
The function php_socket_sendrecvmsg_shutdown() should have been called in
MSHUTDOWN, not RSHUTDOWN.

Bug only on TSRM builds.

Should fix bug #64287.
2013-02-24 03:50:38 +01:00
Gustavo Lopes
189fbfd53b Fix ext/sockets build with phpize
Fixes bug #64285
2013-02-24 00:49:25 +01:00
Gustavo Lopes
91538e4e13 Cleanup some multicast code; fix for mac os x?
When I moved some stuff from sockets.c to multicast.c, I did not copy
some conditional defines for systems without the RFC 3678 API.

I moved such defines to multicast.h so both sockets.c and multicast.c
can benefit from them and I prefixed them with PHP_ so that it's less
confusing: now PHP_MCAST_* are defined to either the MCAST_* RFC 3678
APIs or to legacy APIs and MCAST_* always mean the (possibly undefined)
system definitions.
2013-02-17 22:42:58 +01:00
Gustavo Lopes
8771c265a4 Fix test on Windows.
Windows complains of invalid parameters because the socket is not bound.
The test expected the error to be EAGAIN/EWOULDBLOCK. Moved the call down,
after the socket is bound.
2013-02-03 02:03:00 +01:00
Gustavo Lopes
af1b90d62b Fix bug and hopefully build on WinSDK 6.1
There build was failing on rmtools on the sockets extension for two reasons:

  1. IPV6_TCLASS and IPV6_RECVTCLASS not being defined. These are probably
  recent additions to SDK. Windows 7 doesn't event seem to have complete
  support for IPV6_TCLASS, not accepting in WSASendMsg(). The parts that
  needed this constant were not guarded by #ifdefs. They are now.

  2. The constants EWOULDBLOCK and EINPROGRESS not being defined. These
  were only defined in php_network.h, outside of the extension, and not
  all source files included this header. Nevertheless, a macro defined in
  php_sockets.h needed these constants. When this macro was used in files
  that did not include php_network.h, the compilation would fail.
  Surprisingly, the build did not fail when using the 7.1 Windows SDK
  (more likely, the CRT headers used in VC10), as somehow errno.h was
  being included through some other standard header. This would make the
  constant EWOULDBLOCK defined; however, it would be defined to the wrong
  value. In the winsock context, WSAEWOULDBLOCK should be used instead.
  Because we have difficulty using Windows-only constants in the code, we
  (re)define EWOULDBLOCK to WSAEWOULDBLOCK. This has the obvious
  disavantage we may miss problems like this again in the future.
2013-02-03 01:36:14 +01:00
Gustavo Lopes
03b1da5d7a php_strerror in ext/sockets renamed in 5.5 2013-02-02 18:39:47 +01:00
Gustavo Lopes
0110662ae9 Move macro back to .c file
Because it depends on a static function on that .c file.
2013-02-02 18:32:38 +01:00
Gustavo Lopes
b11777ca2a Merge branch 'sendrecvmsg_rebase_55' into PHP-5.5
* sendrecvmsg_rebase_55: (31 commits)
  Fix multicast.c not defining errno on Windows
  Fix non-Windows build
  send/recvmsg() support for Windows
  Remove some pre-vista code
  Revert "Payload of HOPLIMIT/TCLASS are 8-bit"
  Ensure memory is initialized
  Payload of HOPLIMIT/TCLASS are 8-bit
  Fix buf in string -> int conv.
  Build fixes; accept names for if_index
  Refactoring: move stuff to new conversions.c
  Support sticky IPV6_PKTINFO
  Rename some functions for consistency
  Destroy ancillary registry on shutdown
  Move some multicast stuff to multicast.c
  Fix mcast_ipv6_send test
  Check return of fstat()
  Fix build on Mac OS X
  Register extra MSG_* constants
  Add test for CMSG_RIGHTS
  Add test for CMSG_CREDENTIALS message
  ...
2013-02-02 16:50:38 +01:00