summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-09-16 12:02:24 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-09-16 12:02:24 -0700
commit60db8577a90be3ea3d4a06ab06232802be953286 (patch)
tree0fcedbdf478b3f518a0d5dc69b7d234406355d75 /indra/newview/llvoicevivox.cpp
parentae623c8068145f968f09ccf9bbdd90e993ca4283 (diff)
parent1dbcc3fff79b55038178e493df0cc0c3a4d66221 (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 6b07b0f228..019629084f 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -390,7 +390,7 @@ LLVivoxVoiceClient::~LLVivoxVoiceClient()
{
}
-//----------------------------------------------
+//---------------------------------------------------
void LLVivoxVoiceClient::init(LLPumpIO *pump)
{
@@ -404,7 +404,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
{
@@ -412,6 +413,18 @@ void LLVivoxVoiceClient::terminate()
}
}
+//---------------------------------------------------
+
+void LLVivoxVoiceClient::cleanUp()
+{
+ deleteAllSessions();
+ deleteAllBuddies();
+ deleteAllVoiceFonts();
+ deleteVoiceFontTemplates();
+}
+
+//---------------------------------------------------
+
const LLVoiceVersionInfo& LLVivoxVoiceClient::getVersion()
{
return mVoiceVersion;
@@ -780,14 +793,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();
@@ -1679,12 +1688,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)
{
@@ -1782,6 +1788,8 @@ void LLVivoxVoiceClient::closeSocket(void)
{
mSocket.reset();
mConnected = false;
+ mConnectorHandle.clear();
+ mAccountHandle.clear();
}
void LLVivoxVoiceClient::loginSendMessage()
@@ -2374,8 +2382,7 @@ void LLVivoxVoiceClient::giveUp()
{
// All has failed. Clean up and stop trying.
closeSocket();
- deleteAllSessions();
- deleteAllBuddies();
+ cleanUp();
setState(stateJail);
}