From 89482e614a337069905a4f77300e280b3e19fe9e Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sun, 25 Dec 2011 13:15:21 +0100 Subject: disable voice if ParcelVoiceInfoRequest response is malformed. Seen (empty LLSD) in OSGrid Mumble Sandbox. Without a "voice_credentials" key the client never connects to the server, but would retry in vain to do so. Note to OpenSim devs: the "channel_uri" of the ParcelVoiceInfoRequest response is parsed to identify if we are connecting to a mumble server on parcel change. The presence of "sip:" within the uri is interpreted as connecting to vivox/freeswitch, the absence as connecting to a mumble server. However it would be much better to add a "server_type" key to the response, which could hold a string like "mumble", "freeswitch", etc - the absence would indicate connecting to a legacy(like) voice server. Additional note: to detect a mumble server also of the VoiceAccountProvision response the voice_account_server_uri is parsed: If the uri starts with tcp:// the "mumble" client is loaded(by default, you can change it in the "VoiceModuleMumble" debug setting), for any other scheme "SLVoice" (default, "VoiceModuleVivox" debug setting). --- linden/indra/newview/llvoiceclient.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linden/indra') diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 07d2fa9..3cf15fc 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -1051,6 +1051,11 @@ void LLVoiceClientCapResponder::result(const LLSD& content) gVoiceClient->setSpatialChannel(uri, credentials, mResponseID); } + else + { + llwarns << "ParcelVoiceInfoRequest response malformed, disabling voice." << llendl; + gVoiceClient->close(); + } } @@ -1771,11 +1776,13 @@ void LLVoiceClient::close() { LL_DEBUGS("VoiceSession") << "Cancel Session: LLVoiceClient::close() called." << llendl; + mAccountActive = false; setState(stateDisableCleanup); } void LLVoiceClient::start() { + mAccountActive = true; setState(stateStart); } @@ -7207,6 +7214,11 @@ class LLViewerParcelVoiceInfo : public LLHTTPNode gVoiceClient->setPIRCapResponseID(response_id); gVoiceClient->setSpatialChannel(uri, credentials, response_id); } + else + { + llwarns << "ParcelVoiceInfoRequest response malformed, disabling voice." << llendl; + gVoiceClient->close(); + } } } }; -- cgit v1.1 From 56a7ba61f631924e36c779f7efcabfd755c4beb2 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 10 Jan 2012 22:39:31 +0100 Subject: New inventory categrory capability code - needs testing. * Original code from: https://bitbucket.org/lindenlab/viewer-development/changeset/d327dcc8ae51 * Port by Henri Beauchamp: https://lists.secondlife.com/pipermail/opensource-dev/2012-January/008544.html * 3 Lines of debug by /me (find the Hippos -remove after testing) --- linden/indra/newview/llfloateropenobject.cpp | 76 +++++++++++++++----- linden/indra/newview/llfloateropenobject.h | 15 ++++ linden/indra/newview/llinventorybridge.cpp | 18 +++-- linden/indra/newview/llinventorymodel.cpp | 103 ++++++++++++++++++++++++++- linden/indra/newview/llinventorymodel.h | 8 ++- linden/indra/newview/llviewerregion.cpp | 1 + 6 files changed, 192 insertions(+), 29 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llfloateropenobject.cpp b/linden/indra/newview/llfloateropenobject.cpp index fc483dd..4190c3e 100644 --- a/linden/indra/newview/llfloateropenobject.cpp +++ b/linden/indra/newview/llfloateropenobject.cpp @@ -155,29 +155,71 @@ void LLFloaterOpenObject::moveToInventory(bool wear) { parent_category_id = gAgent.getInventoryRootID(); } + + LLCategoryCreate* cat_data = new LLCategoryCreate(object_id, wear); LLUUID category_id = gInventory.createNewCategory(parent_category_id, - LLAssetType::AT_NONE, - name); - - LLCatAndWear* data = new LLCatAndWear; - data->mCatID = category_id; - data->mWear = wear; - - // Copy and/or move the items into the newly created folder. - // Ignore any "you're going to break this item" messages. - BOOL success = move_inv_category_world_to_agent(object_id, category_id, TRUE, - callbackMoveInventory, - (void*)data); - if (!success) - { - delete data; - data = NULL; + LLAssetType::AT_NONE, + name, + callbackCreateInventoryCategory, + (void*)cat_data); + - LLNotifications::instance().add("OpenObjectCannotCopy"); + // If we get a null category ID, we are using a capability in + // createNewCategory and we will handle the following in the + // callbackCreateInventoryCategory routine. + if (category_id.notNull()) + { + delete cat_data; + + LLCatAndWear* data = new LLCatAndWear; + data->mCatID = category_id; + data->mWear = wear; + data->mFolderResponded = false; + + // Copy and/or move the items into the newly created folder. + // Ignore any "you're going to break this item" messages. + BOOL success = move_inv_category_world_to_agent(object_id, category_id, TRUE, + callbackMoveInventory, + (void*)data); + if (!success) + { + delete data; + data = NULL; + + LLNotifications::instance().add("OpenObjectCannotCopy"); + } } } // static +void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLSD& result, void* data) +{ + LLCategoryCreate* cat_data = (LLCategoryCreate*)data; + + LLUUID category_id = result["folder_id"].asUUID(); + LLCatAndWear* wear_data = new LLCatAndWear; + + wear_data->mCatID = category_id; + wear_data->mWear = cat_data->mWear; + wear_data->mFolderResponded = true; + + // Copy and/or move the items into the newly created folder. + // Ignore any "you're going to break this item" messages. + + BOOL success = move_inv_category_world_to_agent(cat_data->mObjectID, category_id, TRUE, + callbackMoveInventory, + (void*)wear_data); + if (!success) + { + delete wear_data; + wear_data = NULL; + + LLNotifications::instance().add("OpenObjectCannotCopy"); + } + delete cat_data; + } + +// static void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data) { LLCatAndWear* cat = (LLCatAndWear*)data; diff --git a/linden/indra/newview/llfloateropenobject.h b/linden/indra/newview/llfloateropenobject.h index 27653a5..4b89158 100644 --- a/linden/indra/newview/llfloateropenobject.h +++ b/linden/indra/newview/llfloateropenobject.h @@ -50,10 +50,24 @@ public: static void show(); static void dirty(); + class LLCategoryCreate + { + public: + LLCategoryCreate(LLUUID object_id, bool wear) + : mObjectID(object_id), + mWear(wear) + {} + + public: + LLUUID mObjectID; + bool mWear; + }; + struct LLCatAndWear { LLUUID mCatID; bool mWear; + bool mFolderResponded; }; protected: @@ -67,6 +81,7 @@ protected: static void onClickMoveToInventory(void* data); static void onClickMoveAndWear(void* data); + static void callbackCreateInventoryCategory(const LLSD& result, void* data); static void callbackMoveInventory(S32 result, void* data); static void* createPanelInventory(void* data); diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index f71df2d..bd08773 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp @@ -1610,18 +1610,21 @@ void LLRightClickInventoryFetchDescendentsObserver::done() class LLInventoryCopyAndWearObserver : public LLInventoryObserver { public: - LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count) :mCatID(cat_id), mContentsCount(count), mFolderAdded(FALSE) {} + LLInventoryCopyAndWearObserver(const LLUUID& cat_id, + int count, + bool folder_added = false) + : mCatID(cat_id), + mContentsCount(count), + mFolderAdded(FALSE) {} virtual ~LLInventoryCopyAndWearObserver() {} virtual void changed(U32 mask); protected: LLUUID mCatID; int mContentsCount; - BOOL mFolderAdded; + bool mFolderAdded; }; - - void LLInventoryCopyAndWearObserver::changed(U32 mask) { if((mask & (LLInventoryObserver::ADD)) != 0) @@ -2331,13 +2334,16 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response if(option == 0 && object) { - if (cat_and_wear && cat_and_wear->mWear) + if (cat_and_wear && cat_and_wear->mWear) // && !cat_and_wear->mFolderResponded) { InventoryObjectList inventory_objects; object->getInventoryContents(inventory_objects); int contents_count = inventory_objects.size()-1; //subtract one for containing folder - LLInventoryCopyAndWearObserver* inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, contents_count); + LLInventoryCopyAndWearObserver* inventoryObserver; + inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, + contents_count, + cat_and_wear->mFolderResponded); gInventory.addObserver(inventoryObserver); } diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index 58a2bdc..0200ed0 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp @@ -396,13 +396,63 @@ LLUUID LLInventoryModel::findCategoryByName(std::string name) return LLUUID::null; } +class LLCreateInventoryCategoryResponder : public LLHTTPClient::Responder +{ +public: + LLCreateInventoryCategoryResponder(LLInventoryModel* model, + void (*callback)(const LLSD&, void*), + void* user_data) + : mModel(model), + mCallback(callback), + mData(user_data) + { + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << "CreateInventoryCategory failed. status = " << status + << ", reason = \"" << reason << "\"" << llendl; + } + + virtual void result(const LLSD& content) + { + // Server has created folder. + + LLUUID category_id = content["folder_id"].asUUID(); + + // Add the category to the internal representation + LLPointer cat; + cat = new LLViewerInventoryCategory(category_id, + content["parent_id"].asUUID(), + (LLAssetType::EType)content["type"].asInteger(), + content["name"].asString(), + gAgent.getID()); + cat->setVersion(LLViewerInventoryCategory::VERSION_INITIAL); + cat->setDescendentCount(0); + LLInventoryModel::LLCategoryUpdate update(cat->getParentUUID(), 1); + mModel->accountForUpdate(update); + mModel->updateCategory(cat); + + if (mCallback && mData) + { + mCallback(content, mData); + } + } + +private: + void (*mCallback)(const LLSD&, void*); + void* mData; + LLInventoryModel* mModel; +}; + // Convenience function to create a new category. You could call // updateCategory() with a newly generated UUID category, but this // version will take care of details like what the name should be // based on preferred type. Returns the UUID of the new category. LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, - LLAssetType::EType preferred_type, - const std::string& pname) + LLAssetType::EType preferred_type, const std::string& pname, + void (*callback)(const LLSD&, void*), + void* user_data) { LLUUID id; if(!isInventoryUsable()) @@ -433,6 +483,53 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, name.assign(NEW_CATEGORY_NAME); } + if (callback && user_data) // callback required for acked message. + { + + + LLViewerRegion* viewer_region = gAgent.getRegion(); + if (!viewer_region->capabilitiesReceived())//awfixme + { + LL_DEBUGS("Inventory") << "HIPPOS! not capabilitiesReceived()" << LL_ENDL; + } + std::string url; + if (viewer_region) + { + url = viewer_region->getCapability("CreateInventoryCategory"); + } + + if (!url.empty()) + { + LL_DEBUGS("Inventory") << "Using the CreateInventoryCategory capability." << LL_ENDL; + // Let's use the new capability. + LLSD request, body; + body["folder_id"] = id; + body["parent_id"] = parent_id; + body["type"] = (LLSD::Integer) preferred_type; + body["name"] = name; + + request["message"] = "CreateInventoryCategory"; + request["payload"] = body; + + LLHTTPClient::post(url, body, + new LLCreateInventoryCategoryResponder(this, + callback, + user_data)); + return LLUUID::null; + } + else//awfixme + { + LL_DEBUGS("Inventory") << "HIPPOS! cap url empty" << LL_ENDL; + } + } + else//awfixme + { + LL_DEBUGS("Inventory") << "HIPPOS! callback: " + << (callback ? "true" : "false") + << "user_data" << ((NULL!= user_data) ? "!NULL" : "NULL") + << LL_ENDL; + } + // Add the category to the internal representation LLPointer cat = new LLViewerInventoryCategory(id, parent_id, preferred_type, name, gAgent.getID()); @@ -3173,7 +3270,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) // << titem->getParentUUID() << llendl; U32 callback_id; msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id); - if(titem->getUUID().notNull()) + if (titem->getUUID().notNull()) // && callback_id.notNull()) { items.push_back(titem); cblist.push_back(InventoryCallbackInfo(callback_id, titem->getUUID())); diff --git a/linden/indra/newview/llinventorymodel.h b/linden/indra/newview/llinventorymodel.h index 7222c60..7788c34 100644 --- a/linden/indra/newview/llinventorymodel.h +++ b/linden/indra/newview/llinventorymodel.h @@ -308,9 +308,11 @@ public: // based on preferred type. Returns the UUID of the new // category. If you want to use the default name based on type, // pass in a NULL to the 'name parameter. - LLUUID createNewCategory(const LLUUID& parent_id, - LLAssetType::EType preferred_type, - const std::string& name); + LLUUID createNewCategory(const LLUUID& parent_id, + LLAssetType::EType preferred_type, + const std::string& name, + void (*callback)(const LLSD&, void*) = NULL, + void* user_data = NULL); LLUUID findCategoryByName(std::string name); diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp index a43e0c0..2fafe30 100644 --- a/linden/indra/newview/llviewerregion.cpp +++ b/linden/indra/newview/llviewerregion.cpp @@ -1428,6 +1428,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) LLSD capabilityNames = LLSD::emptyArray(); capabilityNames.append("ChatSessionRequest"); capabilityNames.append("CopyInventoryFromNotecard"); + capabilityNames.append("CreateInventoryCategory"); // Aurora settings -- MC capabilityNames.append("DispatchOpenRegionSettings"); capabilityNames.append("DispatchRegionInfo"); -- cgit v1.1 From 691ddf19bccdc221ad7e12e5399b0b52e13d14de Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Wed, 11 Jan 2012 15:02:55 +0100 Subject: Followup of the last commit (also Henri Beauchamp) --- linden/indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index bd08773..eb2170a 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp @@ -1615,7 +1615,7 @@ public: bool folder_added = false) : mCatID(cat_id), mContentsCount(count), - mFolderAdded(FALSE) {} + mFolderAdded(folder_added) {} virtual ~LLInventoryCopyAndWearObserver() {} virtual void changed(U32 mask); -- cgit v1.1 From b2bc53937f427f6ff7864f9c5d13e4e197e7d4b6 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Fri, 20 Jan 2012 11:59:46 +0100 Subject: fix 3 possible memleaks in the new inventory code --- linden/indra/newview/llfloateropenobject.cpp | 5 ++++ linden/indra/newview/llinventorymodel.cpp | 36 ++++++++++++++++++---------- 2 files changed, 28 insertions(+), 13 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llfloateropenobject.cpp b/linden/indra/newview/llfloateropenobject.cpp index 4190c3e..3e672b5 100644 --- a/linden/indra/newview/llfloateropenobject.cpp +++ b/linden/indra/newview/llfloateropenobject.cpp @@ -195,6 +195,11 @@ void LLFloaterOpenObject::moveToInventory(bool wear) void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLSD& result, void* data) { LLCategoryCreate* cat_data = (LLCategoryCreate*)data; + if (result.has("failure") and result["failure"]) + { + delete cat_data; + return; + } LLUUID category_id = result["folder_id"].asUUID(); LLCatAndWear* wear_data = new LLCatAndWear; diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index 0200ed0..dc216e3 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp @@ -60,6 +60,7 @@ #include "llvoavatar.h" #include "llsdutil.h" #include +#include "llfloateropenobject.h" // [RLVa:KB] #include "rlvhandler.h" @@ -454,17 +455,25 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, void (*callback)(const LLSD&, void*), void* user_data) { + llassert_always(NULL != callback); + LLUUID id; + if(!isInventoryUsable()) { llwarns << "Inventory is broken." << llendl; - return id; - } + LLSD result; + result["failure"] = true; + callback(result, user_data); + } + if(preferred_type == LLAssetType::AT_SIMSTATE) { LL_DEBUGS("Inventory") << "Attempt to create simstate category." << LL_ENDL; - return id; + LLSD result; + result["failure"] = true; + callback(result, user_data); } id.generate(); @@ -483,15 +492,17 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, name.assign(NEW_CATEGORY_NAME); } - if (callback && user_data) // callback required for acked message. + if (user_data) // callback required for acked message. { LLViewerRegion* viewer_region = gAgent.getRegion(); - if (!viewer_region->capabilitiesReceived())//awfixme + + if (!viewer_region->capabilitiesReceived()) { - LL_DEBUGS("Inventory") << "HIPPOS! not capabilitiesReceived()" << LL_ENDL; + LL_DEBUGS("Inventory") << "We didn't get the region caps yet." << LL_ENDL; } + std::string url; if (viewer_region) { @@ -517,17 +528,16 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, user_data)); return LLUUID::null; } - else//awfixme + else { - LL_DEBUGS("Inventory") << "HIPPOS! cap url empty" << LL_ENDL; + LL_DEBUGS("Inventory") << "Cap url empty" << LL_ENDL; } } - else//awfixme + else //NULL == user_data { - LL_DEBUGS("Inventory") << "HIPPOS! callback: " - << (callback ? "true" : "false") - << "user_data" << ((NULL!= user_data) ? "!NULL" : "NULL") - << LL_ENDL; + // user_data is a LLCategoryCreate object instantiated in the calling + // function - bug (or low memory - any leaks?). + llwarns << "NULL user_data" << llendl; } // Add the category to the internal representation -- cgit v1.1 From 94505317d7b7543b8443047f00506a1d1989dc03 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 17 Feb 2012 23:56:23 -0700 Subject: Re-commented out Inventory logging --- linden/indra/newview/app_settings/logcontrol.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml index def847b..f3715c4 100644 --- a/linden/indra/newview/app_settings/logcontrol.xml +++ b/linden/indra/newview/app_settings/logcontrol.xml @@ -53,7 +53,7 @@ - Inventory + -- cgit v1.1 From b7dcec410daa68b70597758930f015a7f631f388 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 17 Feb 2012 23:59:15 -0700 Subject: Fixed tons of 'LLXMLTree invalid token' warnings spamming the log and made the warnings we show less confusing --- linden/indra/llcommon/llsdserialize_xml.cpp | 39 +++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp index dab6c1d..3545309 100644 --- a/linden/indra/llcommon/llsdserialize_xml.cpp +++ b/linden/indra/llcommon/llsdserialize_xml.cpp @@ -358,7 +358,9 @@ static unsigned get_till_eol(std::istream& input, char *buf, unsigned bufsize) char c = input.get(); buf[count++] = c; if (is_eol(c)) + { break; + } } return count; } @@ -391,14 +393,36 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) if (status == XML_STATUS_ERROR) { - std::string error_string( XML_ErrorString(XML_GetErrorCode( mParser ))); - if ("parsing aborted" != error_string )//end of input + std::string error_string(XML_ErrorString(XML_GetErrorCode( mParser ))); + if (input.gcount() == 0) + { + // nothing to do -- MC + data = LLSD(); + return LLSDParser::PARSE_FAILURE; + } + else if (error_string != "parsing aborted") // end of input { S32 line_number = XML_GetCurrentLineNumber( mParser ); - llwarns << "LLXmlTree parse failed. Line " << line_number << ": " - << error_string << llendl; + // This parses LLCurl::Responder::completedRaw always, even + // when not using XML. We have to do this little ugliness + // in order to make this error message meaningful. + // See Expat's xmlparse.c for the full list of errors -- MC + if (error_string == "not well-formed (invalid token)") + { + std::string text((char*)buffer); + if ((text.find('>') != std::string::npos) || + (text.find('<') != std::string::npos)) + { + llwarns << "LLSDXMLParser::Impl::parse error. Line " << line_number << ": " + << error_string << llendl; + } + break; + } + + llinfos << "Possible LLSDXMLParser::Impl::parse error. Line " << line_number << ": " + << error_string << llendl; } - + // Always break here -- MC break; } } @@ -417,14 +441,13 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) ((char*) buffer)[count ? count - 1 : 0] = '\0'; } - data = LLSD(); return LLSDParser::PARSE_FAILURE; } clear_eol(input); data = mResult; - return mParseCount; + return mParseCount; // why return mParseCount?! -- MC } @@ -499,7 +522,7 @@ S32 LLSDXMLParser::Impl::parseLines(std::istream& input, LLSD& data) if ("parsing aborted" != error_string )//end of input { S32 line_number = XML_GetCurrentLineNumber( mParser ); - llwarns << "LLXmlTree parse failed. Line " << line_number << ": " + llwarns << "LLSDXMLParser::Impl::parseLines failed. Line " << line_number << ": " << error_string << llendl; } return LLSDParser::PARSE_FAILURE; -- cgit v1.1 From 3b31cc0894a6f253f919d65dec5cad000b2b3ec6 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 18 Feb 2012 00:30:01 -0700 Subject: Some debugging lines for inventory skeleton loading --- linden/indra/newview/llinventorymodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linden/indra') diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index dc216e3..3f74965 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp @@ -2197,6 +2197,9 @@ bool LLInventoryModel::loadSkeleton(const LLInventoryModel::options_t& options, if (cit == temp_cats.end()) { + llwarns << "Can't load " << inventory_filename + << " because cit == temp_cats.end()" + << llendl; continue; // cache corruption?? not sure why this happens -SJB } LLViewerInventoryCategory* tcat = *cit; @@ -2205,6 +2208,9 @@ bool LLInventoryModel::loadSkeleton(const LLInventoryModel::options_t& options, // not sent down in the skeleton. if (cit == not_cached) { + llwarns << "Can't load " << inventory_filename + << " because cit == not_cached" + << llendl; continue; } -- cgit v1.1 From 3f2c71f5a5bc32c4c5c6cccece900cedcb3fae30 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 21 Jan 2012 15:05:01 -0700 Subject: Added the new ISS installer template to cmake --- linden/indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 54c1998..0871d16 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -1242,7 +1242,7 @@ set_source_files_properties(${viewer_CHARACTER_FILES} list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) if (WINDOWS) - file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) + file(GLOB viewer_INSTALLER_FILES installers/windows/*.iss) source_group("Installer Files" FILES ${viewer_INSTALLER_FILES}) -- cgit v1.1 From d44056f6d5430e4c8d139ae49783a554c4eee982 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 18 Feb 2012 01:03:43 -0700 Subject: Removed google translate since the service is no longer available --- linden/indra/newview/app_settings/settings.xml | 11 --- linden/indra/newview/llfloaterchat.cpp | 22 ------ linden/indra/newview/llfloaterchat.h | 2 - linden/indra/newview/llprefschat.cpp | 4 -- linden/indra/newview/llviewercontrol.cpp | 14 ---- linden/indra/newview/llviewermessage.cpp | 71 +------------------ linden/indra/newview/llviewermessage.h | 1 - linden/indra/newview/llwldaycycle.cpp | 6 +- .../default/xui/en-us/floater_chat_history.xml | 3 - .../default/xui/en-us/panel_preferences_chat.xml | 82 +--------------------- 10 files changed, 7 insertions(+), 209 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 439459c..2ec4832 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -7901,17 +7901,6 @@ Value default - TranslateChat - - Comment - Translate incoming chat messages - Persist - 1 - Type - Boolean - Value - 0 - LastFeatureVersion Comment diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index 1142e5c..2cca8ce 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -115,8 +115,6 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed) LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open); childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes - childSetCommitCallback("translate chat",onClickToggleTranslateChat,this); - childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat")); childSetVisible("Chat History Editor with mute",FALSE); childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); setDefaultBtn("Chat"); @@ -446,26 +444,6 @@ void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data) } } -// Update the "TranslateChat" pref after "translate chat" checkbox is toggled in -// the "Local Chat" floater. -//static -void LLFloaterChat::onClickToggleTranslateChat(LLUICtrl* caller, void *data) -{ - LLFloaterChat* floater = (LLFloaterChat*)data; - - BOOL translate_chat = floater->getChild("translate chat")->get(); - gSavedSettings.setBOOL("TranslateChat", translate_chat); -} - -// Update the "translate chat" checkbox after the "TranslateChat" pref is set in -// some other place (e.g. prefs dialog). -//static -void LLFloaterChat::updateSettings() -{ - BOOL translate_chat = gSavedSettings.getBOOL("TranslateChat"); - LLFloaterChat::getInstance(LLSD())->getChild("translate chat")->set(translate_chat); -} - BOOL checkStringInText(const std::string &text_line, std::string textToMatch) { boost::smatch what; diff --git a/linden/indra/newview/llfloaterchat.h b/linden/indra/newview/llfloaterchat.h index f8683b9..14c2242 100644 --- a/linden/indra/newview/llfloaterchat.h +++ b/linden/indra/newview/llfloaterchat.h @@ -66,7 +66,6 @@ public: virtual void onVisibilityChange(BOOL cur_visibility); virtual void setMinimized(BOOL); void updateConsoleVisibility(); - void updateSettings(); static void setHistoryCursorAndScrollToEnd(); @@ -82,7 +81,6 @@ public: static void onClickMute(void *data); static void onClickToggleShowMute(LLUICtrl* caller, void *data); - static void onClickToggleTranslateChat(LLUICtrl* caller, void *data); static void onClickToggleActiveSpeakers(void* userdata); static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata); static void loadHistory(); diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index 1cdab46..dd4df42 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp @@ -111,8 +111,6 @@ BOOL LLPrefsChatImpl::postBuild() childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect")); childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); - childSetValue("translate_language_combobox", gSavedSettings.getString("TranslateLanguage")); - childSetValue("translate_chat", gSavedSettings.getBOOL("TranslateChat")); mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect"); @@ -205,8 +203,6 @@ void LLPrefsChatImpl::apply() gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); - gSavedSettings.setString("TranslateLanguage", childGetValue("translate_language_combobox")); - gSavedSettings.setBOOL("TranslateChat", childGetValue("translate_chat")); bool chan_check = childGetValue("toggle_channel_control"); gSavedSettings.setBOOL("ChatChannelSelect", chan_check); diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 59d766f..016646e 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp @@ -511,19 +511,6 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue) return true; } -bool handleTranslateChatPrefsChanged(const LLSD& newvalue) -{ - LLFloaterChat* floaterp = LLFloaterChat::getInstance(); - - if(floaterp) - { - // update "translate chat" pref in "Local Chat" floater - floaterp->updateSettings(); - } - return true; -} - - bool handleSliderScrollWheelMultiplierChanged(const LLSD& newvalue) { LLSlider::setScrollWheelMultiplier( newvalue.asInteger() ); @@ -675,7 +662,6 @@ void settings_setup_listeners() gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1)); - gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _1)); } template <> eControlType get_control_type(const U32& in, LLSD& out) diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index cbcfb86..f0c7c0c 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -139,7 +139,6 @@ #include "llfloaterworldmap.h" #include "llviewerdisplay.h" #include "llkeythrottle.h" -#include "lltranslate.h" #include "panelradarentry.h" @@ -2805,52 +2804,6 @@ void process_decline_callingcard(LLMessageSystem* msg, void**) LLNotifications::instance().add("CallingCardDeclined"); } -class ChatTranslationReceiver : public LLTranslate::TranslationReceiver -{ -public : - ChatTranslationReceiver(const std::string &fromLang, const std::string &toLang, const LLChat &chat, - const std::string &orig_mesg, const BOOL history) - : LLTranslate::TranslationReceiver(fromLang, toLang), - m_chat(chat), - m_origMesg(orig_mesg), - m_history(history) - { - } - - static boost::intrusive_ptr build(const std::string &fromLang, const std::string &toLang, const LLChat &chat, const std::string &orig_mesg, const BOOL history) - { - return boost::intrusive_ptr(new ChatTranslationReceiver(fromLang, toLang, chat, orig_mesg, history)); - } - -protected: - void handleResponse(const std::string &translation, const std::string &detected_language) - { - // filter out non-interesting responeses - if ( !translation.empty() - && (m_toLang != detected_language) - && (LLStringUtil::compareInsensitive(translation, m_origMesg) != 0) ) - { - m_chat.mText += " (" + translation + ")"; - } - - add_floater_chat(m_chat, m_history); - } - - void handleFailure() - { - LLTranslate::TranslationReceiver::handleFailure(); - - m_chat.mText += " (?)"; - - add_floater_chat(m_chat, m_history); - } - -private: - LLChat m_chat; - std::string m_origMesg; - const BOOL m_history; -}; - void add_floater_chat(const LLChat &chat, const BOOL history) { if (history) @@ -2865,26 +2818,6 @@ void add_floater_chat(const LLChat &chat, const BOOL history) } } -void check_translate_chat(const std::string &mesg, const LLChat &chat, const BOOL history) -{ - const bool translate = gSavedSettings.getBOOL("TranslateChat"); - - if (translate && chat.mSourceType != CHAT_SOURCE_SYSTEM) - { - // fromLang hardcoded to "" (autodetection) pending implementation of - // SVC-4879 - const std::string &fromLang = ""; - const std::string &toLang = LLTranslate::getTranslateLanguage(); - - LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(fromLang, toLang, chat, mesg, history); - LLTranslate::translateMessage(result, fromLang, toLang, mesg); - } - else - { - add_floater_chat(chat, history); - } -} - void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) { LLChat chat; @@ -3304,12 +3237,12 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) && (is_linden || !is_busy || is_owned_by_me)) { // show on screen and add to history - check_translate_chat(mesg, chat, FALSE); + add_floater_chat(chat, FALSE); } else { // just add to chat history - check_translate_chat(mesg, chat, TRUE); + add_floater_chat(chat, TRUE); } } } diff --git a/linden/indra/newview/llviewermessage.h b/linden/indra/newview/llviewermessage.h index 11a3554..0201ce4 100644 --- a/linden/indra/newview/llviewermessage.h +++ b/linden/indra/newview/llviewermessage.h @@ -76,7 +76,6 @@ void process_script_question(LLMessageSystem *msg, void **user_data); void process_chat_from_simulator(LLMessageSystem *mesgsys, void **user_data); void add_floater_chat(const LLChat &chat, const BOOL history); -void check_translate_chat(const std::string &mesg, const LLChat &chat, const BOOL history); //void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data); void send_agent_update(BOOL force_send, BOOL send_reliable = FALSE); diff --git a/linden/indra/newview/llwldaycycle.cpp b/linden/indra/newview/llwldaycycle.cpp index 1d17c60..07ac2a4 100644 --- a/linden/indra/newview/llwldaycycle.cpp +++ b/linden/indra/newview/llwldaycycle.cpp @@ -51,9 +51,6 @@ LLWLDayCycle::~LLWLDayCycle() void LLWLDayCycle::loadDayCycle(const std::string & fileName) { - // clear the first few things - mTimeMap.clear(); - // now load the file std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", fileName)); @@ -62,6 +59,9 @@ void LLWLDayCycle::loadDayCycle(const std::string & fileName) llifstream day_cycle_xml(pathName); if (day_cycle_xml.is_open()) { + // clear the first few things + mTimeMap.clear(); + // load and parse it LLSD day_data(LLSD::emptyArray()); LLPointer parser = new LLSDXMLParser(); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml index e83a930..b0e70b7 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml @@ -78,9 +78,6 @@ -