Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 62954 invoked from network); 18 Dec 2003 02:42:23 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 18 Dec 2003 02:42:23 -0000 Received: (qmail 47416 invoked by uid 500); 18 Dec 2003 02:42:05 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 47383 invoked by uid 500); 18 Dec 2003 02:42:04 -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 47367 invoked from network); 18 Dec 2003 02:42:04 -0000 Message-ID: <3FE11399.6030707@attglobal.net> Date: Wed, 17 Dec 2003 21:40:25 -0500 From: Jeff Trawick Reply-To: trawick@attglobal.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@apr.apache.org Subject: Re: deprecated apr_sockaddr_ip_set replacement? References: <3FE0B6A3.6030202@stason.org> In-Reply-To: <3FE0B6A3.6030202@stason.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Stas Bekman wrote: > /** > * Set the IP address in an APR socket address. > * @param sockaddr The socket address to use > * @param addr The IP address to attach to the socket. > * Use APR_ANYADDR to use any IP addr on the machine. > * @deprecated @see apr_sockaddr_info_get > */ > APR_DECLARE(apr_status_t) apr_sockaddr_ip_set(apr_sockaddr_t *sockaddr, > const char *addr); > > I can't see how apr_sockaddr_info_get replaces apr_sockaddr_ip_set. > Shouldn't the deprecated notes, say: use direct access to set ip or > what? Or should it just say, don't do that? The only recommended way to get an IP address into a apr_sockaddr_t is to call apr_sockaddr_info_get(), which is not a direct replacement for apr_sockaddr_ip_set(). Maybe the answer is "don't do that," since you can't do exactly what apr_sockaddr_ip_set() did. But apr_sockaddr_info_get() can be used to achieve the same goal.