From 8f99d24a677cde192fb604ccf5dc8afbe26f557b Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Wed, 8 Jul 2009 17:42:53 +0200 Subject: Broken: relog sometimes works once; fixed inventory and avatar not ruthed anymore. deleted: Imprudence.log modified: linden/indra/newview/llagent.cpp modified: linden/indra/newview/llappviewer.cpp modified: linden/indra/newview/llinventorymodel.cpp modified: linden/indra/newview/llinventorymodel.h modified: linden/indra/newview/llinventoryview.cpp modified: linden/indra/newview/llviewerjointattachment.h modified: linden/indra/newview/llviewermenu.cpp deleted: mAttachedObject.diff.txt deleted: meerkat-llmenugl.diff.txt deleted: meerkat-message.diff.txt deleted: meerkat-pipeline.cpp.diff.txt deleted: meerkat-voice.diff.txt deleted: stack_trace.log --- linden/indra/newview/llagent.cpp | 12 ++++++++++++ linden/indra/newview/llappviewer.cpp | 2 +- linden/indra/newview/llinventorymodel.cpp | 2 +- linden/indra/newview/llinventorymodel.h | 6 ++++-- linden/indra/newview/llinventoryview.cpp | 1 + linden/indra/newview/llviewerjointattachment.h | 4 +++- linden/indra/newview/llviewermenu.cpp | 5 +++++ 7 files changed, 27 insertions(+), 5 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 5f0a875..e6ae7b5 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -466,6 +466,10 @@ void LLAgent::init() //----------------------------------------------------------------------------- void LLAgent::cleanup() { + mInitialized = FALSE; + mWearablesLoaded = FALSE; + mShowAvatar = TRUE; + setSitCamera(LLUUID::null); mAvatarObject = NULL; mLookAt = NULL; @@ -6592,11 +6596,19 @@ BOOL LLAgent::isWearingItem( const LLUUID& item_id ) // static void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void** user_data ) { + if (gNoRender) + { + return; + } + // We should only receive this message a single time. Ignore subsequent AgentWearablesUpdates // that may result from AgentWearablesRequest having been sent more than once. + // If we do this, then relogging won't work. - Gigs + /* static bool first = true; if (!first) return; first = false; + */ LLUUID agent_id; gMessageSystem->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 60faaf2..128f33a 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -3797,7 +3797,7 @@ void LLAppViewer::disconnectViewer() LLWorld::getInstance()->destroyClass(); if (mQuitRequested) - cleanup_xfer_manager(); + cleanup_xfer_manager(); } void LLAppViewer::forceErrorLLError() diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index 1029a3c..93eb7ac 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp @@ -1499,7 +1499,7 @@ void LLInventoryModel::stopBackgroundFetch() //static void LLInventoryModel::backgroundFetch(void*) { - if (sBackgroundFetchActive && gAgent.getRegion()) + if (sBackgroundFetchActive) { //If we'll be using the capability, we'll be sending batches and the background thing isn't as important. std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); diff --git a/linden/indra/newview/llinventorymodel.h b/linden/indra/newview/llinventorymodel.h index 7c7d231..e95d246 100644 --- a/linden/indra/newview/llinventorymodel.h +++ b/linden/indra/newview/llinventorymodel.h @@ -323,6 +323,8 @@ public: // relations. void buildParentChildMap(); + // Empty the entire contents + void empty(); // // Category accounting. // @@ -374,6 +376,7 @@ public: static bool isEverythingFetched(); static void backgroundFetch(void*); // background fetch idle function static void incrBulkFetch(S16 fetching) { sBulkFetchCount+=fetching; if (sBulkFetchCount<0) sBulkFetchCount=0; } + protected: // Internal methods which add inventory and make sure that all of @@ -387,8 +390,7 @@ protected: // preferred type. Returns LLUUID::null if not found LLUUID findCatUUID(LLAssetType::EType preferred_type); - // Empty the entire contents - void empty(); + // Given the current state of the inventory items, figure out the // clone information. *FIX: This is sub-optimal, since we can diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index 0f1eb2b..d79c6e9 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp @@ -941,6 +941,7 @@ void LLInventoryView::cleanup() { sActiveViews.get(i)->destroy(); } + gInventory.empty(); } void LLInventoryView::toggleFindOptions() diff --git a/linden/indra/newview/llviewerjointattachment.h b/linden/indra/newview/llviewerjointattachment.h index dd63bfd..cbfee0b 100644 --- a/linden/indra/newview/llviewerjointattachment.h +++ b/linden/indra/newview/llviewerjointattachment.h @@ -98,7 +98,9 @@ protected: void calcLOD(); protected: - LLPointer mAttachedObject; + + // Backlink only; don't make this an LLPointer. + LLViewerObject* mAttachedObject; BOOL mVisibleInFirst; LLVector3 mOriginalPos; S32 mGroup; diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 2940bdd..f75ca7d 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -564,6 +564,11 @@ void set_underclothes_menu_options() void init_menus() { + if (gMenuHolder) + { + cleanup_menus(); + } + S32 top = gViewerWindow->getRootView()->getRect().getHeight(); S32 width = gViewerWindow->getRootView()->getRect().getWidth(); -- cgit v1.1