diff options
author | McCabe Maxsted | 2012-02-18 00:21:02 -0700 |
---|---|---|
committer | McCabe Maxsted | 2012-02-18 00:21:02 -0700 |
commit | 584112aff112409e17c13e8d59ff483431696fcf (patch) | |
tree | c3cbb9fedfb8366c17375609ea2a6b4b7c3780b3 /linden/indra/newview/llvoiceclient.cpp | |
parent | Fixed tons of 'LLXMLTree invalid token' warnings spamming the log and made th... (diff) | |
parent | disable voice if ParcelVoiceInfoRequest response is malformed. (diff) | |
download | meta-impy-584112aff112409e17c13e8d59ff483431696fcf.zip meta-impy-584112aff112409e17c13e8d59ff483431696fcf.tar.gz meta-impy-584112aff112409e17c13e8d59ff483431696fcf.tar.bz2 meta-impy-584112aff112409e17c13e8d59ff483431696fcf.tar.xz |
Merge remote-tracking branch 'armin/next' into next
Diffstat (limited to 'linden/indra/newview/llvoiceclient.cpp')
-rw-r--r-- | linden/indra/newview/llvoiceclient.cpp | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 7761605..2035b62 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp | |||
@@ -1054,6 +1054,11 @@ void LLVoiceClientCapResponder::result(const LLSD& content) | |||
1054 | 1054 | ||
1055 | gVoiceClient->setSpatialChannel(uri, credentials, mResponseID); | 1055 | gVoiceClient->setSpatialChannel(uri, credentials, mResponseID); |
1056 | } | 1056 | } |
1057 | else | ||
1058 | { | ||
1059 | llwarns << "ParcelVoiceInfoRequest response malformed, disabling voice." << llendl; | ||
1060 | gVoiceClient->close(); | ||
1061 | } | ||
1057 | } | 1062 | } |
1058 | 1063 | ||
1059 | 1064 | ||
@@ -1212,13 +1217,22 @@ void LLVoiceClient::terminate() | |||
1212 | // ms_sleep(2000); | 1217 | // ms_sleep(2000); |
1213 | gVoiceClient->connectorShutdown(); | 1218 | gVoiceClient->connectorShutdown(); |
1214 | gVoiceClient->closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. | 1219 | gVoiceClient->closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. |
1215 | 1220 | ||
1216 | // This will do unpleasant things on windows. | 1221 | LL_DEBUGS("IdleCallbacks") << "IdleCallbacks deleteFunction " |
1217 | // killGateway(); | 1222 | << "called from LLVoiceClient" << LL_ENDL; |
1218 | 1223 | gIdleCallbacks.deleteFunction(idle, gVoiceClient); | |
1224 | |||
1225 | if (isGatewayRunning()) | ||
1226 | { | ||
1227 | // This will do unpleasant things on windows. | ||
1228 | // AW: no unpleasant things observed on windows, | ||
1229 | // guess they came from sloppy cleanup. | ||
1230 | killGateway(); | ||
1231 | } | ||
1232 | |||
1219 | // Don't do this anymore -- LLSingleton will take care of deleting the object. | 1233 | // Don't do this anymore -- LLSingleton will take care of deleting the object. |
1220 | // delete gVoiceClient; | 1234 | // delete gVoiceClient; |
1221 | 1235 | ||
1222 | // Hint to other code not to access the voice client anymore. | 1236 | // Hint to other code not to access the voice client anymore. |
1223 | gVoiceClient = NULL; | 1237 | gVoiceClient = NULL; |
1224 | } | 1238 | } |
@@ -1765,11 +1779,13 @@ void LLVoiceClient::close() | |||
1765 | { | 1779 | { |
1766 | LL_DEBUGS("VoiceSession") << "Cancel Session: LLVoiceClient::close() called." | 1780 | LL_DEBUGS("VoiceSession") << "Cancel Session: LLVoiceClient::close() called." |
1767 | << llendl; | 1781 | << llendl; |
1782 | mAccountActive = false; | ||
1768 | setState(stateDisableCleanup); | 1783 | setState(stateDisableCleanup); |
1769 | } | 1784 | } |
1770 | 1785 | ||
1771 | void LLVoiceClient::start() | 1786 | void LLVoiceClient::start() |
1772 | { | 1787 | { |
1788 | mAccountActive = true; | ||
1773 | setState(stateStart); | 1789 | setState(stateStart); |
1774 | } | 1790 | } |
1775 | 1791 | ||
@@ -7210,6 +7226,11 @@ class LLViewerParcelVoiceInfo : public LLHTTPNode | |||
7210 | gVoiceClient->setPIRCapResponseID(response_id); | 7226 | gVoiceClient->setPIRCapResponseID(response_id); |
7211 | gVoiceClient->setSpatialChannel(uri, credentials, response_id); | 7227 | gVoiceClient->setSpatialChannel(uri, credentials, response_id); |
7212 | } | 7228 | } |
7229 | else | ||
7230 | { | ||
7231 | llwarns << "ParcelVoiceInfoRequest response malformed, disabling voice." << llendl; | ||
7232 | gVoiceClient->close(); | ||
7233 | } | ||
7213 | } | 7234 | } |
7214 | } | 7235 | } |
7215 | }; | 7236 | }; |