diff -r 88cf7d9a9d31 indra/newview/llinventoryobserver.cpp --- a/indra/newview/llinventoryobserver.cpp Thu Sep 22 08:52:21 2011 -0400 +++ b/indra/newview/llinventoryobserver.cpp Mon Oct 10 16:58:20 2011 -0700 @@ -202,6 +202,7 @@ 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 @@ 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 @@ for (S32 i=0; i= body[i].size()) continue; + + 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 @@ // 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;