summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2011-09-29 18:03:39 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2011-09-29 18:03:39 +0300
commit6a463a41fec89c7f1eadb77c16eeae169ff777d0 (patch)
treef297c32418eb139eded752ce99b418773328e458 /indra/newview/llvoicevivox.cpp
parentc44db34a15abd2e96b8fd461e9fb3e217fe648cc (diff)
parent71ed326f51770b215ba5dd2ac8d159c3b764c2d2 (diff)
Merge sergeylproductengine/viewer-experience-fui with richard/viewer-experience-fui
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r--indra/newview/llvoicevivox.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 8b942fbc6a..90a05cd9e5 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -4498,17 +4498,25 @@ bool LLVivoxVoiceClient::parcelVoiceInfoReceived(state requesting_state)
bool LLVivoxVoiceClient::requestParcelVoiceInfo()
{
- LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
-
- // grab the cap for parcel voice info from the region.
LLViewerRegion * region = gAgent.getRegion();
- if (region == NULL)
+ if (region == NULL || !region->capabilitiesReceived())
{
+ // we don't have the cap yet, so return false so the caller can try again later.
+
+ LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest capability not yet available, deferring" << LL_ENDL;
return false;
}
+
// grab the cap.
std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest");
- if (!url.empty())
+ if (url.empty())
+ {
+ // Region dosn't have the cap. Stop probing.
+ LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest capability not available in this region" << LL_ENDL;
+ setState(stateDisableCleanup);
+ return false;
+ }
+ else
{
// if we've already retrieved the cap from the region, go ahead and make the request,
// and return true so we can go into the state that waits for the response.
@@ -4517,18 +4525,11 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo()
LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
LLHTTPClient::post(
- url,
- data,
- new LLVivoxVoiceClientCapResponder(getState()));
+ url,
+ data,
+ new LLVivoxVoiceClientCapResponder(getState()));
return true;
}
- else
- {
-
- // we don't have the cap yet, so return false so the caller can try again later.
- LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest cap not yet available, deferring" << LL_ENDL;
- return false;
- }
}
void LLVivoxVoiceClient::switchChannel(