getsockname()
Lev Walkin
vlm at netli.com
Wed Jan 7 14:01:55 PST 2004
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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
--
Lev Walkin
vlm at netli.com
More information about the freebsd-stable
mailing list