Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33236 invoked from network); 12 Sep 2011 09:54:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2011 09:54:28 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:43303] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/80-27053-2D6DD6E4 for ; Mon, 12 Sep 2011 05:54:26 -0400 Received: by gyb11 with SMTP id 11so1866983gyb.29 for ; Mon, 12 Sep 2011 02:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=y2EGavPpKkuvhLEFQhY5yUrfGVd7m6zpFdANuCHGPwk=; b=HUKwkT3mR+JVfPOl5kZ5s3v+l9ozN6/P0oc0xwoeIzGnIAcpXUDA2v2sf9wEmewyRF GXj1vJwRfwegmlntOaKUA+UbJ50Y4uQ8wHJj1BG8ySToND6L8n9Wp8tfXHSYyKLf0wCG TV1hTZxbvhIhkC7Pvmctty8SQahn22/DV9W44= MIME-Version: 1.0 Received: by 10.236.79.197 with SMTP id i45mr24376338yhe.28.1315821262071; Mon, 12 Sep 2011 02:54:22 -0700 (PDT) Received: by 10.147.41.10 with HTTP; Mon, 12 Sep 2011 02:54:22 -0700 (PDT) In-Reply-To: <4E6D5263.60509@elitehosts.com> References: <4E6B9466.6060608@elitehosts.com> <4E6D1340.6010408@elitehosts.com> <4E6D5263.60509@elitehosts.com> Date: Mon, 12 Sep 2011 11:54:22 +0200 Message-ID: To: Avi Brender Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH]#55651 From: pierre.php@gmail.com (Pierre Joye) hi! On Mon, Sep 12, 2011 at 2:29 AM, Avi Brender wrot= e: > Hi, > > Please see if the attached patch better addresses your concerns. > > Regarding the variable name, the PHP_FTP_OPT_USEPASVADDRESS is only inter= nal > and is modeled after the other variables PHP_FTP_TIMEOUT_SEC and > PHP_FTP_OPT_AUTOSEEK. The variable actually passed to the ftp_set_option(= ) > function by users is FTP_USEPASVADDRESS as defined in php_ftp.c which is > inline with the other variables FTP_AUTORESUME, FTP_TIMEOUT_SEC, > FTP_AUTOSEEK etc. + REGISTER_LONG_CONSTANT("FTP_USEPASVADDRESS", PHP_FTP_OPT_USEPASVADDRESS, CONST_PERSISTENT | CONST_CS); It is a userland constant too. Everyone understands FTP_AUTORESUME or FTP_TIMEOUT_SEC, _FTP_OPT_USEPASVADDRESS is cryptic compared to the other :) > In terms of tests, what type of tests were you thinking of? We can't ensu= re > that ftp->pasvaddr is set properly in response to a PASV command unless > there's a way to expose those internal variables to the test - I'm not > familiar enough with the internal PHP code to know if that's possible. If > you're referring to tests that ensure that 1/0 true/false values passed t= o > ftp_set_option() work properly then I've attached a test file for that. > > I don't want to clutter the bugzilla ticket with many attachments =A0so o= nce > the patch is approved I will post the final version in the ticket if that= 's > okay. That's fine too. You can the tests with the patch too, just do svn add ext/ftp/tests/... before you call svn diff. Thanks for your work so far! Cheers, --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org