Merge vmm up to 3a62616f3dd8bd512fcdfd29ef033b2505b11213

This commit is contained in:
Inusaito Sayori
2015-08-01 13:07:30 -04:00
committed by Lirusaito
parent 1d6e2b4182
commit fd4155f4b6
12 changed files with 185 additions and 123 deletions

View File

@@ -120,6 +120,7 @@ namespace {
LL_INFOS() << "Error setting log file to " << filename << LL_ENDL;
}
mWantsTime = true;
mWantsTags = true;
}
~RecordToFile()
@@ -600,7 +601,7 @@ namespace LLError
mFunctionString += std::string(mFunction) + ":";
for (size_t i = 0; i < mTagCount; i++)
{
mTagString += std::string("#") + mTags[i] + ((i == mTagCount - 1) ? "" : " ");
mTagString += std::string("#") + mTags[i] + ((i == mTagCount - 1) ? "" : ",");
}
}
}
@@ -983,13 +984,19 @@ namespace
}
if (show_level && r->wantsLevel())
{
message_stream << site.mLevelString << " ";
}
{
message_stream << site.mLevelString;
}
if (show_tags && r->wantsTags())
{
message_stream << site.mTagString << " ";
message_stream << site.mTagString;
}
if ((show_level && r->wantsLevel())||
(show_tags && r->wantsTags()))
{
message_stream << " ";
}
if (show_function && r->wantsFunctionName())

View File

@@ -32,6 +32,7 @@
#include "llagentcamera.h"
#include "llagentwearablesfetch.h"
#include "llappearancemgr.h"
#include "llattachmentsmgr.h"
#include "llcallbacklist.h"
#include "llfloatercustomize.h"
#include "llfolderview.h"

View File

@@ -530,6 +530,15 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
}
}
LLRequestServerAppearanceUpdateOnDestroy::~LLRequestServerAppearanceUpdateOnDestroy()
{
LL_DEBUGS("Avatar") << "ATT requesting server appearance update" << LL_ENDL;
if (!LLApp::isExiting())
{
LLAppearanceMgr::instance().requestServerAppearanceUpdate();
}
}
U32 LLUpdateAppearanceOnDestroy::sActiveCallbacks = 0;
LLUpdateAppearanceAndEditWearableOnDestroy::LLUpdateAppearanceAndEditWearableOnDestroy(const LLUUID& item_id):
@@ -1568,9 +1577,11 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
break;
case LLAssetType::AT_OBJECT:
{
rez_attachment(item_to_wear, NULL, replace);
}
{
LL_DEBUGS("Avatar") << "ATT wearing object. calling rez_attachment, item " << item_to_wear->getName()
<< " id " << item_to_wear->getLinkedUUID() << LL_ENDL;
rez_attachment(item_to_wear, NULL, replace);
}
break;
default: continue;
@@ -3759,7 +3770,7 @@ void RequestAgentUpdateAppearanceResponder::onRequestRequested()
}
// Actually send the request.
LL_DEBUGS("Avatar") << "Will send request for cof_version " << cof_version << LL_ENDL;
LL_DEBUGS("Avatar") << "ATT sending bake request for cof_version " << cof_version << LL_ENDL;
mRetryPolicy->reset();
sendRequest();
}

View File

@@ -321,6 +321,16 @@ private:
nullary_func_t mPostUpdateFunc;
};
class LLRequestServerAppearanceUpdateOnDestroy: public LLInventoryCallback
{
public:
LLRequestServerAppearanceUpdateOnDestroy() {}
~LLRequestServerAppearanceUpdateOnDestroy();
/* virtual */ void fire(const LLUUID& item_id) {}
};
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1)
class LLUpdateAppearanceAndEditWearableOnDestroy: public LLInventoryCallback
{
public:

View File

@@ -66,10 +66,6 @@ void fake_local_chat(std::string msg);
// Longest time, in seconds, to wait for all animations to stop playing
const F32 MAX_WAIT_ANIM_SECS = 30.f;
// If this gesture is a link, get the base gesture that this link points to,
// otherwise just return this id.
static const LLUUID& get_linked_uuid(const LLUUID& item_id);
// Lightweight constructor.
// init() does the heavy lifting.
LLGestureMgr::LLGestureMgr()
@@ -259,7 +255,7 @@ void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id,
BOOL inform_server,
BOOL deactivate_similar)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
if( !gAssetStorage )
{
@@ -307,7 +303,7 @@ void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id,
void LLGestureMgr::deactivateGesture(const LLUUID& item_id)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end())
{
@@ -352,7 +348,7 @@ void LLGestureMgr::deactivateGesture(const LLUUID& item_id)
void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id)
{
const LLUUID& base_in_item_id = get_linked_uuid(in_item_id);
const LLUUID& base_in_item_id = gInventory.getLinkedItemID(in_item_id);
uuid_vec_t gest_item_ids;
// Deactivate all gestures that match
@@ -439,7 +435,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i
BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
return (it != mActive.end());
}
@@ -447,7 +443,7 @@ BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id)
BOOL LLGestureMgr::isGesturePlaying(const LLUUID& item_id)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end()) return FALSE;
@@ -469,7 +465,7 @@ BOOL LLGestureMgr::isGesturePlaying(LLMultiGesture* gesture)
void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_gesture, const LLUUID& asset_id)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end())
{
@@ -510,7 +506,7 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_ges
void LLGestureMgr::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = LLGestureMgr::instance().mActive.find(base_item_id);
if (it == mActive.end())
@@ -613,7 +609,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture, bool local)
// Convenience function that looks up the item_id for you.
void LLGestureMgr::playGesture(const LLUUID& item_id, bool local)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end()) return;
@@ -1337,7 +1333,7 @@ void LLGestureMgr::stopGesture(LLMultiGesture* gesture)
void LLGestureMgr::stopGesture(const LLUUID& item_id)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end()) return;
@@ -1493,13 +1489,4 @@ void LLGestureMgr::done()
}
}
// static
const LLUUID& get_linked_uuid(const LLUUID &item_id)
{
LLViewerInventoryItem* item = gInventory.getItem(item_id);
if (item && item->getIsLinkType())
{
return item->getLinkedUUID();
}
return item_id;
}

View File

@@ -99,6 +99,34 @@ void LLInventoryAction::callback_copySelected(const LLSD& notification, const LL
}
}
// Succeeds iff all selected items are bridges to objects, in which
// case returns their corresponding uuids.
bool get_selection_object_uuids(LLFolderView *root, uuid_vec_t& ids)
{
uuid_vec_t results;
//S32 no_object = 0;
std::set<LLUUID> selectedItems = root->getSelectionList();
for(std::set<LLUUID>::iterator it = selectedItems.begin(); it != selectedItems.end(); ++it)
{
const LLUUID& id(*it);
if(id.notNull())
{
results.push_back(id);
}
else
{
return false; //non_object++;
}
}
//if (non_object == 0)
{
ids = results;
return true;
}
//return false;
}
bool LLInventoryAction::doToSelected(LLFolderView* root, std::string action, BOOL user_confirm)
{
if (!root)
@@ -206,18 +234,31 @@ bool LLInventoryAction::doToSelected(LLFolderView* root, std::string action, BOO
std::set<LLUUID>::iterator set_iter;
for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
// This rather warty piece of code is to allow items to be removed
// from the avatar in a batch, eliminating redundant
// updateAppearanceFromCOF() requests further down the line. (MAINT-4918)
//
// There are probably other cases where similar batching would be
// desirable, but the current item-by-item performAction()
// approach would need to be reworked.
uuid_vec_t object_uuids_to_remove;
if (isRemoveAction(action) && get_selection_object_uuids(root, object_uuids_to_remove))
{
LLFolderViewItem* folder_item = root->getItemByID(*set_iter);
if(!folder_item) continue;
LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getListener();
if(!bridge) continue;
bridge->performAction(model, action);
LLAppearanceMgr::instance().removeItemsFromAvatar(object_uuids_to_remove);
}
else
{
for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
{
LLFolderViewItem* folder_item = root->getItemByID(*set_iter);
if(!folder_item) continue;
LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getListener();
if(!bridge) continue;
// Update the marketplace listings that have been affected by the operation
updateMarketplaceFolders();
bridge->performAction(model, action);
}
}
LLFloater::setFloaterHost(NULL);
if (multi_floaterp)
@@ -239,10 +280,16 @@ void LLInventoryAction::buildMarketplaceFolders(LLFolderView* root)
// Note: do not however put the marketplace listings root itself in this list or the whole marketplace data will be rebuilt.
sMarketplaceFolders.clear();
const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
if (marketplacelistings_id.isNull())
{
return;
}
std::set<LLUUID> selected_items = root->getSelectionList();
for (std::set<LLUUID>::const_iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
{
const LLInventoryObject* obj(gInventory.getObject(*set_iter));
if (!obj) continue;
if (gInventory.isObjectDescendentOf(obj->getParentUUID(), marketplacelistings_id))
{
const LLUUID& parent_id = obj->getParentUUID();

View File

@@ -6162,12 +6162,13 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
// Check for duplicate request.
if (isAgentAvatarValid() &&
(gAgentAvatarp->attachmentWasRequested(item_id) ||
gAgentAvatarp->isWearingAttachment(item_id)))
gAgentAvatarp->isWearingAttachment(item_id))
{
LL_WARNS() << "duplicate attachment request, ignoring" << LL_ENDL;
LL_WARNS() << "ATT duplicate attachment request, ignoring" << LL_ENDL;
return;
}
LL_DEBUGS("Avatar") << "ATT add rez request for " << item->getName() << " id " << item_id << LL_ENDL;
gAgentAvatarp->addAttachmentRequest(item_id);
S32 attach_pt = 0;
@@ -6232,27 +6233,6 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response)
if (itemp)
{
/*
{
U8 attachment_pt = notification["payload"]["attachment_point"].asInteger();
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RezSingleAttachmentFromInv);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addUUIDFast(_PREHASH_ItemID, itemp->getUUID());
msg->addUUIDFast(_PREHASH_OwnerID, itemp->getPermissions().getOwner());
msg->addU8Fast(_PREHASH_AttachmentPt, attachment_pt);
pack_permissions_slam(msg, itemp->getFlags(), itemp->getPermissions());
msg->addStringFast(_PREHASH_Name, itemp->getName());
msg->addStringFast(_PREHASH_Description, itemp->getDescription());
msg->sendReliable(gAgent.getRegion()->getHost());
return false;
}
*/
// Queue up attachments to be sent in next idle tick, this way the
// attachments are batched up all into one message versus each attachment
// being sent in its own separate attachments message.

View File

@@ -719,4 +719,10 @@ public:
virtual void groupFilterContextMenu(folder_view_item_deque& selected_items, LLMenuGL& menu);
};
// Helper functions to classify actions.
bool isAddAction(const std::string& action);
bool isRemoveAction(const std::string& action);
bool isMarketplaceCopyAction(const std::string& action);
bool isMarketplaceSendAction(const std::string& action);
#endif // LL_LLINVENTORYBRIDGE_H

View File

@@ -291,6 +291,11 @@ void update_marketplace_category(const LLUUID& cur_uuid, bool perform_consistenc
LLNotificationsUtil::add("AlertMerchantVersionFolderEmpty");
LLMarketplaceData::instance().activateListing(listing_uuid, false,1);
}
else if (version_folder_uuid.notNull() && (count_descendants_items(version_folder_uuid) == 0))
{
LL_INFOS("SLM") << "Unlist as the version folder is empty of any item!!" << LL_ENDL;
LLMarketplaceData::instance().activateListing(listing_uuid, false);
}
}
// Check if the count on hand needs to be updated on SLM

View File

@@ -34,6 +34,7 @@
#include "llinventoryfunctions.h"
#include "llinventoryobserver.h"
#include "llnotificationsutil.h"
#include "llsdserialize.h"
#include "lltimer.h"
#include "lltrans.h"
#include "llviewercontrol.h"
@@ -214,8 +215,8 @@ protected:
log_SLM_infos("Get /merchant", getStatus(), "User is a merchant");
LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_MERCHANT);
}
virtual char const* getName() const { return "LLSLMGetMerchantResponder"; }
};
class LLSLMGetListingsResponder : public LLHTTPClient::ResponderWithCompleted
@@ -288,7 +289,6 @@ public:
update_marketplace_category(mExpectedFolderId, false);
gInventory.notifyObservers();
}
virtual char const* getName() const { return "LLSLMGetListingsResponder"; }
private:
LLUUID mExpectedFolderId;
@@ -356,7 +356,6 @@ public:
it++;
}
}
virtual char const* getName() const { return "LLSLMCreateListingsResponder"; }
private:
LLUUID mExpectedFolderId;
@@ -439,7 +438,6 @@ public:
it++;
}
}
virtual char const* getName() const { return "LLSLMGetListingResponder"; }
private:
LLUUID mExpectedFolderId;
@@ -525,7 +523,6 @@ public:
it++;
}
}
virtual char const* getName() const { return "LLSLMUpdateListingsResponder"; }
private:
LLUUID mExpectedFolderId;
@@ -607,7 +604,7 @@ public:
update_marketplace_category(folder_id, false);
gInventory.notifyObservers();
// the stock count needs to be updated with the new local count now
// The stock count needs to be updated with the new local count now
LLMarketplaceData::instance().updateCountOnHand(folder_id,1);
it++;
@@ -689,11 +686,10 @@ namespace LLMarketplaceImport
{
// Basic interface for this namespace
bool hasSessionCookie();
bool inProgress();
bool resultPending();
U32 getResultStatus();
S32 getResultStatus();
const LLSD& getResults();
bool establishMarketplaceSessionCookie();
@@ -707,7 +703,7 @@ namespace LLMarketplaceImport
static bool sImportInProgress = false;
static bool sImportPostPending = false;
static bool sImportGetPending = false;
static U32 sImportResultStatus = 0;
static S32 sImportResultStatus = 0;
static LLSD sImportResults = LLSD::emptyMap();
static LLTimer slmGetTimer;
@@ -717,30 +713,32 @@ namespace LLMarketplaceImport
class LLImportPostResponder : public LLHTTPClient::ResponderWithCompleted
{
LOG_CLASS(LLImportPostResponder);
public:
/*virtual*/ void httpCompleted(void)
/*virtual*/ void httpCompleted()
{
slmPostTimer.stop();
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
LL_INFOS() << " SLM POST status: " << mStatus << LL_ENDL;
LL_INFOS() << " SLM POST reason: " << mReason << LL_ENDL;
LL_INFOS() << " SLM POST content: " << mContent.asString() << LL_ENDL;
LL_INFOS() << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << LL_ENDL;
LL_INFOS() << " SLM [timer:" << slmPostTimer.getElapsedTimeF32() << "] "
<< dumpResponse() << LL_ENDL;
}
// MAINT-2301 : we determined we can safely ignore that error in that context
if (mStatus == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT)
S32 status = getStatus();
if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) ||
(status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) ||
// MAINT-2301 : we determined we can safely ignore that error in that context
(status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT))
{
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
LL_INFOS() << " SLM POST : Ignoring time out status and treating it as success" << LL_ENDL;
}
mStatus = MarketplaceErrorCodes::IMPORT_DONE;
status = MarketplaceErrorCodes::IMPORT_DONE;
}
if (mStatus >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST)
if (status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST)
{
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
@@ -749,10 +747,10 @@ namespace LLMarketplaceImport
sMarketplaceCookie.clear();
}
sImportInProgress = (mStatus == MarketplaceErrorCodes::IMPORT_DONE);
sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE);
sImportPostPending = false;
sImportResultStatus = mStatus;
sImportId = mContent;
sImportResultStatus = status;
sImportId = getContent();
}
/*virtual*/ char const* getName(void) const { return "LLImportPostResponder"; }
@@ -760,6 +758,7 @@ namespace LLMarketplaceImport
class LLImportGetResponder : public LLHTTPClient::ResponderWithCompleted
{
LOG_CLASS(LLImportGetResponder);
public:
/*virtual*/ bool needsHeaders(void) const { return true; }
@@ -779,39 +778,38 @@ namespace LLMarketplaceImport
}
}
/*virtual*/ void httpCompleted(void)
/*virtual*/ void httpCompleted()
{
slmGetTimer.stop();
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
LL_INFOS() << " SLM GET status: " << mStatus << LL_ENDL;
LL_INFOS() << " SLM GET reason: " << mReason << LL_ENDL;
LL_INFOS() << " SLM GET content: " << mContent.asString() << LL_ENDL;
LL_INFOS() << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << LL_ENDL;
LL_INFOS() << " SLM [timer:" << slmGetTimer.getElapsedTimeF32() << "] "
<< dumpResponse() << LL_ENDL;
}
// MAINT-2452 : Do not clear the cookie on IMPORT_DONE_WITH_ERRORS : Happens when trying to import objects with wrong permissions
// ACME-1221 : Do not clear the cookie on IMPORT_NOT_FOUND : Happens for newly created Merchant accounts that are initially empty
if ((mStatus >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST) &&
(mStatus != MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) &&
(mStatus != MarketplaceErrorCodes::IMPORT_NOT_FOUND))
S32 status = getStatus();
if ((status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST) &&
(status != MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) &&
(status != MarketplaceErrorCodes::IMPORT_NOT_FOUND))
{
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
LL_INFOS() << " SLM GET clearing marketplace cookie due to client or server error (" << mStatus << " / " << mReason << ")." << LL_ENDL;
LL_INFOS() << " SLM GET clearing marketplace cookie due to client or server error" << LL_ENDL;
}
sMarketplaceCookie.clear();
}
else if (gSavedSettings.getBOOL("InventoryOutboxLogging") && (mStatus >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST))
else if (gSavedSettings.getBOOL("InventoryOutboxLogging") && (status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST))
{
LL_INFOS() << " SLM GET : Got error status = " << mStatus << ", but marketplace cookie not cleared." << LL_ENDL;
LL_INFOS() << " SLM GET : Got error status = " << status << ", but marketplace cookie not cleared." << LL_ENDL;
}
sImportInProgress = (mStatus == MarketplaceErrorCodes::IMPORT_PROCESSING);
sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING);
sImportGetPending = false;
sImportResultStatus = mStatus;
sImportResults = mContent;
sImportResultStatus = status;
sImportResults = getContent();
}
/*virtual*/ char const* getName(void) const { return "LLImportGetResponder"; }
@@ -834,7 +832,7 @@ namespace LLMarketplaceImport
return (sImportPostPending || sImportGetPending);
}
U32 getResultStatus()
S32 getResultStatus()
{
return sImportResultStatus;
}
@@ -871,8 +869,10 @@ namespace LLMarketplaceImport
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
LL_INFOS() << " SLM GET: establishMarketplaceSessionCookie, LLHTTPClient::get, url = " << url << LL_ENDL;
std::stringstream str;
str << headers; //LLSDSerialize::toPrettyXML(headers, str);
LL_INFOS() << " SLM GET: headers " << LL_ENDL;
LL_INFOS() << headers << LL_ENDL;
LL_INFOS() << str.str() << LL_ENDL;
}
slmGetTimer.start();
@@ -898,14 +898,17 @@ namespace LLMarketplaceImport
AIHTTPHeaders headers;
headers.addHeader("Accept", "*/*");
headers.addHeader("Cookie", sMarketplaceCookie);
// *TODO: Why are we setting Content-Type for a GET request?
headers.addHeader("Content-Type", "application/llsd+xml");
headers.addHeader("User-Agent", LLViewerMedia::getCurrentUserAgent());
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
LL_INFOS() << " SLM GET: pollStatus, LLHTTPClient::get, url = " << url << LL_ENDL;
std::stringstream str;
str << headers; //LLSDSerialize::toPrettyXML(headers, str);
LL_INFOS() << " SLM GET: headers " << LL_ENDL;
LL_INFOS() << headers << LL_ENDL;
LL_INFOS() << str.str() << LL_ENDL;
}
slmGetTimer.start();
@@ -940,8 +943,10 @@ namespace LLMarketplaceImport
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
LL_INFOS() << " SLM POST: triggerImport, LLHTTPClient::post, url = " << url << LL_ENDL;
std::stringstream str;
str << headers; //LLSDSerialize::toPrettyXML(headers, str);
LL_INFOS() << " SLM POST: headers " << LL_ENDL;
LL_INFOS() << headers << LL_ENDL;
LL_INFOS() << str.str() << LL_ENDL;
}
slmPostTimer.start();
@@ -967,7 +972,6 @@ void LLMarketplaceInventoryImporter::update()
if (update_timer.hasExpired())
{
LLMarketplaceInventoryImporter::instance().updateImport();
//static LLCachedControl<F32> MARKET_IMPORTER_UPDATE_FREQUENCY("MarketImporterUpdateFreq", 1.0f);
update_timer.setTimerExpirySec(MARKET_IMPORTER_UPDATE_FREQUENCY);
}
}
@@ -1114,12 +1118,12 @@ void LLMarketplaceInventoryImporter::updateImport()
}
}
}
}
// Make sure we trigger the status change with the final state (in case of auto trigger after initialize)
if (mStatusChangedSignal)
{
(*mStatusChangedSignal)(mImportInProgress);
}
// Make sure we trigger the status change with the final state (in case of auto trigger after initialize)
if (mStatusChangedSignal)
{
(*mStatusChangedSignal)(mImportInProgress);
}
}
@@ -1197,7 +1201,7 @@ void LLMarketplaceInventoryObserver::changed(U32 mask)
{
// If it's not a category, it's an item...
LLInventoryItem* item = (LLInventoryItem*)(obj);
// If it's a no copy item, we may need to update the label count of marketplace listing
// If it's a no copy item, we may need to update the label count of marketplace listings
if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID()))
{
LLMarketplaceData::instance().setDirtyCount();
@@ -1313,7 +1317,7 @@ void LLMarketplaceData::getSLMListing(S32 listing_id)
// Send request
std::string url = getSLMConnectURL("/listing/") + llformat("%d", listing_id);
log_SLM_infos("LLHTTPClient::get", url, "");
const LLUUID folder_id = LLMarketplaceData::instance().getListingFolder(listing_id);
LLUUID folder_id = LLMarketplaceData::instance().getListingFolder(listing_id);
setUpdating(folder_id, true);
LLHTTPClient::get(url, new LLSLMGetListingResponder(folder_id), headers);
}
@@ -1508,7 +1512,7 @@ bool LLMarketplaceData::clearListing(const LLUUID& folder_id, S32 depth)
depth = depth_nesting_in_marketplace(folder_id);
}
// Folder id can be the root of the listing of not so we need to retrieve the root first
// Folder id can be the root of the listing or not so we need to retrieve the root first
LLUUID listing_uuid = (isListed(folder_id) ? folder_id : nested_parent_id(folder_id, depth));
S32 listing_id = getListingID(listing_uuid);
@@ -1641,7 +1645,7 @@ bool LLMarketplaceData::setVersionFolder(const LLUUID& folder_id, const LLUUID&
count = 0;
}
// Post the listing update requesst to SLM
// Post the listing update request to SLM
updateSLMListing(listing_uuid, listing_id, version_id, is_listed, count);
return true;
@@ -1682,6 +1686,7 @@ bool LLMarketplaceData::updateCountOnHand(const LLUUID& folder_id, S32 depth)
bool is_listed = getActivationState(listing_uuid);
LLUUID version_uuid = getVersionFolder(listing_uuid);
// Post the listing update request to SLM
updateSLMListing(listing_uuid, listing_id, version_uuid, is_listed, count);
@@ -1713,7 +1718,6 @@ bool LLMarketplaceData::associateListing(const LLUUID& folder_id, const LLUUID&
bool LLMarketplaceData::addListing(const LLUUID& folder_id, S32 listing_id, const LLUUID& version_id, bool is_listed, const std::string& edit_url, S32 count)
{
mMarketplaceItems[folder_id] = LLMarketplaceTuple(folder_id, listing_id, version_id, is_listed);
mMarketplaceItems[folder_id].mEditURL = edit_url;
mMarketplaceItems[folder_id].mCountOnHand = count;
if (version_id.notNull())
@@ -1757,7 +1761,7 @@ bool LLMarketplaceData::getActivationState(const LLUUID& folder_id)
{
// Listing folder case
marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
if (isListed(folder_id))
if (it != mMarketplaceItems.end())
{
return (it->second).mIsActive;
}
@@ -1818,7 +1822,7 @@ std::string LLMarketplaceData::getListingURL(const LLUUID& folder_id, S32 depth)
LLUUID listing_uuid = nested_parent_id(folder_id, depth);
marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
marketplace_items_list_t::iterator it = mMarketplaceItems.find(listing_uuid);
return (it == mMarketplaceItems.end() ? "" : (it->second).mEditURL);
}
@@ -1854,16 +1858,16 @@ bool LLMarketplaceData::isInActiveFolder(const LLUUID& obj_id, S32 depth)
return (active && ((obj_id == version_uuid) || gInventory.isObjectDescendentOf(obj_id, version_uuid)));
}
LLUUID LLMarketplaceData::getActiveFolder(const LLUUID& folder_id, S32 depth)
LLUUID LLMarketplaceData::getActiveFolder(const LLUUID& obj_id, S32 depth)
{
// Evaluate the depth if it wasn't passed as a parameter
if (depth < 0)
{
depth = depth_nesting_in_marketplace(folder_id);
depth = depth_nesting_in_marketplace(obj_id);
}
LLUUID listing_uuid = nested_parent_id(folder_id, depth);
LLUUID listing_uuid = nested_parent_id(obj_id, depth);
return (getActivationState(listing_uuid) ? getVersionFolder(listing_uuid) : LLUUID::null);
}
@@ -1873,7 +1877,6 @@ bool LLMarketplaceData::isUpdating(const LLUUID& folder_id, S32 depth)
if (depth < 0)
{
depth = depth_nesting_in_marketplace(folder_id);
}
if ((depth <= 0) || (depth > 2))
{

View File

@@ -1547,6 +1547,11 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (sent_parentp && (sent_parentp != this) && !sent_parentp->isDead())
{
if (((LLViewerObject*)sent_parentp)->isAvatar())
{
//LL_DEBUGS("Avatar") << "ATT got object update for attachment " << LL_ENDL;
}
//
// We have a viewer object for the parent, and it's not dead.
// Do the actual reparenting here.

View File

@@ -451,7 +451,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
compressed_dp.unpackU32(local_id, "LocalID");
compressed_dp.unpackU8(pcode, "PCode");
}
else
else //OUT_TERSE_IMPROVED
{
compressed_dp.unpackU32(local_id, "LocalID");
getUUIDFromLocal(fullid,
@@ -460,7 +460,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
gMessageSystem->getSenderPort());
if (fullid.isNull())
{
// LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << LL_ENDL;
LL_DEBUGS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << LL_ENDL;
mNumUnknownUpdates++;
}
}