aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-08-29 17:37:15 -0700
committerMcCabe Maxsted2010-08-29 17:37:15 -0700
commit252d0124288c71d8c0a9cf2ee8cf69eb895e769a (patch)
treea5580eb7926ae1f44c9be75570e10296068d5b37 /linden
parentPotential fix for a crash in llfontgl (diff)
downloadmeta-impy-252d0124288c71d8c0a9cf2ee8cf69eb895e769a.zip
meta-impy-252d0124288c71d8c0a9cf2ee8cf69eb895e769a.tar.gz
meta-impy-252d0124288c71d8c0a9cf2ee8cf69eb895e769a.tar.bz2
meta-impy-252d0124288c71d8c0a9cf2ee8cf69eb895e769a.tar.xz
Added 'Inventory' log control stuff from Snowglobe
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/app_settings/logcontrol.xml1
-rw-r--r--linden/indra/newview/llinventorybridge.cpp2
-rw-r--r--linden/indra/newview/llinventorymodel.cpp63
3 files changed, 41 insertions, 25 deletions
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml
index 4e0b582..d59f07d 100644
--- a/linden/indra/newview/app_settings/logcontrol.xml
+++ b/linden/indra/newview/app_settings/logcontrol.xml
@@ -54,6 +54,7 @@
54 <!--<string>BodyPhysics</string>--> 54 <!--<string>BodyPhysics</string>-->
55 <!--<string>InitInfo</string>--> 55 <!--<string>InitInfo</string>-->
56 <!--<string>isOwnedSelf</string>--> 56 <!--<string>isOwnedSelf</string>-->
57 <!--<string>Inventory</string>-->
57 <!--<string>HUDEffect</string>--> 58 <!--<string>HUDEffect</string>-->
58 <!--<string>MarkerFile</string>--> 59 <!--<string>MarkerFile</string>-->
59 <!--<string>MediaImpl</string>--> 60 <!--<string>MediaImpl</string>-->
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index ebbccfe..4a5ad67 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -3945,7 +3945,7 @@ protected:
3945 } 3945 }
3946 else 3946 else
3947 { 3947 {
3948 llwarns << "Dropping unhandled LLWearAttachments" << llendl; 3948 llwarns << "Dropping unhandled LLWearAttachmentsCallback" << llendl;
3949 } 3949 }
3950 } 3950 }
3951private: 3951private:
diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp
index 5a6a26b..aaaa1dd 100644
--- a/linden/indra/newview/llinventorymodel.cpp
+++ b/linden/indra/newview/llinventorymodel.cpp
@@ -1050,8 +1050,12 @@ void LLInventoryModel::mock(const LLUUID& root_id)
1050*/ 1050*/
1051 1051
1052//If we get back a normal response, handle it here 1052//If we get back a normal response, handle it here
1053// Note: this is the responder used in "fetchInventory" cap,
1054// this is not responder for "WebFetchInventoryDescendents" or "agent/inventory" cap
1055
1053void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) 1056void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
1054{ 1057{
1058 LL_DEBUGS("Inventory") << " fetch http got " << ll_pretty_print_sd(content) << LL_ENDL; // OGPX
1055 start_new_inventory_observer(); 1059 start_new_inventory_observer();
1056 1060
1057 /*LLUUID agent_id; 1061 /*LLUUID agent_id;
@@ -1117,8 +1121,8 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
1117//If we get back an error (not found, etc...), handle it here 1121//If we get back an error (not found, etc...), handle it here
1118void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::string& reason) 1122void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::string& reason)
1119{ 1123{
1120 llinfos << "fetchInventory::error " 1124 LL_INFOS("Inventory") << "fetchInventory::error "
1121 << status << ": " << reason << llendl; 1125 << status << ": " << reason << LL_ENDL;
1122 gInventory.notifyObservers("fetchinventory"); 1126 gInventory.notifyObservers("fetchinventory");
1123} 1127}
1124 1128
@@ -1169,8 +1173,10 @@ class fetchDescendentsResponder: public LLHTTPClient::Responder
1169}; 1173};
1170 1174
1171//If we get back a normal response, handle it here 1175//If we get back a normal response, handle it here
1176// Note: this is the handler for WebFetchInventoryDescendents and agent/inventory caps
1172void fetchDescendentsResponder::result(const LLSD& content) 1177void fetchDescendentsResponder::result(const LLSD& content)
1173{ 1178{
1179 LL_DEBUGS("Inventory") << " fetch descendents got " << ll_pretty_print_sd(content) << LL_ENDL; // OGPX
1174 if (content.has("folders")) 1180 if (content.has("folders"))
1175 { 1181 {
1176 1182
@@ -1277,8 +1283,8 @@ void fetchDescendentsResponder::result(const LLSD& content)
1277 LLSD folder_sd = *folder_it; 1283 LLSD folder_sd = *folder_it;
1278 1284
1279 //These folders failed on the dataserver. We probably don't want to retry them. 1285 //These folders failed on the dataserver. We probably don't want to retry them.
1280 llinfos << "Folder " << folder_sd["folder_id"].asString() 1286 LL_INFOS("Inventory") << "Folder " << folder_sd["folder_id"].asString()
1281 << "Error: " << folder_sd["error"].asString() << llendl; 1287 << "Error: " << folder_sd["error"].asString() << LL_ENDL;
1282 } 1288 }
1283 } 1289 }
1284 1290
@@ -1286,7 +1292,7 @@ void fetchDescendentsResponder::result(const LLSD& content)
1286 1292
1287 if (LLInventoryModel::isBulkFetchProcessingComplete()) 1293 if (LLInventoryModel::isBulkFetchProcessingComplete())
1288 { 1294 {
1289 llinfos << "Inventory fetch completed" << llendl; 1295 LL_INFOS("Inventory") << "Inventory fetch completed" << LL_ENDL;
1290 if (LLInventoryModel::sFullFetchStarted) 1296 if (LLInventoryModel::sFullFetchStarted)
1291 { 1297 {
1292 LLInventoryModel::sAllFoldersFetched = TRUE; 1298 LLInventoryModel::sAllFoldersFetched = TRUE;
@@ -1300,8 +1306,8 @@ void fetchDescendentsResponder::result(const LLSD& content)
1300//If we get back an error (not found, etc...), handle it here 1306//If we get back an error (not found, etc...), handle it here
1301void fetchDescendentsResponder::error(U32 status, const std::string& reason) 1307void fetchDescendentsResponder::error(U32 status, const std::string& reason)
1302{ 1308{
1303 llinfos << "fetchDescendentsResponder::error " 1309 LL_INFOS("Inventory") << "fetchDescendentsResponder::error "
1304 << status << ": " << reason << llendl; 1310 << status << ": " << reason << LL_ENDL;
1305 1311
1306 LLInventoryModel::incrBulkFetch(-1); 1312 LLInventoryModel::incrBulkFetch(-1);
1307 1313
@@ -1386,7 +1392,12 @@ void LLInventoryModel::bulkFetch(std::string url)
1386 folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; 1392 folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted;
1387 folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; 1393 folder_sd["fetch_items"] = (LLSD::Boolean)TRUE;
1388 1394
1389 if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) 1395 LL_DEBUGS("Inventory") << " fetching "<<cat->getUUID()<<" with cat owner "<<cat->getOwnerID()<<" and agent" << gAgent.getID() << LL_ENDL;
1396 //OGPX if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID())
1397 // for OGP it really doesnt make sense to have the decision about whether to fetch
1398 // from the library or user cap be determined by a hard coded UUID.
1399 // if it isnt an item that belongs to the agent, then fetch from the library
1400 if (gAgent.getID() != cat->getOwnerID()) //if i am not the owner, it must be in the library
1390 body_lib["folders"].append(folder_sd); 1401 body_lib["folders"].append(folder_sd);
1391 else 1402 else
1392 body["folders"].append(folder_sd); 1403 body["folders"].append(folder_sd);
@@ -1417,11 +1428,13 @@ void LLInventoryModel::bulkFetch(std::string url)
1417 sBulkFetchCount++; 1428 sBulkFetchCount++;
1418 if (body["folders"].size()) 1429 if (body["folders"].size())
1419 { 1430 {
1431 LL_DEBUGS("Inventory") << " fetch descendents post to " << url << ": " << ll_pretty_print_sd(body) << LL_ENDL; // OGPX
1420 LLHTTPClient::post(url, body, new fetchDescendentsResponder(body),300.0); 1432 LLHTTPClient::post(url, body, new fetchDescendentsResponder(body),300.0);
1421 } 1433 }
1422 if (body_lib["folders"].size()) 1434 if (body_lib["folders"].size())
1423 { 1435 {
1424 std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); 1436 std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents");
1437 LL_DEBUGS("Inventory") << " fetch descendents lib post: " << ll_pretty_print_sd(body_lib) << LL_ENDL; // OGPX
1425 LLHTTPClient::post(url_lib, body_lib, new fetchDescendentsResponder(body_lib),300.0); 1438 LLHTTPClient::post(url_lib, body_lib, new fetchDescendentsResponder(body_lib),300.0);
1426 } 1439 }
1427 sFetchTimer.reset(); 1440 sFetchTimer.reset();
@@ -1516,7 +1529,7 @@ void LLInventoryModel::backgroundFetch(void*)
1516 // no more categories to fetch, stop fetch process 1529 // no more categories to fetch, stop fetch process
1517 if (sFetchQueue.empty()) 1530 if (sFetchQueue.empty())
1518 { 1531 {
1519 llinfos << "Inventory fetch completed" << llendl; 1532 LL_INFOS("Inventory") << "Inventory fetch completed" << LL_ENDL;
1520 if (sFullFetchStarted) 1533 if (sFullFetchStarted)
1521 { 1534 {
1522 sAllFoldersFetched = TRUE; 1535 sAllFoldersFetched = TRUE;
@@ -1532,7 +1545,7 @@ void LLInventoryModel::backgroundFetch(void*)
1532 // double timeouts on failure 1545 // double timeouts on failure
1533 sMinTimeBetweenFetches = llmin(sMinTimeBetweenFetches * 2.f, 10.f); 1546 sMinTimeBetweenFetches = llmin(sMinTimeBetweenFetches * 2.f, 10.f);
1534 sMaxTimeBetweenFetches = llmin(sMaxTimeBetweenFetches * 2.f, 120.f); 1547 sMaxTimeBetweenFetches = llmin(sMaxTimeBetweenFetches * 2.f, 120.f);
1535 llinfos << "Inventory fetch times grown to (" << sMinTimeBetweenFetches << ", " << sMaxTimeBetweenFetches << ")" << llendl; 1548 LL_INFOS("Inventory") << "Inventory fetch times grown to (" << sMinTimeBetweenFetches << ", " << sMaxTimeBetweenFetches << ")" << LL_ENDL;
1536 // fetch is no longer considered "timely" although we will wait for full time-out 1549 // fetch is no longer considered "timely" although we will wait for full time-out
1537 sTimelyFetchPending = FALSE; 1550 sTimelyFetchPending = FALSE;
1538 } 1551 }
@@ -2078,9 +2091,9 @@ bool LLInventoryModel::loadSkeleton(
2078 categories.clear(); // will unref and delete entries 2091 categories.clear(); // will unref and delete entries
2079 } 2092 }
2080 2093
2081 llinfos << "Successfully loaded " << cached_category_count 2094 LL_DEBUGS("Inventory") << "Successfully loaded " << cached_category_count
2082 << " categories and " << cached_item_count << " items from cache." 2095 << " categories and " << cached_item_count << " items from cache."
2083 << llendl; 2096 << LL_ENDL;
2084 2097
2085 return rv; 2098 return rv;
2086} 2099}
@@ -2238,7 +2251,7 @@ void LLInventoryModel::buildParentChildMap()
2238 // which would be (folder_id, new_parent_id) to be sent up 2251 // which would be (folder_id, new_parent_id) to be sent up
2239 // to the server. 2252 // to the server.
2240 llinfos << "Lost categroy: " << cat->getUUID() << " - " 2253 llinfos << "Lost categroy: " << cat->getUUID() << " - "
2241 << cat->getName() << llendl; 2254 << cat->getName() << " with parent:" << cat->getParentUUID() << llendl;
2242 ++lost; 2255 ++lost;
2243 // plop it into the lost & found. 2256 // plop it into the lost & found.
2244 LLAssetType::EType pref = cat->getPreferredType(); 2257 LLAssetType::EType pref = cat->getPreferredType();
@@ -2366,6 +2379,8 @@ void LLInventoryModel::buildParentChildMap()
2366 mIsAgentInvUsable = true; 2379 mIsAgentInvUsable = true;
2367 } 2380 }
2368 } 2381 }
2382 llinfos << " finished buildParentChildMap " << llendl;
2383 // dumpInventory(); // enable this if debugging inventory or appearance issues OGPX
2369} 2384}
2370 2385
2371struct LLUUIDAndName 2386struct LLUUIDAndName
@@ -3188,37 +3203,37 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**)
3188// *NOTE: DEBUG functionality 3203// *NOTE: DEBUG functionality
3189void LLInventoryModel::dumpInventory() 3204void LLInventoryModel::dumpInventory()
3190{ 3205{
3191 llinfos << "\nBegin Inventory Dump\n**********************:" << llendl; 3206 LL_DEBUGS("Inventory") << "\nBegin Inventory Dump\n**********************:" << LL_ENDL;
3192 llinfos << "mCategroy[] contains " << mCategoryMap.size() << " items." << llendl; 3207 LL_DEBUGS("Inventory") << "mCategroy[] contains " << mCategoryMap.size() << " items." << LL_ENDL;
3193 for(cat_map_t::iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit) 3208 for(cat_map_t::iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit)
3194 { 3209 {
3195 LLViewerInventoryCategory* cat = cit->second; 3210 LLViewerInventoryCategory* cat = cit->second;
3196 if(cat) 3211 if(cat)
3197 { 3212 {
3198 llinfos << " " << cat->getUUID() << " '" << cat->getName() << "' " 3213 LL_DEBUGS("Inventory") << " " << cat->getUUID() << " '" << cat->getName() << "' "
3199 << cat->getVersion() << " " << cat->getDescendentCount() 3214 << cat->getVersion() << " " << cat->getDescendentCount() << " parent: " << cat->getParentUUID()
3200 << llendl; 3215 << LL_ENDL;
3201 } 3216 }
3202 else 3217 else
3203 { 3218 {
3204 llinfos << " NULL!" << llendl; 3219 LL_DEBUGS("Inventory") << " NULL!" << LL_ENDL;
3205 } 3220 }
3206 } 3221 }
3207 llinfos << "mItemMap[] contains " << mItemMap.size() << " items." << llendl; 3222 LL_DEBUGS("Inventory") << "mItemMap[] contains " << mItemMap.size() << " items." << LL_ENDL;
3208 for(item_map_t::iterator iit = mItemMap.begin(); iit != mItemMap.end(); ++iit) 3223 for(item_map_t::iterator iit = mItemMap.begin(); iit != mItemMap.end(); ++iit)
3209 { 3224 {
3210 LLViewerInventoryItem* item = iit->second; 3225 LLViewerInventoryItem* item = iit->second;
3211 if(item) 3226 if(item)
3212 { 3227 {
3213 llinfos << " " << item->getUUID() << " " 3228 LL_DEBUGS("Inventory") << " " << item->getUUID() << " "
3214 << item->getName() << llendl; 3229 << item->getName() << LL_ENDL;
3215 } 3230 }
3216 else 3231 else
3217 { 3232 {
3218 llinfos << " NULL!" << llendl; 3233 LL_DEBUGS("Inventory") << " NULL!" << LL_ENDL;
3219 } 3234 }
3220 } 3235 }
3221 llinfos << "\n**********************\nEnd Inventory Dump" << llendl; 3236 LL_DEBUGS("Inventory") << "\n**********************\nEnd Inventory Dump" << LL_ENDL;
3222} 3237}
3223 3238
3224///---------------------------------------------------------------------------- 3239///----------------------------------------------------------------------------