many, many changes

This commit is contained in:
Jeff Hill
2000-08-25 01:52:33 +00:00
parent 0bf430d822
commit f830e99e58
58 changed files with 6266 additions and 4410 deletions

View File

@@ -20,10 +20,25 @@ localHostName localHostNameAtLoadTime;
localHostName::localHostName ()
{
int status = gethostname ( this->cache, sizeof ( this->cache ) );
int status = osiSockAttach ();
if ( status ) {
strncpy ( this->cache, "<unknown host>", sizeof ( this->cache ) );
localHostName::cache [ sizeof ( this->cache ) - 1u ] = '\0';
this->attachedToSockLib = true;
int status = gethostname ( this->cache, sizeof ( this->cache ) );
if ( status ) {
strncpy ( this->cache, "<unknown host>", sizeof ( this->cache ) );
localHostName::cache [ sizeof ( this->cache ) - 1u ] = '\0';
}
this->length = strlen ( this->cache );
}
else {
this->attachedToSockLib = false;
strncpy ( this->cache, "<unknown host>", sizeof ( this->cache ) );
}
}
localHostName::~localHostName ()
{
if ( this->attachedToSockLib ) {
osiSockRelease ();
}
this->length = strlen ( this->cache );
}