summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAaron Stone <stone@lindenlab.com>2011-10-11 15:46:40 -0700
committerAaron Stone <stone@lindenlab.com>2011-10-11 15:46:40 -0700
commit0d66c6870406578819465033a9e312c8e4eaad43 (patch)
tree0587a48336b46ac00740daf4e36516f9135b21ec /indra
parent852349218e5cfdd48a1a64c672e9663aab716031 (diff)
EXP-625 No longer stuck as a cloud on initial login by fixing logic around fetching library items from the Inventory capabilities.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventoryobserver.cpp19
-rw-r--r--indra/newview/llstartup.cpp16
2 files changed, 24 insertions, 11 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index ceba4a0191..9db175ec2e 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -202,6 +202,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
void fetch_items_from_llsd(const LLSD& items_llsd)
{
if (!items_llsd.size() || gDisconnected) return;
+
LLSD body;
body[0]["cap_name"] = "FetchInventory2";
body[1]["cap_name"] = "FetchLib2";
@@ -212,7 +213,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
body[0]["items"].append(items_llsd[i]);
continue;
}
- if (items_llsd[i]["owner_id"].asString() == ALEXANDRIA_LINDEN_ID.asString())
+ else if (items_llsd[i]["owner_id"].asString() == ALEXANDRIA_LINDEN_ID.asString())
{
body[1]["items"].append(items_llsd[i]);
continue;
@@ -221,19 +222,23 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
for (S32 i=0; i<body.size(); i++)
{
- if(!gAgent.getRegion())
+ if (!gAgent.getRegion())
{
- llwarns<<"Agent's region is null"<<llendl;
+ llwarns << "Agent's region is null" << llendl;
break;
}
- if (0 >= body[i].size()) continue;
- std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString());
+ if (0 == body[i]["items"].size()) {
+ lldebugs << "Skipping body with no items to fetch" << llendl;
+ continue;
+ }
+
+ std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString());
if (!url.empty())
{
body[i]["agent_id"] = gAgent.getID();
LLHTTPClient::post(url, body[i], new LLInventoryModel::fetchInventoryResponder(body[i]));
- break;
+ continue;
}
LLMessageSystem* msg = gMessageSystem;
@@ -303,7 +308,7 @@ void LLInventoryFetchItemsObserver::startFetch()
// It's incomplete, so put it on the incomplete container, and
// pack this on the message.
mIncomplete.push_back(*it);
-
+
// Prepare the data to fetch
LLSD item_entry;
item_entry["owner_id"] = owner_id;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 749acea6c1..de2afac0b8 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2480,7 +2480,7 @@ void LLStartUp::copyLibraryGestures(const std::string& same_gender_gestures)
void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
const std::string& gender_name )
{
- llinfos << "starting" << llendl;
+ lldebugs << "starting" << llendl;
// Not going through the processAgentInitialWearables path, so need to set this here.
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
@@ -2491,11 +2491,13 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
std::string same_gender_gestures;
if (gender_name == "male")
{
+ lldebugs << "male" << llendl;
gender = OPT_MALE;
same_gender_gestures = MALE_GESTURES_FOLDER;
}
else
{
+ lldebugs << "female" << llendl;
gender = OPT_FEMALE;
same_gender_gestures = FEMALE_GESTURES_FOLDER;
}
@@ -2507,6 +2509,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
outfit_folder_name);
if (cat_id.isNull())
{
+ lldebugs << "standard wearables" << llendl;
gAgentWearables.createStandardWearables(gender);
}
else
@@ -2517,26 +2520,31 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
bool do_append = false;
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
LLAppearanceMgr::instance().wearInventoryCategory(cat, do_copy, do_append);
+ lldebugs << "initial outfit category id: " << cat_id << llendl;
}
// Copy gestures
copyLibraryGestures(same_gender_gestures);
-
+
// This is really misnamed -- it means we have started loading
// an outfit/shape that will give the avatar a gender eventually. JC
gAgent.setGenderChosen(TRUE);
-
}
//static
void LLStartUp::saveInitialOutfit()
{
- if (sInitialOutfit.empty()) return;
+ if (sInitialOutfit.empty()) {
+ lldebugs << "sInitialOutfit is empty" << llendl;
+ return;
+ }
if (sWearablesLoadedCon.connected())
{
+ lldebugs << "sWearablesLoadedCon is connected, disconnecting" << llendl;
sWearablesLoadedCon.disconnect();
}
+ lldebugs << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << llendl;
LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false);
}