Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13322 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76721 invoked by uid 1010); 13 Oct 2004 14:18:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76568 invoked from network); 13 Oct 2004 14:18:52 -0000 Received: from unknown (HELO hercule.esds.com) (195.68.250.13) by pb1.pair.com with SMTP; 13 Oct 2004 14:18:52 -0000 Received: (qmail 2116 invoked by uid 1005); 13 Oct 2004 14:02:57 -0000 Received: from vnegrier@esds.com by hercule by uid 1002 with qmail-scanner-1.16 (avp: 3.0 build 135.3/3.0. spamassassin: 2.63. Clear:SA:0(-2.1/6.0 tests=AWL autolearn=ham version=2.63):. Processed in 8.485617 secs); 13 Oct 2004 14:02:57 -0000 Received: from barbrady.authority.esds.com (HELO v0mix) (vnegrier@esds.com@[212.94.170.71]) (envelope-sender ) by hercule.esds.com (qmail-ldap-1.03) with SMTP for ; 13 Oct 2004 14:02:48 -0000 Message-ID: <020301c4b12f$8b3fccd0$3702a8c0@stouen.esds.com> To: "Andrey Hristov" Cc: "Wez Furlong" , References: <416C7873.9070602@t0x.net> <20041013014320.47616.qmail@pb1.pair.com> <00b101c4b10a$66cd0cc0$3702a8c0@stouen.esds.com> <019701c4b12c$c356a790$3702a8c0@stouen.esds.com> <416D360D.4050302@hristov.com> Date: Wed, 13 Oct 2004 16:18:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-DCC: : X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hercule.esds.com X-Spam-Level: X-Spam-Status: No, hits=-2.1 required=6.0 tests=AWL autolearn=ham version=2.63 Subject: Re: [PHP-DEV] Re: [PATCH] new function stream_socket_create_pair From: vnegrier@esds.com ("Vincent NEGRIER") I made the changes so that FALSE is returned : http://si.kz/~six/stream_socket_pair.noassume.diff regards, Vincent ----- Original Message ----- From: "Andrey Hristov" Newsgroups: php.internals To: "Vincent NEGRIER" Cc: "Wez Furlong" ; Sent: Wednesday, October 13, 2004 4:05 PM Subject: Re: [PHP-DEV] Re: [PATCH] new function stream_socket_create_pair > Hi, > at least my experience is that when a parameter's value is bad, FALSE > is returned. In this case the code throws E_WARNING but continues exectuion > assuming something. IMO it is better not to assume but to return FALSE. > > Thanks, > Andrey > > Vincent NEGRIER wrote: > > Here is an updated version of the patch : > > http://si.kz/~six/stream_socket_pair.diff > > > > It now registers STREAM_AF_* and STREAM_SOCK_* long constants, checks the > > domain and type against known types and passes the array of created streams > > as return value instead of a byref param... and the diff is against today's > > CVS this time :) > > > > regards, > > Vincent > > > > ----- Original Message ----- > > From: "Vincent Negrier" > > Newsgroups: php.internals > > To: > > Sent: Wednesday, October 13, 2004 11:52 AM > > Subject: Re: [PATCH] new function stream_socket_create_pair > > > > > > > >>>>the patch is here : > >> > >>http://si.kz/~six/stream_socket_create_pair_patch.tgz > >> > >>>To add to Wez's comments, I'd rather see it return an array of socket > >>>streams (or FALSE on failure), rather than return true and tuck the > >> > >>streams > >> > >>>into a by-ref parameter. > >> > >>It would look simpler, but on the other hand it would break consistency > > > > with > > > >>the behavior of socket_create_pair() and the sockpair() syscall ... > >> > >>If the above is not a problem for anyone i can rewrite it to return a > >>streams array (or FALSE), without the byref param. > >> > >>regards, > >>Vincent > > > >