summaryrefslogtreecommitdiff
path: root/indra/llmessage/llares.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-07-18 18:43:58 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-07-18 18:43:58 -0400
commit38b3da4a20a0a06396d240a5e8fdc4fa11866937 (patch)
tree90613c999899253eb28caf04641b5ee41d827958 /indra/llmessage/llares.cpp
parentd027db3cfc7c757cc8846e1a5187d1a816f63d9a (diff)
parent6060e5e46acbeb20a301070a0fd0efea029d33d0 (diff)
Merge. Refresh from viewer-release.
Diffstat (limited to 'indra/llmessage/llares.cpp')
-rwxr-xr-xindra/llmessage/llares.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp
index 5a67035ed1..7f74247a13 100755
--- a/indra/llmessage/llares.cpp
+++ b/indra/llmessage/llares.cpp
@@ -99,8 +99,7 @@ void LLAres::QueryResponder::queryError(int code)
LLAres::LLAres() :
chan_(NULL),
- mInitSuccess(false),
- mListener(new LLAresListener(this))
+ mInitSuccess(false)
{
if (ares_library_init( ARES_LIB_INIT_ALL ) != ARES_SUCCESS ||
ares_init(&chan_) != ARES_SUCCESS)
@@ -109,6 +108,8 @@ LLAres::LLAres() :
return;
}
+ mListener = boost::shared_ptr< LLAresListener >(new LLAresListener(this));
+
mInitSuccess = true;
}
@@ -161,12 +162,26 @@ void LLAres::getSrvRecords(const std::string &name, SrvResponder *resp)
}
void LLAres::rewriteURI(const std::string &uri, UriRewriteResponder *resp)
-{
- llinfos << "Rewriting " << uri << llendl;
+{
+ if (resp && uri.size())
+ {
+ LLURI* pURI = new LLURI(uri);
+
+ resp->mUri = *pURI;
+
+ delete pURI;
+
+ if (!resp->mUri.scheme().size() || !resp->mUri.hostName().size())
+ {
+ return;
+ }
+
+ //llinfos << "LLAres::rewriteURI (" << uri << ") search: '" << "_" + resp->mUri.scheme() + "._tcp." + resp->mUri.hostName() << "'" << llendl;
- resp->mUri = LLURI(uri);
- search("_" + resp->mUri.scheme() + "._tcp." + resp->mUri.hostName(),
- RES_SRV, resp);
+ search("_" + resp->mUri.scheme() + "._tcp." + resp->mUri.hostName(), RES_SRV, resp);
+
+
+ }
}
LLQueryResponder::LLQueryResponder()