summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llares.cpp11
-rw-r--r--indra/llmessage/llares.h4
2 files changed, 12 insertions, 3 deletions
diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp
index d11f227c21..c4c19b8fbd 100644
--- a/indra/llmessage/llares.cpp
+++ b/indra/llmessage/llares.cpp
@@ -100,9 +100,16 @@ void LLAres::QueryResponder::queryError(int code)
<< LLAres::strerror(code) << llendl;
}
-LLAres::LLAres()
+LLAres::LLAres() :
+chan_(NULL), mInitSuccess(false)
{
- ares_init(&chan_);
+ if (ares_init(&chan_) != ARES_SUCCESS)
+ {
+ llwarns << "Could not succesfully initialize ares!" << llendl;
+ return;
+ }
+
+ mInitSuccess = true;
}
LLAres::~LLAres()
diff --git a/indra/llmessage/llares.h b/indra/llmessage/llares.h
index 4dd65600cc..3e6b0b0e84 100644
--- a/indra/llmessage/llares.h
+++ b/indra/llmessage/llares.h
@@ -437,9 +437,11 @@ public:
*/
static const char *strerror(int code);
+ bool isInitialized(void) { return mInitSuccess; }
+
protected:
ares_channel chan_;
-
+ bool mInitSuccess;
};
/**