summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-01-26 10:40:30 +0200
committerMike Antipov <mantipov@productengine.com>2010-01-26 10:40:30 +0200
commit6a3e89c34ab6db1120f2409a830ff561543a7fce (patch)
tree5a397e1284f90c77729819380649188612eb8fd8 /indra/newview
parent58df93f189897555ae060f82ec058fe77173e5e0 (diff)
Work on low bug EXT-4637 (Remove Warning flood from the VCP)
-- refactoring: moved processing of participants which are not in current voice channel into separate method. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llcallfloater.cpp52
-rw-r--r--indra/newview/llcallfloater.h4
2 files changed, 32 insertions, 24 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index d9df537e03..ba50d0454e 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -568,34 +568,38 @@ void LLCallFloater::updateParticipantsVoiceState()
if (!found)
{
- // If an avatarID is not found in a speakers list from VoiceClient and
- // a panel with this ID has a JOINED status this means that this person
- // HAS LEFT the call.
- if ((getState(participant_id) == STATE_JOINED))
- {
- setState(item, STATE_LEFT);
+ updateNotInVoiceParticipantState(item);
+ }
+ }
+}
- LLPointer<LLSpeaker> speaker = mSpeakerManager->findSpeaker(item->getAvatarId());
- if (speaker.isNull())
- {
- continue;
- }
+void LLCallFloater::updateNotInVoiceParticipantState(LLAvatarListItem* item)
+{
+ LLUUID participant_id = item->getAvatarId();
+ // If an avatarID is not found in a speakers list from VoiceClient and
+ // a panel with this ID has a JOINED status this means that this person
+ // HAS LEFT the call.
+ if ((getState(participant_id) == STATE_JOINED))
+ {
+ setState(item, STATE_LEFT);
- speaker->mHasLeftCurrentCall = TRUE;
- }
- // If an avatarID is not found in a speakers list from VoiceClient and
- // a panel with this ID has a LEFT status this means that this person
- // HAS ENTERED session but it is not in voice chat yet. So, set INVITED status
- else if ((getState(participant_id) != STATE_LEFT))
- {
- setState(item, STATE_INVITED);
- }
- else
- {
- llwarns << "Unsupported (" << getState(participant_id) << ") state: " << item->getAvatarName() << llendl;
- }
+ LLPointer<LLSpeaker> speaker = mSpeakerManager->findSpeaker(participant_id);
+ if (speaker.notNull())
+ {
+ speaker->mHasLeftCurrentCall = TRUE;
}
}
+ // If an avatarID is not found in a speakers list from VoiceClient and
+ // a panel with this ID has a LEFT status this means that this person
+ // HAS ENTERED session but it is not in voice chat yet. So, set INVITED status
+ else if ((getState(participant_id) != STATE_LEFT))
+ {
+ setState(item, STATE_INVITED);
+ }
+ else
+ {
+ llwarns << "Unsupported (" << getState(participant_id) << ") state for: " << item->getAvatarName() << llendl;
+ }
}
void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state)
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index eded3a426b..766191379b 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -145,6 +145,10 @@ private:
*/
void updateParticipantsVoiceState();
+ /**
+ * Updates voice state of participant not in current voice channel depend on its current state.
+ */
+ void updateNotInVoiceParticipantState(LLAvatarListItem* item);
void setState(LLAvatarListItem* item, ESpeakerState state);
void setState(const LLUUID& speaker_id, ESpeakerState state)
{