From dev-return-13438-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Wed Dec 22 19:33:23 2004 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 88840 invoked from network); 22 Dec 2004 19:33:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Dec 2004 19:33:23 -0000 Received: (qmail 50362 invoked by uid 500); 22 Dec 2004 19:33:02 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 50311 invoked by uid 500); 22 Dec 2004 19:33:01 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 50256 invoked by uid 99); 22 Dec 2004 19:33:01 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) X-pair-Authenticated: 164.55.254.103 Message-ID: <41C9CBE6.3080608@electricjellyfish.net> Date: Wed, 22 Dec 2004 14:32:54 -0500 From: Garrett Rooney User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dror Shilo CC: dev@apr.apache.org Subject: Re: find the bind port in apr version 1.0.1 References: <1FB4A6BBAC3AC748AFFA8E9F42A9EFBD544C1B@hunt.ericom.local> In-Reply-To: <1FB4A6BBAC3AC748AFFA8E9F42A9EFBD544C1B@hunt.ericom.local> Content-Type: text/plain; charset=windows-1255; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Dror Shilo wrote: > In apr version 1.0.1 the function > > apr_sockaddr_port_get was removed. > > So if you bind to port 0 , and after the bind you have to find the port > that was peeked . how you can do it ? Well, all apr_sockaddr_port_get did was return the 'port' field in the sockaddr. If all you want is the same behavior apr_sockaddr_port_get used to have you can just grab that value, although honestly I'm not sure that it will have the correct value after a bind to port 0, so what you're asking for may never have worked. -garrett