Date: Wed, 07 Jan 2004 14:02:29 -0800 From: Lev Walkin <vlm@netli.com> To: Christian Klein <chris@schwer.bewaff.net> Cc: freebsd-stable@freebsd.org Subject: Re: getsockname() Message-ID: <3FFC81F5.8090807@netli.com> In-Reply-To: <CBA52DA6-415B-11D8-942B-000393076EEC@schwer.bewaff.net> References: <CBA52DA6-415B-11D8-942B-000393076EEC@schwer.bewaff.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Christian Klein wrote: > > Am Mittwoch, 07.01.04, um 22:40 Uhr (Europe/Berlin) schrieb David Schwartz: > >> >> Fix those two bugs and see if you still have a problem. >> >> DS > > > Ok, here's the diff of the changes: > > $ diff public_html/haunted.c haunted.c > 11c11 > < int sock, len; > --- > > int sock, len=0; > 36,37c36,40 > < getsockname(sock, (struct sockaddr *) &foo, &len); > < fprintf(stderr, "listening on %s:%d\n", inet_ntoa(foo.sin_addr), > ntohs(foo.sin_port)); > --- len = sizeof(*foo); > > if(getsockname(sock, (struct sockaddr *) &foo, &len)<0) > > { > > perror("getsockname"); > > } else > > fprintf(stderr, "listening on %s:%d\n", > inet_ntoa(foo.sin_addr), ntohs(foo.sin_port)); > > But still the same :-( > > (BTW, the problem does not occur on my FreeBSD-current machine) > > Chris > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" -- Lev Walkin vlm@netli.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FFC81F5.8090807>