// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: connect.cc,v 1.3 1999/07/18 23:06:56 jgg Exp $
+// $Id: connect.cc,v 1.5 2000/05/12 05:04:57 jgg Exp $
/* ######################################################################
Connect - Replacement connect call
if ((Res = getaddrinfo(Host.c_str(),S,&Hints,&LastHostAddr)) != 0 ||
LastHostAddr == 0)
{
- if (Res == EAI_SERVICE)
- return _error->Error("Could not resolve service '%s'",S);
-
- if (Res == EAI_NONAME)
+ if (Res == EAI_NONAME || Res == EAI_SERVICE)
{
if (DefPort != 0)
{
_error->Discard();
}
- return false;
+ if (_error->PendingError() == true)
+ return false;
+ return _error->Error("Unable to connect to '%s'",Host.c_str());
}
/*}}}*/