Blog
gethostbyname_r Buglet
Date: 3/12/2004
I've been getting reports for Damn Small Linux users that Scribe can't connect to servers because the call to gethostbyname_r fails.

There is a topic here about the issue on the DSL forums if you want to post suggestions, information, test results, slander or pictures of your pets.

The relevant code in Lgi is in src/common/INet/INet.cpp on line 500 or so:
Host = NEW(HostEnt);
if (Host)
{
	memset(Host, 0, sizeof(*Host));
	
	HostEnt *Result = 0;
	int Err = 0;
	if (gethostbyname_r(HostAddr, Host, Buf, sizeof(Buf), &Result, &Err))
	{
		char *ErrStr = GetErrorName(Err);
		printf("%s:%i - gethostbyname_r('%s') failed (%i - %s)",
			__FILE__, __LINE__,
			HostAddr, Err, ErrStr);
		DeleteObj(Host);
	}
}
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]