Bug #17074 Updated: Cannot bind() a socket to a specific port in FreeBSD
| From: | jason@php.net | Date: | Mon, 01 Jul 2002 20:54:47 +0000 |
| Subject: | Bug #17074 Updated: Cannot bind() a socket to a specific port in FreeBSD | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12716@lists.php.net to get a copy of this message | ||
ID: 17074
Updated by: jason@php.net
Reported By: antonio.bonifati@polimi.it
-Status: Open
+Status: Closed
Bug Type: Sockets related
Operating System: FreeBSD
PHP Version: 4.2.0
New Comment:
Forgot to mark this one closed
Previous Comments:
------------------------------------------------------------------------
[2002-05-07 15:14:48] jason@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/
sizeof(sockaddr_in) is the appropriate fix
------------------------------------------------------------------------
[2002-05-07 12:58:41] jason@php.net
Thanks for the report antonio.
From an initial glance, the fix you suggest looks correct, however, I
still need to run it through a few tests.
Thanks,
-Jason
------------------------------------------------------------------------
[2002-05-07 10:48:23] antonio.bonifati@polimi.it
please see also bug #10830
this bug hasn't been fixed yet in php 4.2.0
could you fix it?
i fixed it for myself changing the line 1001
in ext/sockets/sockets.c:
retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa,
sizeof(sa_storage));
with this one:
retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa,
sizeof(struct sockaddr));
it seems that the last parameter to bind is broken
best regards
Antonio
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17074&edit=1