I just commited the proper fix to CVS
Thanks for the report!
-jason
On Fri, 2002-02-15 at 08:14, Richard Samar wrote:
> Hi,
>
> I have a little problem with the behavior of socket_recvfrom().
>
> Here the function entry:
> PHP_FE(socket_recvfrom, second_fifth_and_sixth_args_force_ref)
>
>
> In case you have an AF_INET socket the 6th param should be set.
> Byref (see FE) a port is written into the 6th param:
>
> ZVAL_LONG(arg6, ntohs(sin.sin_port));
>
> before though following is done:
>
> if (arg6 == NULL) {
> WRONG_PARAM_COUNT;
> }
>
>
> So in PHP when I use:
>
> $buffer = socket_recvfrom ($socket, $buffer, 1024, 0, $from_adress,
> $from_port);
>
> It gives me the error of "wrong param count" because $from_port is not
> set yet and surely is NULL.
> I could do:
>
> $from_port = 0;
> $buffer = socket_recvfrom ($socket, $buffer, 1024, 0, $from_adress,
> $from_port);
>
> $from_port is overriden anyways though and I am asking if there is
> a more elegenat way to solve this either in socket.c or in PHP.
>
> best regards
> -moh
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
Jason T. Greene
Internet Software Engineer
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
Use PHP: http://www.php.net
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php