From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: Bug in Guile's Posix Networking Date: Sun, 13 Feb 2011 08:57:06 -0500 Message-ID: References: <877hdb76cq.fsf@vir.lan> <33545F7E-7D6A-406F-8B15-501B050181E1@raeburn.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1297605439 27824 80.91.229.12 (13 Feb 2011 13:57:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 13 Feb 2011 13:57:19 +0000 (UTC) Cc: guile-devel To: Ken Raeburn Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Feb 13 14:57:14 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PocRt-0005B2-Fh for guile-devel@m.gmane.org; Sun, 13 Feb 2011 14:57:13 +0100 Original-Received: from localhost ([127.0.0.1]:43779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PocRs-0008S6-SZ for guile-devel@m.gmane.org; Sun, 13 Feb 2011 08:57:12 -0500 Original-Received: from [140.186.70.92] (port=42545 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PocRp-0008OL-1K for guile-devel@gnu.org; Sun, 13 Feb 2011 08:57:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PocRo-0003uB-PW for guile-devel@gnu.org; Sun, 13 Feb 2011 08:57:09 -0500 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:50496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PocRo-0003u4-G0 for guile-devel@gnu.org; Sun, 13 Feb 2011 08:57:08 -0500 Original-Received: by yxl31 with SMTP id 31so1916362yxl.0 for ; Sun, 13 Feb 2011 05:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=MS2doSVPgIKao4Los9FJwkBwEMFqM6cHYDANydhtuVA=; b=dK9NZX1kaWQa7YuCb8pIpU8lCBywhKqAZMyl9dVo/ukRhJk2J3BmqormnyzfbyzFqV O3gXvZrSK44QiwsnXTY5T0oNTKYIavnxoA1TjLXcpB0fPbLG/DK5DpEJPSuCsaLdEUkz /Ut5BsYJ1l2nAH8CrN9agZRFaLG7vrwuHBkug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=cYzZrh6jLWRsX15Tg3T1SvJDHM3/Jo8IhH7uktq1wTlwdhmT7TwQaRypHed7Bu/Jkz RYmsS+lHVaJXqwSr52on+kHjn3cW/src+d2U2QgZErnorxXMnthbgw0nVYspg1b5Vvvk Tvp1hJVQ8WTcfgi8Gr2byO9zlJj1JRL3JIDiY= Original-Received: by 10.151.68.12 with SMTP id v12mr3012026ybk.387.1297605426943; Sun, 13 Feb 2011 05:57:06 -0800 (PST) Original-Received: by 10.147.40.5 with HTTP; Sun, 13 Feb 2011 05:57:06 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: K7FKPMMBkQxw2Kuk5Kw_HzXEbtA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11594 Archived-At: >> I suspect you'd do fine if you ditched the test for sockaddr.sin_len and= tested either sockaddr_in.sin_len or sockaddr.sa_len. =A0(And I'd expect a= n OS to be consistent as to whether the _len field exists for each of the v= arious socket address structures.) Oh, and as for why I did this - the current code already contains a test for a sockaddr.sin_len field. I don't know why it's there, but I assumed that it was needed on some platform at some point. I left it there, but added a check for sockaddr_in.sin_len as well. Noah