From owner-freebsd-hackers Fri Dec 6 11:50:57 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A45137B401 for ; Fri, 6 Dec 2002 11:50:56 -0800 (PST) Received: from smtp010.tiscali.dk (smtp010.tiscali.dk [212.54.64.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8432543E9C for ; Fri, 6 Dec 2002 11:50:55 -0800 (PST) (envelope-from dslb@tiscali.dk) Received: from cpmail.dk.tiscali.com ([212.54.64.52]) by smtp010.tiscali.dk (8.12.5/8.12.5) with ESMTP id gB6Joloi000919 for ; Fri, 6 Dec 2002 20:50:47 +0100 (MET) Received: from [213.237.112.252] by cpmail.dk.tiscali.com with HTTP; Fri, 6 Dec 2002 20:50:46 +0100 Date: Fri, 6 Dec 2002 20:50:46 +0100 Message-ID: <3D9FE7F600009214@cpfe5.be.tisc.dk> From: dslb@tiscali.dk Subject: accept() To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all When using accept() with: int sd_client =3D accept(socket_descriptor, (sockaddr *)&client, (socklen_t *) sizeof(client)); Accept return -1 and 14 in errno, but when I use: socklen_t alen; int sd_client =3D accept(socket_descriptor, (sockaddr *)&client, &alen); It works fine. Why can't you use the first method? There must be a way to avoid creating a variable just to hold the address?!?!? br socketd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message