summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-02-22 16:52:23 +0000
committerAimee Linden <aimee@lindenlab.com>2010-02-22 16:52:23 +0000
commit5518e15f89359ba1627633f59f7299b69fc2bd69 (patch)
tree300551721a8a931a388cca66c2edb2d68fb344fa /indra
parent0f61c00218a07a7d487e33256382c4a10561e0c1 (diff)
Added stateFontListReceived to the voice client state machine.
This makes sure we have the voice font list before attempting to start a session.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoiceclient.cpp11
-rw-r--r--indra/newview/llvoiceclient.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 92dfa6d30e..de4e53f52c 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -1622,6 +1622,7 @@ std::string LLVoiceClient::state2string(LLVoiceClient::state inState)
CASE(stateNeedsLogin);
CASE(stateLoggingIn);
CASE(stateLoggedIn);
+ CASE(stateFontListReceived);
CASE(stateCreatingSessionGroup);
CASE(stateNoChannel);
CASE(stateJoiningSession);
@@ -2231,6 +2232,11 @@ void LLVoiceClient::stateMachine()
writeString(stream.str());
}
}
+
+ // accountGetSessionFontsResponse() will transition from here to stateFontListReceived.
+
+ //MARK: stateFontListReceived
+ case stateFontListReceived: // font list received
#if USE_SESSION_GROUPS
// create the main session group
@@ -7092,6 +7098,11 @@ void LLVoiceClient::accountGetSessionFontsResponse(int statusCode, const std::st
{
// Session font list entries were updated via addSessionFont() during parsing. Just flag that we're done.
mSessionFontsReceived = true;
+
+ if(getState() == stateLoggedIn)
+ {
+ setState(stateFontListReceived);
+ }
}
void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer)
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 05624bcefd..2d8fff5508 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -429,7 +429,6 @@ static void updatePosition(void);
struct voiceFontEntry
{
voiceFontEntry(const std::string &id);
- // *TODO: Decide which of these we don't need to store
std::string mID;
std::string mName;
std::string mDescription;
@@ -584,6 +583,7 @@ static void updatePosition(void);
stateNeedsLogin, // send login request
stateLoggingIn, // waiting for account handle
stateLoggedIn, // account handle received
+ stateFontListReceived, // List of available voice fonts received
stateCreatingSessionGroup, // Creating the main session group
stateNoChannel, //
stateJoiningSession, // waiting for session handle