From be1fa962dffd9601d65b480ddd2bb09c70ad5f89 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 9 Jun 2015 15:36:10 -0700 Subject: Removed dead code, llsdmessage, llcapabilitylistener and the associated tests. --- indra/newview/llviewerinventory.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'indra/newview/llviewerinventory.cpp') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index d112118082..9a20dea2aa 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1750,27 +1750,20 @@ void copy_inventory_from_notecard(const LLUUID& destination_id, return; } - // check capability to prevent a crash while LL_ERRS in LLCapabilityListener::capListener. See EXT-8459. - std::string url = viewer_region->getCapability("CopyInventoryFromNotecard"); - if (url.empty()) - { - LL_WARNS(LOG_NOTECARD) << "There is no 'CopyInventoryFromNotecard' capability" - << " for region: " << viewer_region->getName() - << LL_ENDL; - return; - } - - LLSD request, body; + LLSD body; body["notecard-id"] = notecard_inv_id; body["object-id"] = object_id; body["item-id"] = src->getUUID(); body["folder-id"] = destination_id; body["callback-id"] = (LLSD::Integer)callback_id; - request["message"] = "CopyInventoryFromNotecard"; - request["payload"] = body; - - viewer_region->getCapAPI().post(request); + /// *TODO: RIDER: This posts the request under the agents policy. + /// When I convert the inventory over this call should be moved under that + /// policy as well. + if (!gAgent.requestPostCapability("CopyInventoryFromNotecard", body)) + { + LL_WARNS() << "SIM does not have the capability to copy from notecard." << LL_ENDL; + } } void create_new_item(const std::string& name, -- cgit v1.2.3 From 96d04a050b4eee3fc0e0728043d5aa960d06eb9e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 30 Jul 2015 16:13:56 -0700 Subject: Added patchAndYield to httputil adapter Converted All AISv3 commands (except copyLibrary) to coro model. --- indra/newview/llviewerinventory.cpp | 55 +++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerinventory.cpp') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index f6db5d5d77..19254c0e23 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -79,6 +79,15 @@ static const char * const LOG_INV("Inventory"); static const char * const LOG_LOCAL("InventoryLocalize"); static const char * const LOG_NOTECARD("copy_inventory_from_notecard"); +#if 1 +// temp code in transition +void doInventoryCb(LLPointer cb, LLUUID id) +{ + if (cb.notNull()) + cb->fire(id); +} +#endif + ///---------------------------------------------------------------------------- /// Helper class to store special inventory item names and their localized values. ///---------------------------------------------------------------------------- @@ -1255,8 +1264,13 @@ void link_inventory_array(const LLUUID& category, { LLSD new_inventory = LLSD::emptyMap(); new_inventory["links"] = links; - LLPointer cmd_ptr = new CreateInventoryCommand(category, new_inventory, cb); - ais_ran = cmd_ptr->run_command(); +#if 1 + AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); + AISAPI::CreateInventoryCommand(category, new_inventory, compl); +#else + LLPointer cmd_ptr = new CreateInventoryCommand(category, new_inventory, cb); + ais_ran = cmd_ptr->run_command(); +#endif } if (!ais_ran) @@ -1331,8 +1345,13 @@ void update_inventory_item( updates.erase("shadow_id"); updates["hash_id"] = update_item->getTransactionID(); } +#if 1 + AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); + AISAPI::UpdateItemCommand(item_id, updates, compl); +#else LLPointer cmd_ptr = new UpdateItemCommand(item_id, updates, cb); ais_ran = cmd_ptr->run_command(); +#endif } if (!ais_ran) { @@ -1373,8 +1392,13 @@ void update_inventory_item( bool ais_ran = false; if (AISCommand::isAPIAvailable()) { +#if 1 + AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); + AISAPI::UpdateItemCommand(item_id, updates, compl); +#else LLPointer cmd_ptr = new UpdateItemCommand(item_id, updates, cb); ais_ran = cmd_ptr->run_command(); +#endif } if (!ais_ran) { @@ -1429,8 +1453,13 @@ void update_inventory_category( if (AISCommand::isAPIAvailable()) { LLSD new_llsd = new_cat->asLLSD(); +#if 1 + AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); + AISAPI::UpdateCategoryCommand(cat_id, new_llsd, compl); +#else LLPointer cmd_ptr = new UpdateCategoryCommand(cat_id, new_llsd, cb); cmd_ptr->run_command(); +#endif } else // no cap { @@ -1494,8 +1523,13 @@ void remove_inventory_item( LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << obj->getName() << LL_ENDL; if (AISCommand::isAPIAvailable()) { +#if 1 + AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); + AISAPI::RemoveItemCommand(item_id, compl); +#else LLPointer cmd_ptr = new RemoveItemCommand(item_id, cb); cmd_ptr->run_command(); +#endif if (immediate_delete) { @@ -1570,8 +1604,13 @@ void remove_inventory_category( } if (AISCommand::isAPIAvailable()) { +#if 1 + AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); + AISAPI::RemoveCategoryCommand(cat_id, compl); +#else LLPointer cmd_ptr = new RemoveCategoryCommand(cat_id, cb); cmd_ptr->run_command(); +#endif } else // no cap { @@ -1673,8 +1712,13 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) { if (AISCommand::isAPIAvailable()) { - LLPointer cmd_ptr = new PurgeDescendentsCommand(id, cb); +#if 1 + AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); + AISAPI::PurgeDescendentsCommand(id, compl); +#else + LLPointer cmd_ptr = new PurgeDescendentsCommand(id, cb); cmd_ptr->run_command(); +#endif } else // no cap { @@ -1825,8 +1869,13 @@ void slam_inventory_folder(const LLUUID& folder_id, { LL_DEBUGS(LOG_INV) << "using AISv3 to slam folder, id " << folder_id << " new contents: " << ll_pretty_print_sd(contents) << LL_ENDL; +#if 1 + AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); + AISAPI::SlamFolderCommand(folder_id, contents, compl); +#else LLPointer cmd_ptr = new SlamFolderCommand(folder_id, contents, cb); cmd_ptr->run_command(); +#endif } else // no cap { -- cgit v1.2.3 From 42d03f24bf04ef10c9f29d3b5f53dc6f4b9101fa Mon Sep 17 00:00:00 2001 From: rider Date: Fri, 31 Jul 2015 11:14:53 -0700 Subject: Mystery solved! compl is a keyword... who knew! --- indra/newview/llviewerinventory.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'indra/newview/llviewerinventory.cpp') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 19254c0e23..81ea91a661 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1265,8 +1265,8 @@ void link_inventory_array(const LLUUID& category, LLSD new_inventory = LLSD::emptyMap(); new_inventory["links"] = links; #if 1 - AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); - AISAPI::CreateInventoryCommand(category, new_inventory, compl); + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::CreateInventoryCommand(category, new_inventory, cr); #else LLPointer cmd_ptr = new CreateInventoryCommand(category, new_inventory, cb); ais_ran = cmd_ptr->run_command(); @@ -1346,8 +1346,8 @@ void update_inventory_item( updates["hash_id"] = update_item->getTransactionID(); } #if 1 - AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); - AISAPI::UpdateItemCommand(item_id, updates, compl); + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::UpdateItemCommand(item_id, updates, cr); #else LLPointer cmd_ptr = new UpdateItemCommand(item_id, updates, cb); ais_ran = cmd_ptr->run_command(); @@ -1393,8 +1393,8 @@ void update_inventory_item( if (AISCommand::isAPIAvailable()) { #if 1 - AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); - AISAPI::UpdateItemCommand(item_id, updates, compl); + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::UpdateItemCommand(item_id, updates, cr); #else LLPointer cmd_ptr = new UpdateItemCommand(item_id, updates, cb); ais_ran = cmd_ptr->run_command(); @@ -1454,8 +1454,8 @@ void update_inventory_category( { LLSD new_llsd = new_cat->asLLSD(); #if 1 - AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); - AISAPI::UpdateCategoryCommand(cat_id, new_llsd, compl); + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::UpdateCategoryCommand(cat_id, new_llsd, cr); #else LLPointer cmd_ptr = new UpdateCategoryCommand(cat_id, new_llsd, cb); cmd_ptr->run_command(); @@ -1524,8 +1524,8 @@ void remove_inventory_item( if (AISCommand::isAPIAvailable()) { #if 1 - AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); - AISAPI::RemoveItemCommand(item_id, compl); + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::RemoveItemCommand(item_id, cr); #else LLPointer cmd_ptr = new RemoveItemCommand(item_id, cb); cmd_ptr->run_command(); @@ -1605,8 +1605,8 @@ void remove_inventory_category( if (AISCommand::isAPIAvailable()) { #if 1 - AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); - AISAPI::RemoveCategoryCommand(cat_id, compl); + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::RemoveCategoryCommand(cat_id, cr); #else LLPointer cmd_ptr = new RemoveCategoryCommand(cat_id, cb); cmd_ptr->run_command(); @@ -1713,8 +1713,8 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) if (AISCommand::isAPIAvailable()) { #if 1 - AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); - AISAPI::PurgeDescendentsCommand(id, compl); + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::PurgeDescendentsCommand(id, cr); #else LLPointer cmd_ptr = new PurgeDescendentsCommand(id, cb); cmd_ptr->run_command(); @@ -1870,8 +1870,8 @@ void slam_inventory_folder(const LLUUID& folder_id, LL_DEBUGS(LOG_INV) << "using AISv3 to slam folder, id " << folder_id << " new contents: " << ll_pretty_print_sd(contents) << LL_ENDL; #if 1 - AISAPI::completion_t compl = boost::bind(&doInventoryCb, cb, _1); - AISAPI::SlamFolderCommand(folder_id, contents, compl); + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::SlamFolderCommand(folder_id, contents, cr); #else LLPointer cmd_ptr = new SlamFolderCommand(folder_id, contents, cb); cmd_ptr->run_command(); -- cgit v1.2.3 From 248d61fe0eadd128c7704e37922ba7fdef35d630 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 12 Aug 2015 16:32:49 -0700 Subject: MAINT-5500: Finish converting the AIS responders to the new coroutine model, Cleaned up dead an unused code. MAINT-4952: Added COPY and MOVE methods to Core:Http adapter --- indra/newview/llviewerinventory.cpp | 84 ++++++++++--------------------------- 1 file changed, 21 insertions(+), 63 deletions(-) (limited to 'indra/newview/llviewerinventory.cpp') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 729af3c8ed..ac19d84a5e 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -80,6 +80,7 @@ static const char * const LOG_LOCAL("InventoryLocalize"); static const char * const LOG_NOTECARD("copy_inventory_from_notecard"); #if 1 +// *TODO$: LLInventoryCallback should be deprecated to conform to the new boost::bind/coroutine model. // temp code in transition void doInventoryCb(LLPointer cb, LLUUID id) { @@ -1289,21 +1290,14 @@ void link_inventory_array(const LLUUID& category, #endif } - bool ais_ran = false; - if (AISCommand::isAPIAvailable()) + if (AISAPI::isAvailable()) { LLSD new_inventory = LLSD::emptyMap(); new_inventory["links"] = links; -#if 1 AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); - AISAPI::CreateInventoryCommand(category, new_inventory, cr); -#else - LLPointer cmd_ptr = new CreateInventoryCommand(category, new_inventory, cb); - ais_ran = cmd_ptr->run_command(); -#endif + AISAPI::CreateInventory(category, new_inventory, cr); } - - if (!ais_ran) + else { LLMessageSystem* msg = gMessageSystem; for (LLSD::array_iterator iter = links.beginArray(); iter != links.endArray(); ++iter ) @@ -1360,8 +1354,7 @@ void update_inventory_item( LLPointer cb) { const LLUUID& item_id = update_item->getUUID(); - bool ais_ran = false; - if (AISCommand::isAPIAvailable()) + if (AISAPI::isAvailable()) { LLSD updates = update_item->asLLSD(); // Replace asset_id and/or shadow_id with transaction_id (hash_id) @@ -1375,15 +1368,10 @@ void update_inventory_item( updates.erase("shadow_id"); updates["hash_id"] = update_item->getTransactionID(); } -#if 1 AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); - AISAPI::UpdateItemCommand(item_id, updates, cr); -#else - LLPointer cmd_ptr = new UpdateItemCommand(item_id, updates, cb); - ais_ran = cmd_ptr->run_command(); -#endif + AISAPI::UpdateItem(item_id, updates, cr); } - if (!ais_ran) + else { LLPointer obj = gInventory.getItem(item_id); LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << (update_item ? update_item->getName() : "(NOT FOUND)") << LL_ENDL; @@ -1419,18 +1407,12 @@ void update_inventory_item( const LLSD& updates, LLPointer cb) { - bool ais_ran = false; - if (AISCommand::isAPIAvailable()) + if (AISAPI::isAvailable()) { -#if 1 AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); - AISAPI::UpdateItemCommand(item_id, updates, cr); -#else - LLPointer cmd_ptr = new UpdateItemCommand(item_id, updates, cb); - ais_ran = cmd_ptr->run_command(); -#endif + AISAPI::UpdateItem(item_id, updates, cr); } - if (!ais_ran) + else { LLPointer obj = gInventory.getItem(item_id); LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << LL_ENDL; @@ -1480,16 +1462,11 @@ void update_inventory_category( LLPointer new_cat = new LLViewerInventoryCategory(obj); new_cat->fromLLSD(updates); // FIXME - restore this once the back-end work has been done. - if (AISCommand::isAPIAvailable()) + if (AISAPI::isAvailable()) { LLSD new_llsd = new_cat->asLLSD(); -#if 1 AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); - AISAPI::UpdateCategoryCommand(cat_id, new_llsd, cr); -#else - LLPointer cmd_ptr = new UpdateCategoryCommand(cat_id, new_llsd, cb); - cmd_ptr->run_command(); -#endif + AISAPI::UpdateCategory(cat_id, new_llsd, cr); } else // no cap { @@ -1551,15 +1528,10 @@ void remove_inventory_item( { const LLUUID item_id(obj->getUUID()); LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << obj->getName() << LL_ENDL; - if (AISCommand::isAPIAvailable()) + if (AISAPI::isAvailable()) { -#if 1 AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); - AISAPI::RemoveItemCommand(item_id, cr); -#else - LLPointer cmd_ptr = new RemoveItemCommand(item_id, cb); - cmd_ptr->run_command(); -#endif + AISAPI::RemoveItem(item_id, cr); if (immediate_delete) { @@ -1632,15 +1604,10 @@ void remove_inventory_category( LLNotificationsUtil::add("CannotRemoveProtectedCategories"); return; } - if (AISCommand::isAPIAvailable()) + if (AISAPI::isAvailable()) { -#if 1 AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); - AISAPI::RemoveCategoryCommand(cat_id, cr); -#else - LLPointer cmd_ptr = new RemoveCategoryCommand(cat_id, cb); - cmd_ptr->run_command(); -#endif + AISAPI::RemoveCategory(cat_id, cr); } else // no cap { @@ -1740,15 +1707,10 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) } else { - if (AISCommand::isAPIAvailable()) + if (AISAPI::isAvailable()) { -#if 1 AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); - AISAPI::PurgeDescendentsCommand(id, cr); -#else - LLPointer cmd_ptr = new PurgeDescendentsCommand(id, cb); - cmd_ptr->run_command(); -#endif + AISAPI::PurgeDescendents(id, cr); } else // no cap { @@ -1895,17 +1857,13 @@ void slam_inventory_folder(const LLUUID& folder_id, const LLSD& contents, LLPointer cb) { - if (AISCommand::isAPIAvailable()) + if (AISAPI::isAvailable()) { LL_DEBUGS(LOG_INV) << "using AISv3 to slam folder, id " << folder_id << " new contents: " << ll_pretty_print_sd(contents) << LL_ENDL; -#if 1 + AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); - AISAPI::SlamFolderCommand(folder_id, contents, cr); -#else - LLPointer cmd_ptr = new SlamFolderCommand(folder_id, contents, cb); - cmd_ptr->run_command(); -#endif + AISAPI::SlamFolder(folder_id, contents, cr); } else // no cap { -- cgit v1.2.3 From 02c3262ac8e7f27b0effb546ad235e103c9581cf Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 28 Aug 2015 10:05:15 -0700 Subject: MAINT-5574: Added default parameter for callbalk on AISAPI interface. Better check on callback exsit in coroutine Don't create AISAPI::completion_t if there is no call back passed. --- indra/newview/llviewerinventory.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/llviewerinventory.cpp') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index ac19d84a5e..573791aca3 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1294,7 +1294,7 @@ void link_inventory_array(const LLUUID& category, { LLSD new_inventory = LLSD::emptyMap(); new_inventory["links"] = links; - AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::CreateInventory(category, new_inventory, cr); } else @@ -1368,7 +1368,7 @@ void update_inventory_item( updates.erase("shadow_id"); updates["hash_id"] = update_item->getTransactionID(); } - AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::UpdateItem(item_id, updates, cr); } else @@ -1409,7 +1409,7 @@ void update_inventory_item( { if (AISAPI::isAvailable()) { - AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::UpdateItem(item_id, updates, cr); } else @@ -1465,7 +1465,7 @@ void update_inventory_category( if (AISAPI::isAvailable()) { LLSD new_llsd = new_cat->asLLSD(); - AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::UpdateCategory(cat_id, new_llsd, cr); } else // no cap @@ -1530,7 +1530,7 @@ void remove_inventory_item( LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << obj->getName() << LL_ENDL; if (AISAPI::isAvailable()) { - AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::RemoveItem(item_id, cr); if (immediate_delete) @@ -1606,7 +1606,7 @@ void remove_inventory_category( } if (AISAPI::isAvailable()) { - AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::RemoveCategory(cat_id, cr); } else // no cap @@ -1709,7 +1709,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) { if (AISAPI::isAvailable()) { - AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::PurgeDescendents(id, cr); } else // no cap @@ -1862,7 +1862,7 @@ void slam_inventory_folder(const LLUUID& folder_id, LL_DEBUGS(LOG_INV) << "using AISv3 to slam folder, id " << folder_id << " new contents: " << ll_pretty_print_sd(contents) << LL_ENDL; - AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); + AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::SlamFolder(folder_id, contents, cr); } else // no cap -- cgit v1.2.3