From 48c7e2cee70996048b0974c6cdda67cdea11a32c Mon Sep 17 00:00:00 2001 From: "Jeff (Gioffredo Linden)" Date: Fri, 12 Oct 2012 18:14:57 -0400 Subject: Expose Chat history to VITA by adding getValue method to llchathistory object --- indra/newview/llchathistory.cpp | 8 ++++++++ indra/newview/llchathistory.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 3636f9e9d2..deb658c489 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -596,6 +596,14 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) mEditor = LLUICtrlFactory::create(editor_params, this); } +LLSD LLChatHistory::getValue() +{ + LLSD* text=new LLSD(); + text->assign(mEditor->getText()); + return *text; + +} + LLChatHistory::~LLChatHistory() { this->clear(); diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index 990c52f31b..fa88483fcd 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -103,7 +103,7 @@ class LLChatHistory : public LLUICtrl public: ~LLChatHistory(); - + LLSD getVlue(); void initFromParams(const Params&); /** -- cgit v1.2.3 From 5f4fbffc82ae755235ead5e1b5883cc909e77e77 Mon Sep 17 00:00:00 2001 From: "Jeff (Gioffredo Linden)" Date: Fri, 12 Oct 2012 20:30:06 -0400 Subject: Fix typo --- indra/newview/llchathistory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index fa88483fcd..effdd75911 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -103,7 +103,7 @@ class LLChatHistory : public LLUICtrl public: ~LLChatHistory(); - LLSD getVlue(); + LLSD getValue(); void initFromParams(const Params&); /** -- cgit v1.2.3 From 815884e0d49620db8f9f60fc629a26ad2c666749 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 15 Oct 2012 14:27:47 -0700 Subject: MAINT-1551 : WIP : Trace IM messaging in and out. --- indra/newview/lleventpoll.cpp | 38 +++++++++++++++++++++++--------------- indra/newview/llimfloater.cpp | 4 +++- indra/newview/llimview.cpp | 7 +++++++ indra/newview/llspeakers.cpp | 4 ++++ indra/newview/llvoicechannel.cpp | 2 ++ 5 files changed, 39 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 4f4d9a40b4..1cf3de8ef0 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -37,6 +37,7 @@ #include "llviewerregion.h" #include "message.h" #include "lltrans.h" +#include "llsdserialize.h" namespace { @@ -109,14 +110,14 @@ namespace const std::string& pollURL, const LLHost& sender) { LLHTTPClient::ResponderPtr result = new LLEventPollResponder(pollURL, sender); - llinfos << "LLEventPollResponder::start <" << sCount << "> " + llinfos << "Merov debug : LLEventPollResponder::start <" << sCount << "> " << pollURL << llendl; return result; } void LLEventPollResponder::stop() { - llinfos << "LLEventPollResponder::stop <" << mCount << "> " + llinfos << "Merov debug : LLEventPollResponder::stop <" << mCount << "> " << mPollURL << llendl; // there should be a way to stop a LLHTTPClient request in progress mDone = true; @@ -134,17 +135,17 @@ namespace LLViewerRegion *regionp = gAgent.getRegion(); if (!regionp) { - llerrs << "LLEventPoll initialized before region is added." << llendl; + llinfos << "Merov debug : LLEventPoll initialized before region is added." << llendl; } mSender = sender.getIPandPort(); - llinfos << "LLEventPoll initialized with sender " << mSender << llendl; + llinfos << "Merov debug : LLEventPoll initialized with sender " << mSender << llendl; makeRequest(); } LLEventPollResponder::~LLEventPollResponder() { stop(); - lldebugs << "LLEventPollResponder::~Impl <" << mCount << "> " + llinfos << "Merov debug : LLEventPollResponder::~Impl <" << mCount << "> " << mPollURL << llendl; } @@ -154,6 +155,7 @@ namespace const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + llinfos << "Merov debug : LLEventPollResponder::completedRaw, status = " << status << ", reason = " << reason << llendl; if (status == HTTP_BAD_GATEWAY) { // These errors are not parsable as LLSD, @@ -172,8 +174,12 @@ namespace request["ack"] = mAcknowledge; request["done"] = mDone; - lldebugs << "LLEventPollResponder::makeRequest <" << mCount << "> ack = " - << LLSDXMLStreamer(mAcknowledge) << llendl; + llinfos << "Merov debug : viewer->sim : LLEventPollResponder::makeRequest <" << mCount + << "> ack = " << LLSDXMLStreamer(mAcknowledge) + << ", error = " << mErrorCount + << ", sender = " << mSender + << ", url = " << mPollURL + << ", done = " << mDone << llendl; LLHTTPClient::post(mPollURL, request, this); } @@ -183,12 +189,14 @@ namespace LLSD message; message["sender"] = mSender; message["body"] = content["body"]; + llinfos << "Merov debug : sim->viewer : LLEventPollResponder::handleMessage, msg_name = " << msg_name << ", message = " << LLSDOStreamer(message) << llendl; LLMessageSystem::dispatch(msg_name, message); } //virtual void LLEventPollResponder::error(U32 status, const std::string& reason) { + llinfos << "Merov debug : LLEventPollResponder::error, status = " << status << ", reason = " << reason << llendl; if (mDone) return; // A HTTP_BAD_GATEWAY (502) error is our standard timeout response @@ -207,11 +215,11 @@ namespace + mErrorCount * EVENT_POLL_ERROR_RETRY_SECONDS_INC , this); - llwarns << "Unexpected HTTP error. status: " << status << ", reason: " << reason << llendl; + llinfos << "Merov debug : Unexpected HTTP error. status: " << status << ", reason: " << reason << llendl; } else { - llwarns << "LLEventPollResponder::error: <" << mCount << "> got " + llinfos << "Merov debug : LLEventPollResponder::error: <" << mCount << "> got " << status << ": " << reason << (mDone ? " -- done" : "") << llendl; stop(); @@ -227,7 +235,7 @@ namespace // continue running. if(gAgent.getRegion() && gAgent.getRegion()->getHost().getIPandPort() == mSender) { - llwarns << "Forcing disconnect due to stalled main region event poll." << llendl; + llinfos << "Merov debug : Forcing disconnect due to stalled main region event poll." << llendl; LLAppViewer::instance()->forceDisconnect(LLTrans::getString("AgentLostConnection")); } } @@ -236,8 +244,8 @@ namespace //virtual void LLEventPollResponder::result(const LLSD& content) { - lldebugs << "LLEventPollResponder::result <" << mCount << ">" - << (mDone ? " -- done" : "") << llendl; + llinfos << "Merov debug : LLEventPollResponder::result <" << mCount << "> " + << (mDone ? " -- done" : "") << ", content = " << LLSDOStreamer(content) << llendl; if (mDone) return; @@ -246,7 +254,7 @@ namespace if (!content.get("events") || !content.get("id")) { - llwarns << "received event poll with no events or id key" << llendl; + llinfos << "Merov debug : received event poll with no events or id key" << llendl; makeRequest(); return; } @@ -256,11 +264,11 @@ namespace if(mAcknowledge.isUndefined()) { - llwarns << "LLEventPollResponder: id undefined" << llendl; + llinfos << "Merov debug : LLEventPollResponder: id undefined" << llendl; } // was llinfos but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG - lldebugs << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " + llinfos << "Merov debug : LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " << LLSDXMLStreamer(mAcknowledge) << ")" << llendl; LLSD::array_const_iterator i = events.beginArray(); diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 467f48600a..47e091a57c 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -59,6 +59,7 @@ #include "llviewerchat.h" #include "llnotificationmanager.h" #include "llautoreplace.h" +#include "llsdserialize.h" floater_showed_signal_t LLIMFloater::sIMFloaterShowedSignal; @@ -1208,11 +1209,12 @@ BOOL LLIMFloater::inviteToSession(const uuid_vec_t& ids) } data["method"] = "invite"; data["session-id"] = mSessionID; + llinfos << "Merov debug : viewer->sim : LLIMFloater::inviteToSession, session id = " << mSessionID << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data,new LLSessionInviteResponder(mSessionID)); } else { - llinfos << "LLIMFloater::inviteToSession -" + llinfos << "Merov debug : LLIMFloater::inviteToSession -" << " no need to invite agents for " << mDialog << llendl; // successful add, because everyone that needed to get added diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b45903835a..398584e005 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -63,6 +63,7 @@ #include "lltoolbarview.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" +#include "llsdserialize.h" const static std::string ADHOC_NAME_SUFFIX(" Conference"); @@ -1316,6 +1317,7 @@ bool LLIMModel::sendStartSession( data["params"] = agents; + llinfos << "Merov debug : viewer-> sim : LLIMModel::sendStartSession, session id = " << temp_session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -2253,6 +2255,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload LLSD data; data["method"] = "accept invitation"; data["session-id"] = session_id; + llinfos << "Merov debug : viewer-> sim : LLIncomingCallDialog::processCallResponse, accept, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -2293,6 +2296,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload LLSD data; data["method"] = "decline invitation"; data["session-id"] = session_id; + llinfos << "Merov debug : viewer-> sim : LLIncomingCallDialog::processCallResponse, decline, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -2346,6 +2350,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) LLSD data; data["method"] = "accept invitation"; data["session-id"] = session_id; + llinfos << "Merov debug : viewer-> sim : inviteUserResponse, accept, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -2381,6 +2386,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) LLSD data; data["method"] = "decline invitation"; data["session-id"] = session_id; + llinfos << "Merov debug : viewer-> sim : inviteUserResponse, decline, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -3345,6 +3351,7 @@ public: LLSD data; data["method"] = "accept invitation"; data["session-id"] = session_id; + llinfos << "Merov debug : viewer-> sim : LLViewerChatterBoxInvitation, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 2d2b5202e0..19b99fef11 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -36,6 +36,7 @@ #include "llviewerobjectlist.h" #include "llvoavatar.h" #include "llworld.h" +#include "llsdserialize.h" const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f); const LLColor4 ACTIVE_COLOR(0.5f, 0.5f, 0.5f, 1.f); @@ -785,6 +786,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) //current value represents ability to type, so invert data["params"]["mute_info"]["text"] = !speakerp->mModeratorMutedText; + llinfos << "Merov debug : viewer->sim : LLIMSpeakerMgr::toggleAllowTextChat, session id = " << getSessionID() << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data, new ModerationResponder(getSessionID())); } @@ -809,6 +811,7 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu data["params"]["mute_info"] = LLSD::emptyMap(); data["params"]["mute_info"]["voice"] = !unmute; + llinfos << "Merov debug : viewer->sim : LLIMSpeakerMgr::moderateVoiceParticipant, session id = " << getSessionID() << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -851,6 +854,7 @@ void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallo data["params"]["update_info"]["moderated_mode"] = LLSD::emptyMap(); data["params"]["update_info"]["moderated_mode"]["voice"] = disallow_voice; + llinfos << "Merov debug : viewer->sim : LLIMSpeakerMgr::moderateVoiceSession, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data, new ModerationResponder(session_id)); } diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index ceff75a0cc..62a43333dd 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -35,6 +35,7 @@ #include "llrecentpeople.h" #include "llviewercontrol.h" #include "llvoicechannel.h" +#include "llsdserialize.h" LLVoiceChannel::voice_channel_map_t LLVoiceChannel::sVoiceChannelMap; @@ -539,6 +540,7 @@ void LLVoiceChannelGroup::getChannelInfo() LLSD data; data["method"] = "call"; data["session-id"] = mSessionID; + llinfos << "Merov debug : viewer-> sim : LLVoiceChannelGroup::getChannelInfo, session id = " << mSessionID << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data, new LLVoiceCallCapResponder(mSessionID)); -- cgit v1.2.3 From a8c443feb21d5fe486e9a30649089633ae3f6e22 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 15 Oct 2012 14:29:57 -0700 Subject: MAINT-1551 : WIP : More IM comm tracing and attempt to fix --- indra/newview/llavataractions.cpp | 11 +++++++++-- indra/newview/lleventpoll.cpp | 31 +++++++++++++++++-------------- indra/newview/llspeakers.cpp | 2 ++ 3 files changed, 28 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 3326103d03..f7f5c04ef9 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -296,10 +296,17 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float } const std::string title = LLTrans::getString("conference-title"); LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], id_array, false, floater_id); - if (session_id != LLUUID::null) + + if (session_id == LLUUID::null) { - LLIMFloater::show(session_id); + return; } + + LLIMFloater::show(session_id); +// gIMMgr->processAgentListUpdates(session_id, LLSD()); + gIMMgr->startCall(session_id,LLVoiceChannel::OUTGOING_CALL); + gIMMgr->endCall(session_id); + make_ui_sound("UISndStartIM"); } diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 4f4d9a40b4..a5aa014a74 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -109,14 +109,14 @@ namespace const std::string& pollURL, const LLHost& sender) { LLHTTPClient::ResponderPtr result = new LLEventPollResponder(pollURL, sender); - llinfos << "LLEventPollResponder::start <" << sCount << "> " + llinfos << "Merov debug : LLEventPollResponder::start <" << sCount << "> " << pollURL << llendl; return result; } void LLEventPollResponder::stop() { - llinfos << "LLEventPollResponder::stop <" << mCount << "> " + llinfos << "Merov debug : LLEventPollResponder::stop <" << mCount << "> " << mPollURL << llendl; // there should be a way to stop a LLHTTPClient request in progress mDone = true; @@ -137,14 +137,14 @@ namespace llerrs << "LLEventPoll initialized before region is added." << llendl; } mSender = sender.getIPandPort(); - llinfos << "LLEventPoll initialized with sender " << mSender << llendl; + llinfos << "Merov debug : LLEventPoll initialized with sender " << mSender << llendl; makeRequest(); } LLEventPollResponder::~LLEventPollResponder() { stop(); - lldebugs << "LLEventPollResponder::~Impl <" << mCount << "> " + llinfos << "Merov debug : LLEventPollResponder::~Impl <" << mCount << "> " << mPollURL << llendl; } @@ -154,11 +154,13 @@ namespace const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + llinfos << "Merov debug : LLEventPollResponder::completedRaw url <" << mPollURL << ">, status = " << status << ", reason = " << reason << llendl; if (status == HTTP_BAD_GATEWAY) { // These errors are not parsable as LLSD, // which LLHTTPClient::Responder::completedRaw will try to do. - completed(status, reason, LLSD()); + //completed(status, reason, LLSD()); + error(status, reason); } else { @@ -172,8 +174,7 @@ namespace request["ack"] = mAcknowledge; request["done"] = mDone; - lldebugs << "LLEventPollResponder::makeRequest <" << mCount << "> ack = " - << LLSDXMLStreamer(mAcknowledge) << llendl; + llinfos << "Merov debug : LLEventPollResponder::makeRequest <" << mCount << "> ack = " << LLSDXMLStreamer(mAcknowledge) << llendl; LLHTTPClient::post(mPollURL, request, this); } @@ -183,6 +184,7 @@ namespace LLSD message; message["sender"] = mSender; message["body"] = content["body"]; + llinfos << "Merov debug : LLEventPollResponder::handleMessage, msg_name = " << msg_name << ", message = " << LLSDOStreamer(message) << llendl; LLMessageSystem::dispatch(msg_name, message); } @@ -190,6 +192,7 @@ namespace void LLEventPollResponder::error(U32 status, const std::string& reason) { if (mDone) return; + llinfos << "Merov debug : LLEventPollResponder::error, status = " << status << ", reason = " << reason << llendl; // A HTTP_BAD_GATEWAY (502) error is our standard timeout response // we get this when there are no events. @@ -207,11 +210,11 @@ namespace + mErrorCount * EVENT_POLL_ERROR_RETRY_SECONDS_INC , this); - llwarns << "Unexpected HTTP error. status: " << status << ", reason: " << reason << llendl; + llinfos << "Merov debug : Unexpected HTTP error. status: " << status << ", reason: " << reason << llendl; } else { - llwarns << "LLEventPollResponder::error: <" << mCount << "> got " + llinfos << "Merov debug : LLEventPollResponder::error: <" << mCount << "> got " << status << ": " << reason << (mDone ? " -- done" : "") << llendl; stop(); @@ -227,7 +230,7 @@ namespace // continue running. if(gAgent.getRegion() && gAgent.getRegion()->getHost().getIPandPort() == mSender) { - llwarns << "Forcing disconnect due to stalled main region event poll." << llendl; + llinfos << "Merov debug : Forcing disconnect due to stalled main region event poll." << llendl; LLAppViewer::instance()->forceDisconnect(LLTrans::getString("AgentLostConnection")); } } @@ -236,7 +239,7 @@ namespace //virtual void LLEventPollResponder::result(const LLSD& content) { - lldebugs << "LLEventPollResponder::result <" << mCount << ">" + llinfos << "Merov debug : LLEventPollResponder::result <" << mCount << ">" << (mDone ? " -- done" : "") << llendl; if (mDone) return; @@ -246,7 +249,7 @@ namespace if (!content.get("events") || !content.get("id")) { - llwarns << "received event poll with no events or id key" << llendl; + llinfos << "Merov debug : received event poll with no events or id key" << llendl; makeRequest(); return; } @@ -256,11 +259,11 @@ namespace if(mAcknowledge.isUndefined()) { - llwarns << "LLEventPollResponder: id undefined" << llendl; + llinfos << "Merov debug : LLEventPollResponder: id undefined" << llendl; } // was llinfos but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG - lldebugs << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " + llinfos << "Merov debug : LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " << LLSDXMLStreamer(mAcknowledge) << ")" << llendl; LLSD::array_const_iterator i = events.beginArray(); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 2d2b5202e0..92149ee50a 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -286,6 +286,7 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin mSpeakers.insert(std::make_pair(speakerp->mID, speakerp)); mSpeakersSorted.push_back(speakerp); LL_DEBUGS("Speakers") << "Added speaker " << id << llendl; + //llinfos << "Merov debug : setSpeaker, add, id = " << id << ", name = " << name << llendl; fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "add"); } else @@ -306,6 +307,7 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin } else { + llinfos << "Merov debug : setSpeaker, speaker not found? id = " << id << ", name = " << name << llendl; LL_WARNS("Speakers") << "Speaker " << id << " not found" << llendl; } } -- cgit v1.2.3 From 1557bffb5630158430946abd600218be89e3590e Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 15 Oct 2012 19:44:14 -0700 Subject: MAINT-1551 : WIP : Added a hack : send an accept invitation message so to trigger the sending of the agent list. --- indra/newview/llavataractions.cpp | 4 +- indra/newview/llspeakers.cpp | 126 +++++++++++++++++++++++++++----------- indra/newview/llspeakers.h | 2 + 3 files changed, 93 insertions(+), 39 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index f7f5c04ef9..600df31c8b 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -304,8 +304,8 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float LLIMFloater::show(session_id); // gIMMgr->processAgentListUpdates(session_id, LLSD()); - gIMMgr->startCall(session_id,LLVoiceChannel::OUTGOING_CALL); - gIMMgr->endCall(session_id); +// gIMMgr->startCall(session_id,LLVoiceChannel::OUTGOING_CALL); +// gIMMgr->endCall(session_id); make_ui_sound("UISndStartIM"); } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 2e26eabb71..11d1b563ac 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -256,6 +256,64 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_ } +// +// ModerationResponder +// + +class ModerationResponder : public LLHTTPClient::Responder +{ +public: + ModerationResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_mod_error", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic_request_error", + mSessionID); + } + } + } + +private: + LLUUID mSessionID; +}; + +class UpdateResponder : public LLHTTPClient::Responder +{ +public: + UpdateResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llinfos << "Merov debug : UpdateResponder error, status = " << status << ": " << reason << llendl; + } + +private: + LLUUID mSessionID; +}; + // // LLSpeakerMgr // @@ -483,6 +541,37 @@ void LLSpeakerMgr::updateSpeakerList() } } + else + { + // Check if the list is empty, except if it's Nearby Chat (session_id NULL). + LLUUID session_id = getSessionID(); + if ((mSpeakers.size() == 0) && (!session_id.isNull())) + { + llinfos << "Merov debug : LLSpeakerMgr::updateSpeakerList: No speakers in " << session_id << llendl; + // MAINT-1551 : If the list is empty for too long, we should send a message to the sim so that + // it sends the participant list again. + updateSession(); + } + } +} + +void LLSpeakerMgr::updateSession() +{ + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "accept invitation"; +// data["method"] = "session update"; + data["session-id"] = getSessionID(); +// data["params"] = LLSD::emptyMap(); + +// data["params"]["update_info"] = LLSD::emptyMap(); + +// data["params"]["update_info"]["moderated_mode"] = LLSD::emptyMap(); +// data["params"]["update_info"]["moderated_mode"]["voice"] = false; + + llinfos << "Merov debug : viewer->sim : LLSpeakerMgr::updateSession, session id = " << getSessionID() << ", data = " << LLSDOStreamer(data) << llendl; + + LLHTTPClient::post(url, data, new UpdateResponder(getSessionID())); } void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) @@ -736,43 +825,6 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } } -class ModerationResponder : public LLHTTPClient::Responder -{ -public: - ModerationResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - - if ( gIMMgr ) - { - //403 == you're not a mod - //should be disabled if you're not a moderator - if ( 403 == status ) - { - gIMMgr->showSessionEventError( - "mute", - "not_a_mod_error", - mSessionID); - } - else - { - gIMMgr->showSessionEventError( - "mute", - "generic_request_error", - mSessionID); - } - } - } - -private: - LLUUID mSessionID; -}; - void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) { LLPointer speakerp = findSpeaker(speaker_id); diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 8ab08661d3..671b3fb341 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -258,6 +258,8 @@ protected: void setSpeakerNotInChannel(LLSpeaker* speackerp); bool removeSpeaker(const LLUUID& speaker_id); + void updateSession(); + typedef std::map > speaker_map_t; speaker_map_t mSpeakers; -- cgit v1.2.3 From 337cd3aa9d8a8beaebd35ec6b53f09709e35a4d4 Mon Sep 17 00:00:00 2001 From: "Jeff (Gioffredo Linden)" Date: Tue, 16 Oct 2012 15:22:42 -0400 Subject: Make getValue const to fix Windows builds - and be more robust --- indra/newview/llchathistory.cpp | 2 +- indra/newview/llchathistory.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index deb658c489..821d1f4685 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -596,7 +596,7 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) mEditor = LLUICtrlFactory::create(editor_params, this); } -LLSD LLChatHistory::getValue() +const LLSD LLChatHistory::getValue() { LLSD* text=new LLSD(); text->assign(mEditor->getText()); diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index effdd75911..b65d222b53 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -103,7 +103,7 @@ class LLChatHistory : public LLUICtrl public: ~LLChatHistory(); - LLSD getValue(); + const LLSD getValue(); void initFromParams(const Params&); /** -- cgit v1.2.3 From 86c3a45b6749387991064df6a42b1d046bd9d4d8 Mon Sep 17 00:00:00 2001 From: "Jeff (Gioffredo Linden)" Date: Tue, 16 Oct 2012 16:08:25 -0400 Subject: Move const kw location --- indra/newview/llchathistory.cpp | 2 +- indra/newview/llchathistory.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 821d1f4685..c61a8c8562 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -596,7 +596,7 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) mEditor = LLUICtrlFactory::create(editor_params, this); } -const LLSD LLChatHistory::getValue() +LLSD LLChatHistory::getValue() const { LLSD* text=new LLSD(); text->assign(mEditor->getText()); diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index b65d222b53..bb6d4fb59c 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -103,7 +103,7 @@ class LLChatHistory : public LLUICtrl public: ~LLChatHistory(); - const LLSD getValue(); + LLSD getValue() const; void initFromParams(const Params&); /** -- cgit v1.2.3 From d60609e0096bc7ede9edde1ba6d103f5f860af0d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 17 Oct 2012 12:26:40 -0700 Subject: MAINT-1551 : WIP : More tests to elicit a correct answer from the backbone server --- indra/newview/llimview.cpp | 1 + indra/newview/llspeakers.cpp | 52 +++++++++++++++++++++++++++++++++++--------- indra/newview/llspeakers.h | 2 ++ 3 files changed, 45 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 398584e005..e6f93aa9be 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -238,6 +238,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& //we need to wait for session initialization for outgoing ad-hoc and group chat session //correct session id for initiated ad-hoc chat will be received from the server + // Merov : MAINT-1551 : We need to read that mInitialTargetIDs when initializing the conversation if (!LLIMModel::getInstance()->sendStartSession(mSessionID, mOtherParticipantID, mInitialTargetIDs, mType)) { diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 11d1b563ac..217efdf4af 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -307,7 +307,7 @@ public: virtual void error(U32 status, const std::string& reason) { - llinfos << "Merov debug : UpdateResponder error, status = " << status << ": " << reason << llendl; + llinfos << "Merov debug : UpdateResponder error, on " << mSessionID << ", status = " << status << ": " << reason << llendl; } private: @@ -322,8 +322,11 @@ LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) : mVoiceChannel(channelp) , mVoiceModerated(false) , mModerateModeHandledFirstTime(false) +, mSessionUpdated(false) +, mSessionID() { static LLUICachedControl remove_delay ("SpeakerParticipantRemoveDelay", 10.0); +// mSessionID = getSessionID(); mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLSpeakerMgr::removeSpeaker, this, _1), remove_delay); } @@ -547,7 +550,7 @@ void LLSpeakerMgr::updateSpeakerList() LLUUID session_id = getSessionID(); if ((mSpeakers.size() == 0) && (!session_id.isNull())) { - llinfos << "Merov debug : LLSpeakerMgr::updateSpeakerList: No speakers in " << session_id << llendl; + //llinfos << "Merov debug : LLSpeakerMgr::updateSpeakerList: No speakers in " << session_id << llendl; // MAINT-1551 : If the list is empty for too long, we should send a message to the sim so that // it sends the participant list again. updateSession(); @@ -557,21 +560,50 @@ void LLSpeakerMgr::updateSpeakerList() void LLSpeakerMgr::updateSession() { + // We perform this update if is has never been done or if the session id changed (which happens in ad-hoc sessions) + if (mSessionUpdated && (mSessionID == getSessionID())) + return; + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); LLSD data; - data["method"] = "accept invitation"; -// data["method"] = "session update"; + +// That doesn't work apparently because we are not in the invite list so we get error 500 +// data["method"] = "accept invitation"; +// data["session-id"] = getSessionID(); + +// That doesn't work because we're not a moderator on an IM session so our request is rejected as such (error 403) + data["method"] = "session update"; + data["session-id"] = getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["update_info"] = LLSD::emptyMap(); + data["params"]["update_info"]["moderated_mode"] = LLSD::emptyMap(); + data["params"]["update_info"]["moderated_mode"]["voice"] = false; + +// That doesn't work, we eventually time out (error 502)... +// data["method"] = "call"; +// data["session-id"] = getSessionID(); + + data["params"] = LLSD::emptyArray(); +// for (int i = 0; i < count; i++) +// { +// data["params"].append(ids[i]); +// } + data["params"].append(gAgentID); + data["method"] = "invite"; data["session-id"] = getSessionID(); -// data["params"] = LLSD::emptyMap(); - -// data["params"]["update_info"] = LLSD::emptyMap(); - -// data["params"]["update_info"]["moderated_mode"] = LLSD::emptyMap(); -// data["params"]["update_info"]["moderated_mode"]["voice"] = false; llinfos << "Merov debug : viewer->sim : LLSpeakerMgr::updateSession, session id = " << getSessionID() << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data, new UpdateResponder(getSessionID())); + + // bit of extra in the case of invite being sent + data.clear(); + data["method"] = "accept invitation"; + data["session-id"] = getSessionID(); + LLHTTPClient::post(url, data, new UpdateResponder(getSessionID())); + + mSessionUpdated = true; + mSessionID = getSessionID(); } void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 671b3fb341..8a80c4619e 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -259,6 +259,8 @@ protected: bool removeSpeaker(const LLUUID& speaker_id); void updateSession(); + bool mSessionUpdated; + LLUUID mSessionID; typedef std::map > speaker_map_t; speaker_map_t mSpeakers; -- cgit v1.2.3 From 1006e2fd259d5f8136ca933eba8d57c8a980bf31 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 17 Oct 2012 17:14:44 -0700 Subject: CHUI-422 : Update the ad-hoc conversation with the known list of on line agents without waiting for server message (which often doesn't come...). --- indra/newview/llavataractions.cpp | 3 -- indra/newview/lleventpoll.cpp | 42 +++++++----------- indra/newview/llimview.cpp | 3 +- indra/newview/llspeakers.cpp | 92 ++++++--------------------------------- indra/newview/llspeakers.h | 4 -- 5 files changed, 32 insertions(+), 112 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 600df31c8b..7322b3bb0b 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -303,9 +303,6 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float } LLIMFloater::show(session_id); -// gIMMgr->processAgentListUpdates(session_id, LLSD()); -// gIMMgr->startCall(session_id,LLVoiceChannel::OUTGOING_CALL); -// gIMMgr->endCall(session_id); make_ui_sound("UISndStartIM"); } diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 27f79dda2c..4f4d9a40b4 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -37,7 +37,6 @@ #include "llviewerregion.h" #include "message.h" #include "lltrans.h" -#include "llsdserialize.h" namespace { @@ -110,14 +109,14 @@ namespace const std::string& pollURL, const LLHost& sender) { LLHTTPClient::ResponderPtr result = new LLEventPollResponder(pollURL, sender); - llinfos << "Merov debug : LLEventPollResponder::start <" << sCount << "> " + llinfos << "LLEventPollResponder::start <" << sCount << "> " << pollURL << llendl; return result; } void LLEventPollResponder::stop() { - llinfos << "Merov debug : LLEventPollResponder::stop <" << mCount << "> " + llinfos << "LLEventPollResponder::stop <" << mCount << "> " << mPollURL << llendl; // there should be a way to stop a LLHTTPClient request in progress mDone = true; @@ -135,17 +134,17 @@ namespace LLViewerRegion *regionp = gAgent.getRegion(); if (!regionp) { - llinfos << "Merov debug : LLEventPoll initialized before region is added." << llendl; + llerrs << "LLEventPoll initialized before region is added." << llendl; } mSender = sender.getIPandPort(); - llinfos << "Merov debug : LLEventPoll initialized with sender " << mSender << llendl; + llinfos << "LLEventPoll initialized with sender " << mSender << llendl; makeRequest(); } LLEventPollResponder::~LLEventPollResponder() { stop(); - llinfos << "Merov debug : LLEventPollResponder::~Impl <" << mCount << "> " + lldebugs << "LLEventPollResponder::~Impl <" << mCount << "> " << mPollURL << llendl; } @@ -155,13 +154,11 @@ namespace const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { - llinfos << "Merov debug : LLEventPollResponder::completedRaw url <" << mPollURL << ">, status = " << status << ", reason = " << reason << llendl; if (status == HTTP_BAD_GATEWAY) { // These errors are not parsable as LLSD, // which LLHTTPClient::Responder::completedRaw will try to do. - //completed(status, reason, LLSD()); - error(status, reason); + completed(status, reason, LLSD()); } else { @@ -175,12 +172,8 @@ namespace request["ack"] = mAcknowledge; request["done"] = mDone; - llinfos << "Merov debug : viewer->sim : LLEventPollResponder::makeRequest <" << mCount - << "> ack = " << LLSDXMLStreamer(mAcknowledge) - << ", error = " << mErrorCount - << ", sender = " << mSender - << ", url = " << mPollURL - << ", done = " << mDone << llendl; + lldebugs << "LLEventPollResponder::makeRequest <" << mCount << "> ack = " + << LLSDXMLStreamer(mAcknowledge) << llendl; LLHTTPClient::post(mPollURL, request, this); } @@ -190,16 +183,13 @@ namespace LLSD message; message["sender"] = mSender; message["body"] = content["body"]; - llinfos << "Merov debug : sim->viewer : LLEventPollResponder::handleMessage, msg_name = " << msg_name << ", message = " << LLSDOStreamer(message) << llendl; LLMessageSystem::dispatch(msg_name, message); } //virtual void LLEventPollResponder::error(U32 status, const std::string& reason) { - llinfos << "Merov debug : LLEventPollResponder::error, status = " << status << ", reason = " << reason << llendl; if (mDone) return; - llinfos << "Merov debug : LLEventPollResponder::error, status = " << status << ", reason = " << reason << llendl; // A HTTP_BAD_GATEWAY (502) error is our standard timeout response // we get this when there are no events. @@ -217,11 +207,11 @@ namespace + mErrorCount * EVENT_POLL_ERROR_RETRY_SECONDS_INC , this); - llinfos << "Merov debug : Unexpected HTTP error. status: " << status << ", reason: " << reason << llendl; + llwarns << "Unexpected HTTP error. status: " << status << ", reason: " << reason << llendl; } else { - llinfos << "Merov debug : LLEventPollResponder::error: <" << mCount << "> got " + llwarns << "LLEventPollResponder::error: <" << mCount << "> got " << status << ": " << reason << (mDone ? " -- done" : "") << llendl; stop(); @@ -237,7 +227,7 @@ namespace // continue running. if(gAgent.getRegion() && gAgent.getRegion()->getHost().getIPandPort() == mSender) { - llinfos << "Merov debug : Forcing disconnect due to stalled main region event poll." << llendl; + llwarns << "Forcing disconnect due to stalled main region event poll." << llendl; LLAppViewer::instance()->forceDisconnect(LLTrans::getString("AgentLostConnection")); } } @@ -246,8 +236,8 @@ namespace //virtual void LLEventPollResponder::result(const LLSD& content) { - llinfos << "Merov debug : LLEventPollResponder::result <" << mCount << "> " - << (mDone ? " -- done" : "") << ", content = " << LLSDOStreamer(content) << llendl; + lldebugs << "LLEventPollResponder::result <" << mCount << ">" + << (mDone ? " -- done" : "") << llendl; if (mDone) return; @@ -256,7 +246,7 @@ namespace if (!content.get("events") || !content.get("id")) { - llinfos << "Merov debug : received event poll with no events or id key" << llendl; + llwarns << "received event poll with no events or id key" << llendl; makeRequest(); return; } @@ -266,11 +256,11 @@ namespace if(mAcknowledge.isUndefined()) { - llinfos << "Merov debug : LLEventPollResponder: id undefined" << llendl; + llwarns << "LLEventPollResponder: id undefined" << llendl; } // was llinfos but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG - llinfos << "Merov debug : LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " + lldebugs << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " << LLSDXMLStreamer(mAcknowledge) << ")" << llendl; LLSD::array_const_iterator i = events.beginArray(); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e6f93aa9be..b5f22731f1 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -238,7 +238,6 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& //we need to wait for session initialization for outgoing ad-hoc and group chat session //correct session id for initiated ad-hoc chat will be received from the server - // Merov : MAINT-1551 : We need to read that mInitialTargetIDs when initializing the conversation if (!LLIMModel::getInstance()->sendStartSession(mSessionID, mOtherParticipantID, mInitialTargetIDs, mType)) { @@ -1301,6 +1300,7 @@ bool LLIMModel::sendStartSession( else if ( dialog == IM_SESSION_CONFERENCE_START ) { LLSD agents; + agents.append(gAgent.getID()); for (int i = 0; i < (S32) ids.size(); i++) { agents.append(ids[i]); @@ -1319,6 +1319,7 @@ bool LLIMModel::sendStartSession( data["params"] = agents; llinfos << "Merov debug : viewer-> sim : LLIMModel::sendStartSession, session id = " << temp_session_id << ", data = " << LLSDOStreamer(data) << llendl; + llinfos << "Merov debug : Extra info for LLIMModel::sendStartSession, other_participant_id = " << other_participant_id << ", agent id = " << gAgent.getID() << llendl; LLHTTPClient::post( url, data, diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 217efdf4af..64477765e1 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -36,7 +36,6 @@ #include "llviewerobjectlist.h" #include "llvoavatar.h" #include "llworld.h" -#include "llsdserialize.h" const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f); const LLColor4 ACTIVE_COLOR(0.5f, 0.5f, 0.5f, 1.f); @@ -297,23 +296,6 @@ private: LLUUID mSessionID; }; -class UpdateResponder : public LLHTTPClient::Responder -{ -public: - UpdateResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llinfos << "Merov debug : UpdateResponder error, on " << mSessionID << ", status = " << status << ": " << reason << llendl; - } - -private: - LLUUID mSessionID; -}; - // // LLSpeakerMgr // @@ -322,11 +304,8 @@ LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) : mVoiceChannel(channelp) , mVoiceModerated(false) , mModerateModeHandledFirstTime(false) -, mSessionUpdated(false) -, mSessionID() { static LLUICachedControl remove_delay ("SpeakerParticipantRemoveDelay", 10.0); -// mSessionID = getSessionID(); mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLSpeakerMgr::removeSpeaker, this, _1), remove_delay); } @@ -348,7 +327,6 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin mSpeakers.insert(std::make_pair(speakerp->mID, speakerp)); mSpeakersSorted.push_back(speakerp); LL_DEBUGS("Speakers") << "Added speaker " << id << llendl; - //llinfos << "Merov debug : setSpeaker, add, id = " << id << ", name = " << name << llendl; fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "add"); } else @@ -369,7 +347,6 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin } else { - llinfos << "Merov debug : setSpeaker, speaker not found? id = " << id << ", name = " << name << llendl; LL_WARNS("Speakers") << "Speaker " << id << " not found" << llendl; } } @@ -550,62 +527,24 @@ void LLSpeakerMgr::updateSpeakerList() LLUUID session_id = getSessionID(); if ((mSpeakers.size() == 0) && (!session_id.isNull())) { - //llinfos << "Merov debug : LLSpeakerMgr::updateSpeakerList: No speakers in " << session_id << llendl; - // MAINT-1551 : If the list is empty for too long, we should send a message to the sim so that - // it sends the participant list again. - updateSession(); + // If the list is empty, we update it with whatever was used to initiate the call so that it doesn't stay empty too long. + // *TODO: Fix the server side code that sometimes forgets to send back the list of agents after a chat started + // (IOW, fix why we get no ChatterBoxSessionAgentListUpdates message after the initial ChatterBoxSessionStartReply) + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();it!=session->mInitialTargetIDs.end();++it) + { + // We only add avatars that are on line + if (LLAvatarTracker::instance().isBuddyOnline(*it)) + { + setSpeaker(*it, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + } + } + // Also add the current agent + setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); } } } -void LLSpeakerMgr::updateSession() -{ - // We perform this update if is has never been done or if the session id changed (which happens in ad-hoc sessions) - if (mSessionUpdated && (mSessionID == getSessionID())) - return; - - std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); - LLSD data; - -// That doesn't work apparently because we are not in the invite list so we get error 500 -// data["method"] = "accept invitation"; -// data["session-id"] = getSessionID(); - -// That doesn't work because we're not a moderator on an IM session so our request is rejected as such (error 403) - data["method"] = "session update"; - data["session-id"] = getSessionID(); - data["params"] = LLSD::emptyMap(); - data["params"]["update_info"] = LLSD::emptyMap(); - data["params"]["update_info"]["moderated_mode"] = LLSD::emptyMap(); - data["params"]["update_info"]["moderated_mode"]["voice"] = false; - -// That doesn't work, we eventually time out (error 502)... -// data["method"] = "call"; -// data["session-id"] = getSessionID(); - - data["params"] = LLSD::emptyArray(); -// for (int i = 0; i < count; i++) -// { -// data["params"].append(ids[i]); -// } - data["params"].append(gAgentID); - data["method"] = "invite"; - data["session-id"] = getSessionID(); - - llinfos << "Merov debug : viewer->sim : LLSpeakerMgr::updateSession, session id = " << getSessionID() << ", data = " << LLSDOStreamer(data) << llendl; - - LLHTTPClient::post(url, data, new UpdateResponder(getSessionID())); - - // bit of extra in the case of invite being sent - data.clear(); - data["method"] = "accept invitation"; - data["session-id"] = getSessionID(); - LLHTTPClient::post(url, data, new UpdateResponder(getSessionID())); - - mSessionUpdated = true; - mSessionID = getSessionID(); -} - void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) { speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; @@ -872,7 +811,6 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) //current value represents ability to type, so invert data["params"]["mute_info"]["text"] = !speakerp->mModeratorMutedText; - llinfos << "Merov debug : viewer->sim : LLIMSpeakerMgr::toggleAllowTextChat, session id = " << getSessionID() << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data, new ModerationResponder(getSessionID())); } @@ -897,7 +835,6 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu data["params"]["mute_info"] = LLSD::emptyMap(); data["params"]["mute_info"]["voice"] = !unmute; - llinfos << "Merov debug : viewer->sim : LLIMSpeakerMgr::moderateVoiceParticipant, session id = " << getSessionID() << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -940,7 +877,6 @@ void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallo data["params"]["update_info"]["moderated_mode"] = LLSD::emptyMap(); data["params"]["update_info"]["moderated_mode"]["voice"] = disallow_voice; - llinfos << "Merov debug : viewer->sim : LLIMSpeakerMgr::moderateVoiceSession, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data, new ModerationResponder(session_id)); } diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 8a80c4619e..8ab08661d3 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -258,10 +258,6 @@ protected: void setSpeakerNotInChannel(LLSpeaker* speackerp); bool removeSpeaker(const LLUUID& speaker_id); - void updateSession(); - bool mSessionUpdated; - LLUUID mSessionID; - typedef std::map > speaker_map_t; speaker_map_t mSpeakers; -- cgit v1.2.3 From 1cd3c8408fb485792cf20a73156b0fd43f0d90cc Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 17 Oct 2012 17:45:29 -0700 Subject: CHUI-422 : Clean up of leftover traces and tests --- indra/newview/llimfloater.cpp | 4 +--- indra/newview/llimview.cpp | 9 --------- indra/newview/llvoicechannel.cpp | 1 - 3 files changed, 1 insertion(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 47e091a57c..467f48600a 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -59,7 +59,6 @@ #include "llviewerchat.h" #include "llnotificationmanager.h" #include "llautoreplace.h" -#include "llsdserialize.h" floater_showed_signal_t LLIMFloater::sIMFloaterShowedSignal; @@ -1209,12 +1208,11 @@ BOOL LLIMFloater::inviteToSession(const uuid_vec_t& ids) } data["method"] = "invite"; data["session-id"] = mSessionID; - llinfos << "Merov debug : viewer->sim : LLIMFloater::inviteToSession, session id = " << mSessionID << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data,new LLSessionInviteResponder(mSessionID)); } else { - llinfos << "Merov debug : LLIMFloater::inviteToSession -" + llinfos << "LLIMFloater::inviteToSession -" << " no need to invite agents for " << mDialog << llendl; // successful add, because everyone that needed to get added diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b5f22731f1..b45903835a 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -63,7 +63,6 @@ #include "lltoolbarview.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" -#include "llsdserialize.h" const static std::string ADHOC_NAME_SUFFIX(" Conference"); @@ -1300,7 +1299,6 @@ bool LLIMModel::sendStartSession( else if ( dialog == IM_SESSION_CONFERENCE_START ) { LLSD agents; - agents.append(gAgent.getID()); for (int i = 0; i < (S32) ids.size(); i++) { agents.append(ids[i]); @@ -1318,8 +1316,6 @@ bool LLIMModel::sendStartSession( data["params"] = agents; - llinfos << "Merov debug : viewer-> sim : LLIMModel::sendStartSession, session id = " << temp_session_id << ", data = " << LLSDOStreamer(data) << llendl; - llinfos << "Merov debug : Extra info for LLIMModel::sendStartSession, other_participant_id = " << other_participant_id << ", agent id = " << gAgent.getID() << llendl; LLHTTPClient::post( url, data, @@ -2257,7 +2253,6 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload LLSD data; data["method"] = "accept invitation"; data["session-id"] = session_id; - llinfos << "Merov debug : viewer-> sim : LLIncomingCallDialog::processCallResponse, accept, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -2298,7 +2293,6 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload LLSD data; data["method"] = "decline invitation"; data["session-id"] = session_id; - llinfos << "Merov debug : viewer-> sim : LLIncomingCallDialog::processCallResponse, decline, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -2352,7 +2346,6 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) LLSD data; data["method"] = "accept invitation"; data["session-id"] = session_id; - llinfos << "Merov debug : viewer-> sim : inviteUserResponse, accept, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -2388,7 +2381,6 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) LLSD data; data["method"] = "decline invitation"; data["session-id"] = session_id; - llinfos << "Merov debug : viewer-> sim : inviteUserResponse, decline, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, @@ -3353,7 +3345,6 @@ public: LLSD data; data["method"] = "accept invitation"; data["session-id"] = session_id; - llinfos << "Merov debug : viewer-> sim : LLViewerChatterBoxInvitation, session id = " << session_id << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post( url, data, diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 62a43333dd..38f9bbc67f 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -540,7 +540,6 @@ void LLVoiceChannelGroup::getChannelInfo() LLSD data; data["method"] = "call"; data["session-id"] = mSessionID; - llinfos << "Merov debug : viewer-> sim : LLVoiceChannelGroup::getChannelInfo, session id = " << mSessionID << ", data = " << LLSDOStreamer(data) << llendl; LLHTTPClient::post(url, data, new LLVoiceCallCapResponder(mSessionID)); -- cgit v1.2.3 From e56145176875a09dc9e1524a47bcc1259582c896 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 17 Oct 2012 18:14:37 -0700 Subject: CHUI-422 : One last clean up --- indra/newview/llvoicechannel.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 38f9bbc67f..ceff75a0cc 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -35,7 +35,6 @@ #include "llrecentpeople.h" #include "llviewercontrol.h" #include "llvoicechannel.h" -#include "llsdserialize.h" LLVoiceChannel::voice_channel_map_t LLVoiceChannel::sVoiceChannelMap; -- cgit v1.2.3 From c0b60841ce14a1c449ede17284d2aa6939322be3 Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Thu, 18 Oct 2012 16:50:40 +0300 Subject: CHUI-412 (User restricted in resizing conversation floater width) fixed --- indra/newview/llimfloatercontainer.cpp | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index c9c7e94af9..8a6659667d 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -286,32 +286,21 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID& id) // virtual void LLIMFloaterContainer::computeResizeLimits(S32& new_min_width, S32& new_min_height) { - bool is_left_pane_expanded = !mConversationsPane->isCollapsed(); - bool is_right_pane_expanded = !mMessagesPane->isCollapsed(); - - S32 conversations_pane_min_dim = mConversationsPane->getMinDim(); - - if (is_right_pane_expanded) + // possibly increase floater's minimum height according to children's minimums + for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) { - S32 conversations_pane_width = - (is_left_pane_expanded ? gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") : conversations_pane_min_dim); - - // possibly increase minimum size constraint due to children's minimums. - for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) + LLFloater* floaterp = dynamic_cast(mTabContainer->getPanelByIndex(tab_idx)); + if (floaterp) { - LLFloater* floaterp = dynamic_cast(mTabContainer->getPanelByIndex(tab_idx)); - if (floaterp) - { - new_min_width = llmax(new_min_width, - floaterp->getMinWidth() + conversations_pane_width + LLPANEL_BORDER_WIDTH * 2); - new_min_height = llmax(new_min_height, floaterp->getMinHeight()); - } + new_min_height = llmax(new_min_height, floaterp->getMinHeight()); } } - else - { - new_min_width = conversations_pane_min_dim; - } + + S32 conversations_pane_min_dim = mConversationsPane->getRelevantMinDim(); + S32 messages_pane_min_dim = mMessagesPane->getRelevantMinDim(); + + // set floater's minimum width according to relevant minimal children's dimensionals + new_min_width = conversations_pane_min_dim + messages_pane_min_dim + LLPANEL_BORDER_WIDTH*2; } void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) -- cgit v1.2.3