diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-10-14 16:30:08 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-10-14 16:30:08 -0700 |
| commit | c2f5365f986aab49d5c7cfa2834a68f5b35c09c2 (patch) | |
| tree | 4cbbf7bd730ad0ad3aa00569c4364dad51de6082 /indra/llmessage/llares.cpp | |
| parent | 0cf0efb6e31d505bc079f757fe7d832110797199 (diff) | |
| parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) | |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/llmessage/llares.cpp')
| -rwxr-xr-x[-rw-r--r--] | indra/llmessage/llares.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp index 5a67035ed1..7f74247a13 100644..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() |
