Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosnetteam] || [Date Prev] [02-2004 Date Index] [Date Next] || [Thread Prev] [02-2004 Thread Index] [Thread Next]

[openbeosnetteam] Re: Fix for resolving host names

  • From: Scott Mansfield <thephantom@xxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Mon, 2 Feb 2004 09:12:38 -0800

On Feb 2, 2004, at 8:39 AM, Brennan Cleveland wrote:



I'll volunteer to work on libnet.so. I am testing anyway, and finding the bugs involves digging in, as in this host name resolution problem...

I'll work on it too, as I'm also testing the stack.


So, what is the conculsion to the immediate issue of fixing the
segmentation violations?  Do we want to do a quick fix for that
(either mine or Waldemars) or leave it as is until the whole of
libnet.so is cleaned up?  My vote is to put the short term fix in
now, so I and others can test the rest of the stack without having to
type in IP addresses :).

If you're coding up test programs, try calling initialize_before() before working the stack (?)


Thanks,

Brennan
---- Original Message ----
From: Waldemar.Kornewald@xxxxxx
To: openbeosnetteam@xxxxxxxxxxxxx
Subject: RE: [openbeosnetteam] Re: Fix for resolving host names
Date: Mon, 2 Feb 2004 17:21:42 +0100

That sounds like a big mess to me.

The whole stack is one BIG mess, but we do not care anymore. :) It seems that getting a nice stack is the objective for R2. But actually, libnet.so will (or should) be reused, so that one could be cleaned up now. Any volunteers?

1) what is h_errno actually used for?

It is used to report the error status, I think. ;)

:-D


2) if it's used like the POSIX errno variable, why not copy the
exact mechanism?

I will try to find out how it is used exactly (or if it is used at all). Why is there h_errno_tls then? Is our POSIX errno thread-specific or global?

Waldemar's implementation of h_errno is actually correct.


Here's the official definition of h_errno:
  http://www.opengroup.org/onlinepubs/007904975/functions/h_errno.html

What I find interesting in the POSIX definition of h_errno is this sentence: "It is unspecified whether h_errno is a macro or an identifier declared with external linkage. If a macro definition is suppressed in order to access an actual object, or a program defines an identifier with the name h_errno, the behavior is undefined."

Nice.

A cursory look in the OBOS sources reveals that we use h_errno_tls for thread-specific data. I'm wondering if you're seeing a segfault because h_errno_tls hasn't been instantiated yet (via initialize_before() or some other mechanism; this is pure speculation on my part.

BTW: The return from hstrerror() looks really weird and isn't thread-safe.

Cheers,
Scott






[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.