summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
authorMatthew Breindel (Falcon) <falcon@lindenlab.com>2010-09-30 12:00:29 -0700
committerMatthew Breindel (Falcon) <falcon@lindenlab.com>2010-09-30 12:00:29 -0700
commit60f8c8279071b791fbc7179d8bc2bb9ca4880a03 (patch)
tree20a513fdb383dfd36ca0dbe0a99eacd72faad835 /indra/newview/llvoicevivox.cpp
parent569f3f4b06fc2f5a0fa658a49d519428983403f9 (diff)
parentd95b08c4a6830fc8a2319e77242d8f76eb4cbdae (diff)
Merge
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r--indra/newview/llvoicevivox.cpp37
1 files changed, 22 insertions, 15 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 4dc9edb247..ada577d1b2 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -392,7 +392,7 @@ LLVivoxVoiceClient::~LLVivoxVoiceClient()
{
}
-//----------------------------------------------
+//---------------------------------------------------
void LLVivoxVoiceClient::init(LLPumpIO *pump)
{
@@ -406,7 +406,8 @@ void LLVivoxVoiceClient::terminate()
{
logout();
connectorShutdown();
- closeSocket(); // Need to do this now -- bad things happen if the destructor does it later.
+ closeSocket(); // Need to do this now -- bad things happen if the destructor does it later.
+ cleanUp();
}
else
{
@@ -414,6 +415,18 @@ void LLVivoxVoiceClient::terminate()
}
}
+//---------------------------------------------------
+
+void LLVivoxVoiceClient::cleanUp()
+{
+ deleteAllSessions();
+ deleteAllBuddies();
+ deleteAllVoiceFonts();
+ deleteVoiceFontTemplates();
+}
+
+//---------------------------------------------------
+
const LLVoiceVersionInfo& LLVivoxVoiceClient::getVersion()
{
return mVoiceVersion;
@@ -782,14 +795,10 @@ void LLVivoxVoiceClient::stateMachine()
{
//MARK: stateDisableCleanup
case stateDisableCleanup:
- // Clean up and reset everything.
+ // Clean up and reset everything.
closeSocket();
- deleteAllSessions();
- deleteAllBuddies();
- deleteAllVoiceFonts();
- deleteVoiceFontTemplates();
+ cleanUp();
- mConnectorHandle.clear();
mAccountHandle.clear();
mAccountPassword.clear();
mVoiceAccountServerURI.clear();
@@ -1681,12 +1690,9 @@ void LLVivoxVoiceClient::stateMachine()
//MARK: stateLoggedOut
case stateLoggedOut: // logout response received
- // Once we're logged out, all these things are invalid.
+ // Once we're logged out, these things are invalid.
mAccountHandle.clear();
- deleteAllSessions();
- deleteAllBuddies();
- deleteAllVoiceFonts();
- deleteVoiceFontTemplates();
+ cleanUp();
if(mVoiceEnabled && !mRelogRequested)
{
@@ -1784,6 +1790,8 @@ void LLVivoxVoiceClient::closeSocket(void)
{
mSocket.reset();
mConnected = false;
+ mConnectorHandle.clear();
+ mAccountHandle.clear();
}
void LLVivoxVoiceClient::loginSendMessage()
@@ -2376,8 +2384,7 @@ void LLVivoxVoiceClient::giveUp()
{
// All has failed. Clean up and stop trying.
closeSocket();
- deleteAllSessions();
- deleteAllBuddies();
+ cleanUp();
setState(stateJail);
}