diff options
Diffstat (limited to 'indra/newview')
30 files changed, 246 insertions, 193 deletions
| diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index b9125ec8d3..729eb92e94 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1168,15 +1168,12 @@ private:  	std::vector<LLWearable*> mWearablesAwaitingItems;  }; -void LLAgentWearables::createStandardWearables(BOOL female) +void LLAgentWearables::createStandardWearables()  { -	llwarns << "Creating Standard " << (female ? "female" : "male") -			<< " Wearables" << llendl; +	llwarns << "Creating standard wearables" << llendl;  	if (!isAgentAvatarValid()) return; -	gAgentAvatarp->setSex(female ? SEX_FEMALE : SEX_MALE); -  	const BOOL create[LLWearableType::WT_COUNT] =   		{  			TRUE,  //LLWearableType::WT_SHAPE diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 252b812c27..01cae3ffd8 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -56,7 +56,7 @@ public:  	LLAgentWearables();  	virtual ~LLAgentWearables();  	void 			setAvatarObject(LLVOAvatarSelf *avatar); -	void			createStandardWearables(BOOL female);  +	void			createStandardWearables();   	void			cleanup();  	void			dump(); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 3cb9b77010..0666d22f10 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2264,6 +2264,85 @@ void LLAppearanceMgr::updateIsDirty()  	}  } +// *HACK: Must match name in Library or agent inventory +const std::string ROOT_GESTURES_FOLDER = "Gestures"; +const std::string COMMON_GESTURES_FOLDER = "Common Gestures"; +const std::string MALE_GESTURES_FOLDER = "Male Gestures"; +const std::string FEMALE_GESTURES_FOLDER = "Female Gestures"; +const std::string SPEECH_GESTURES_FOLDER = "Speech Gestures"; +const std::string OTHER_GESTURES_FOLDER = "Other Gestures"; + +void LLAppearanceMgr::copyLibraryGestures() +{ +	llinfos << "Copying library gestures" << llendl; + +	// Copy gestures +	LLUUID lib_gesture_cat_id = +		gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE,false,true); +	if (lib_gesture_cat_id.isNull()) +	{ +		llwarns << "Unable to copy gestures, source category not found" << llendl; +	} +	LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); + +	std::vector<std::string> gesture_folders_to_copy; +	gesture_folders_to_copy.push_back(MALE_GESTURES_FOLDER); +	gesture_folders_to_copy.push_back(FEMALE_GESTURES_FOLDER); +	gesture_folders_to_copy.push_back(COMMON_GESTURES_FOLDER); +	gesture_folders_to_copy.push_back(SPEECH_GESTURES_FOLDER); +	gesture_folders_to_copy.push_back(OTHER_GESTURES_FOLDER); + +	for(std::vector<std::string>::iterator it = gesture_folders_to_copy.begin(); +		it != gesture_folders_to_copy.end(); +		++it) +	{ +		std::string& folder_name = *it; + +		LLPointer<LLInventoryCallback> cb(NULL); + +		// After copying gestures, activate Common, Other, plus +		// Male and/or Female, depending upon the initial outfit gender. +		ESex gender = gAgentAvatarp->getSex(); + +		std::string activate_male_gestures; +		std::string activate_female_gestures; +		switch (gender) { +			case SEX_MALE: +				activate_male_gestures = MALE_GESTURES_FOLDER; +				break; +			case SEX_FEMALE: +				activate_female_gestures = FEMALE_GESTURES_FOLDER; +				break; +			case SEX_BOTH: +				activate_male_gestures = MALE_GESTURES_FOLDER; +				activate_female_gestures = FEMALE_GESTURES_FOLDER; +				break; +		} + +		if (folder_name == activate_male_gestures || +			folder_name == activate_female_gestures || +			folder_name == COMMON_GESTURES_FOLDER || +			folder_name == OTHER_GESTURES_FOLDER) +		{ +			cb = new ActivateGestureCallback; +		} + +		LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name); +		if (cat_id.isNull()) +		{ +			llwarns << "failed to find gesture folder for " << folder_name << llendl; +		} +		else +		{ +			llinfos << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << llendl; +			callAfterCategoryFetch(cat_id, +								   boost::bind(&LLAppearanceMgr::shallowCopyCategory, +											   &LLAppearanceMgr::instance(), +											   cat_id, dst_id, cb)); +		} +	} +} +  void LLAppearanceMgr::autopopulateOutfits()  {  	// If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) @@ -2285,9 +2364,16 @@ void LLAppearanceMgr::autopopulateOutfits()  void LLAppearanceMgr::onFirstFullyVisible()  {  	gAgentAvatarp->debugAvatarVisible(); +  	// The auto-populate is failing at the point of generating outfits  	// folders, so don't do the library copy until that is resolved.  	// autopopulateOutfits(); + +	// If this is the first time we've ever logged in, +	// then copy default gestures from the library. +	if (gAgent.isFirstLogin()) { +		copyLibraryGestures(); +	}  }  bool LLAppearanceMgr::updateBaseOutfit() diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 4b1d95cf25..c1d561781d 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -151,6 +151,9 @@ public:  	// Create initial outfits from library.  	void autopopulateOutfits(); + +	// Copy initial gestures from library. +	void copyLibraryGestures();  	void wearBaseOutfit(); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a4640f5504..0e57abd472 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1175,7 +1175,7 @@ bool LLAppViewer::mainLoop()  	//-------------------------------------------  	// Create IO Pump to use for HTTP Requests. -	gServicePump = new LLPumpIO; +	gServicePump = new LLPumpIO(gAPRPoolp);  	LLHTTPClient::setPump(*gServicePump);  	LLCurl::setCAFile(gDirUtilp->getCAFile()); @@ -1534,16 +1534,16 @@ bool LLAppViewer::cleanup()  	}  	// *TODO - generalize this and move DSO wrangling to a helper class -brad -	for(std::map<apr_dso_handle_t*, boost::shared_ptr<LLAPRPool> >::iterator plugin = mPlugins.begin(); -		plugin != mPlugins.end(); ++plugin) +	std::set<struct apr_dso_handle_t *>::const_iterator i; +	for(i = mPlugins.begin(); i != mPlugins.end(); ++i)  	{  		int (*ll_plugin_stop_func)(void) = NULL; -		apr_status_t rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_stop_func, plugin->first, "ll_plugin_stop"); +		apr_status_t rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_stop_func, *i, "ll_plugin_stop");  		ll_plugin_stop_func(); -		rv = apr_dso_unload(plugin->first); +		rv = apr_dso_unload(*i);  	} -	mPlugins.clear();	// Forget handles and destroy all memory pools. +	mPlugins.clear();  	//flag all elements as needing to be destroyed immediately  	// to ensure shutdown order @@ -1981,7 +1981,7 @@ bool LLAppViewer::initThreads()  	if (LLFastTimer::sLog || LLFastTimer::sMetricLog)  	{ -		LLFastTimer::sLogLock = new LLMutex; +		LLFastTimer::sLogLock = new LLMutex(NULL);  		mFastTimerLogThread = new LLFastTimerLogThread(LLFastTimer::sLogName);  		mFastTimerLogThread->start();  	} @@ -3229,7 +3229,8 @@ void LLAppViewer::handleViewerCrash()  		else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME);  		llinfos << "Creating crash marker file " << crash_file_name << llendl; -		LLAPRFile crash_file(crash_file_name, LL_APR_W); +		LLAPRFile crash_file ; +		crash_file.open(crash_file_name, LL_APR_W);  		if (crash_file.getFileHandle())  		{  			LL_INFOS("MarkerFile") << "Created crash marker file " << crash_file_name << LL_ENDL; @@ -3293,10 +3294,11 @@ bool LLAppViewer::anotherInstanceRunning()  	LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL;  	//Freeze case checks -	if (LLAPRFile::isExist(marker_file, LL_APR_RB)) +	if (LLAPRFile::isExist(marker_file, NULL, LL_APR_RB))  	{  		// File exists, try opening with write permissions -		LLAPRFile outfile(marker_file, LL_APR_WB); +		LLAPRFile outfile ; +		outfile.open(marker_file, LL_APR_WB);  		apr_file_t* fMarker = outfile.getFileHandle() ;   		if (!fMarker)  		{ @@ -3335,25 +3337,25 @@ void LLAppViewer::initMarkerFile()  	std::string llerror_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LLERROR_MARKER_FILE_NAME);  	std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME); -	if (LLAPRFile::isExist(mMarkerFileName, LL_APR_RB) && !anotherInstanceRunning()) +	if (LLAPRFile::isExist(mMarkerFileName, NULL, LL_APR_RB) && !anotherInstanceRunning())  	{  		gLastExecEvent = LAST_EXEC_FROZE;  		LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL;  	}     -	if(LLAPRFile::isExist(logout_marker_file, LL_APR_RB)) +	if(LLAPRFile::isExist(logout_marker_file, NULL, LL_APR_RB))  	{  		gLastExecEvent = LAST_EXEC_LOGOUT_FROZE;  		LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;  		LLAPRFile::remove(logout_marker_file);  	} -	if(LLAPRFile::isExist(llerror_marker_file, LL_APR_RB)) +	if(LLAPRFile::isExist(llerror_marker_file, NULL, LL_APR_RB))  	{  		if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;  		else gLastExecEvent = LAST_EXEC_LLERROR_CRASH;  		LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;  		LLAPRFile::remove(llerror_marker_file);  	} -	if(LLAPRFile::isExist(error_marker_file, LL_APR_RB)) +	if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB))  	{  		if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;  		else gLastExecEvent = LAST_EXEC_OTHER_CRASH; @@ -3369,7 +3371,7 @@ void LLAppViewer::initMarkerFile()  	// Create the marker file for this execution & lock it  	apr_status_t s; -	s = mMarkerFile.open(mMarkerFileName, LL_APR_W, LLAPRFile::long_lived); +	s = mMarkerFile.open(mMarkerFileName, LL_APR_W, TRUE);	  	if (s == APR_SUCCESS && mMarkerFile.getFileHandle())  	{ @@ -4615,7 +4617,8 @@ void LLAppViewer::sendLogoutRequest()  		gLogoutInProgress = TRUE;  		mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME); -		LLAPRFile outfile(mLogoutMarkerFileName, LL_APR_W); +		LLAPRFile outfile ; +		outfile.open(mLogoutMarkerFileName, LL_APR_W);  		mLogoutMarkerFile =  outfile.getFileHandle() ;  		if (mLogoutMarkerFile)  		{ @@ -5067,15 +5070,14 @@ void LLAppViewer::loadEventHostModule(S32 listen_port)  	}  #endif // LL_WINDOWS -	boost::shared_ptr<LLAPRPool> eventhost_dso_memory_pool_ptr(new LLAPRPool); -	LLAPRPool& eventhost_dso_memory_pool(*eventhost_dso_memory_pool_ptr); -	apr_dso_handle_t* eventhost_dso_handle = NULL; +	apr_dso_handle_t * eventhost_dso_handle = NULL; +	apr_pool_t * eventhost_dso_memory_pool = NULL;  	//attempt to load the shared library -	eventhost_dso_memory_pool.create(); +	apr_pool_create(&eventhost_dso_memory_pool, NULL);  	apr_status_t rv = apr_dso_load(&eventhost_dso_handle,  		dso_path.c_str(), -		eventhost_dso_memory_pool()); +		eventhost_dso_memory_pool);  	llassert_always(! ll_apr_warn_status(rv, eventhost_dso_handle));  	llassert_always(eventhost_dso_handle != NULL); @@ -5095,8 +5097,7 @@ void LLAppViewer::loadEventHostModule(S32 listen_port)  		llerrs << "problem loading eventhost plugin, status: " << status << llendl;  	} -	// Store the handle and link it to the pool that was used to allocate it. -	mPlugins[eventhost_dso_handle] = eventhost_dso_memory_pool_ptr; +	mPlugins.insert(eventhost_dso_handle);  }  void LLAppViewer::launchUpdater() diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 168aaf5d94..71a7868191 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -270,7 +270,7 @@ private:      LLAllocator mAlloc; -	std::map<apr_dso_handle_t*, boost::shared_ptr<LLAPRPool> > mPlugins; +	std::set<struct apr_dso_handle_t*> mPlugins;  	LLFrameTimer mMemCheckTimer; diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index db11462fcb..48d02dfeaa 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -111,7 +111,6 @@ int main( int argc, char **argv )  	}  	delete viewer_app_ptr;  	viewer_app_ptr = NULL; -  	return 0;  } diff --git a/indra/newview/llappviewerlinux_api_dbus.cpp b/indra/newview/llappviewerlinux_api_dbus.cpp index 1ae469dfcf..32e7e0a83d 100644 --- a/indra/newview/llappviewerlinux_api_dbus.cpp +++ b/indra/newview/llappviewerlinux_api_dbus.cpp @@ -27,11 +27,11 @@  #if LL_DBUS_ENABLED  #include "linden_common.h" -#include "llaprpool.h"  extern "C" {  #include <dbus/dbus-glib.h> +#include "apr_pools.h"  #include "apr_dso.h"  } @@ -44,7 +44,7 @@ extern "C" {  #undef LL_DBUS_SYM  static bool sSymsGrabbed = false; -static LLAPRPool sSymDBUSDSOMemoryPool; +static apr_pool_t *sSymDBUSDSOMemoryPool = NULL;  static apr_dso_handle_t *sSymDBUSDSOHandleG = NULL;  bool grab_dbus_syms(std::string dbus_dso_name) @@ -63,11 +63,11 @@ bool grab_dbus_syms(std::string dbus_dso_name)  #define LL_DBUS_SYM(REQUIRED, DBUSSYM, RTN, ...) do{rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll##DBUSSYM, sSymDBUSDSOHandle, #DBUSSYM); if (rv != APR_SUCCESS) {INFOMSG("Failed to grab symbol: %s", #DBUSSYM); if (REQUIRED) sym_error = true;} else DEBUGMSG("grabbed symbol: %s from %p", #DBUSSYM, (void*)ll##DBUSSYM);}while(0)  	//attempt to load the shared library -	sSymDBUSDSOMemoryPool.create(); +	apr_pool_create(&sSymDBUSDSOMemoryPool, NULL);  	if ( APR_SUCCESS == (rv = apr_dso_load(&sSymDBUSDSOHandle,  					       dbus_dso_name.c_str(), -					       sSymDBUSDSOMemoryPool()) )) +					       sSymDBUSDSOMemoryPool) ))  	{  		INFOMSG("Found DSO: %s", dbus_dso_name.c_str()); @@ -109,7 +109,11 @@ void ungrab_dbus_syms()  		sSymDBUSDSOHandleG = NULL;  	} -	sSymDBUSDSOMemoryPool.destroy(); +	if ( sSymDBUSDSOMemoryPool ) +	{ +		apr_pool_destroy(sSymDBUSDSOMemoryPool); +		sSymDBUSDSOMemoryPool = NULL; +	}  	// NULL-out all of the symbols we'd grabbed  #define LL_DBUS_SYM(REQUIRED, DBUSSYM, RTN, ...) do{ll##DBUSSYM = NULL;}while(0) diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 8929c0c1a4..c2916717bd 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -113,7 +113,6 @@ int main( int argc, char **argv )  	}  	delete viewer_app_ptr;  	viewer_app_ptr = NULL; -  	return 0;  } diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 9f0218a95e..1f334815d6 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -223,7 +223,8 @@ BOOL LLFloaterAnimPreview::postBuild()  		// now load bvh file  		S32 file_size; -		LLAPRFile infile(mFilenameAndPath, LL_APR_RB, &file_size); +		LLAPRFile infile ; +		infile.open(mFilenameAndPath, LL_APR_RB, NULL, &file_size);  		if (!infile.getFileHandle())  		{ diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 5869cf6fee..881f087d7b 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -388,7 +388,7 @@ mCalculateBtn(NULL)  	mLastMouseX = 0;  	mLastMouseY = 0;  	mGLName = 0; -	mStatusLock = new LLMutex(); +	mStatusLock = new LLMutex(NULL);  	mModelPreview = NULL;  	mLODMode[LLModel::LOD_HIGH] = 0; @@ -3077,7 +3077,7 @@ LLColor4 LLModelLoader::getDaeColor(daeElement* element)  //-----------------------------------------------------------------------------  LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) -: LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex() +: LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex(NULL)  , mPelvisZOffset( 0.0f )  , mLegacyRigValid( false )  , mRigValidJointUpload( false ) diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index ceba4a0191..9db175ec2e 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -202,6 +202,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)  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 @@ void fetch_items_from_llsd(const LLSD& items_llsd)  			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 @@ void fetch_items_from_llsd(const LLSD& items_llsd)  	for (S32 i=0; i<body.size(); i++)  	{ -		if(!gAgent.getRegion()) +		if (!gAgent.getRegion())  		{ -			llwarns<<"Agent's region is null"<<llendl; +			llwarns << "Agent's region is null" << llendl;  			break;  		} -		if (0 >= body[i].size()) continue; -		std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString()); +		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 @@ void LLInventoryFetchItemsObserver::startFetch()  		// 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; diff --git a/indra/newview/llmainlooprepeater.cpp b/indra/newview/llmainlooprepeater.cpp index d73048a28b..5c020e6d98 100644 --- a/indra/newview/llmainlooprepeater.cpp +++ b/indra/newview/llmainlooprepeater.cpp @@ -46,7 +46,7 @@ void LLMainLoopRepeater::start(void)  {  	if(mQueue != 0) return; -	mQueue = new LLThreadSafeQueue<LLSD>(1024); +	mQueue = new LLThreadSafeQueue<LLSD>(gAPRPoolp, 1024);  	mMainLoopConnection = LLEventPumps::instance().  		obtain("mainloop").listen(LLEventPump::inventName(), boost::bind(&LLMainLoopRepeater::onMainLoop, this, _1));  	mRepeaterConnection = LLEventPumps::instance(). diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index e12f140747..a97e256c89 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -447,9 +447,9 @@ LLMeshRepoThread::LLMeshRepoThread()  : LLThread("mesh repo")   {   	mWaiting = false; -	mMutex = new LLMutex(); -	mHeaderMutex = new LLMutex(); -	mSignal = new LLCondition(); +	mMutex = new LLMutex(NULL); +	mHeaderMutex = new LLMutex(NULL); +	mSignal = new LLCondition(NULL);  }  LLMeshRepoThread::~LLMeshRepoThread() @@ -1198,7 +1198,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,  	mUploadTextures = upload_textures;  	mUploadSkin = upload_skin;  	mUploadJoints = upload_joints; -	mMutex = new LLMutex(); +	mMutex = new LLMutex(NULL);  	mCurlRequest = NULL;  	mPendingUploads = 0;  	mFinished = false; @@ -2043,7 +2043,7 @@ LLMeshRepository::LLMeshRepository()  void LLMeshRepository::init()  { -	mMeshMutex = new LLMutex(); +	mMeshMutex = new LLMutex(NULL);  	LLConvexDecomposition::getInstance()->initSystem(); @@ -2866,8 +2866,8 @@ LLPhysicsDecomp::LLPhysicsDecomp()  	mQuitting = false;  	mDone = false; -	mSignal = new LLCondition(); -	mMutex = new LLMutex(); +	mSignal = new LLCondition(NULL); +	mMutex = new LLMutex(NULL);  }  LLPhysicsDecomp::~LLPhysicsDecomp() diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 749acea6c1..1795be91b9 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2387,13 +2387,6 @@ void asset_callback_nothing(LLVFS*, const LLUUID&, LLAssetType::EType, void*, S3  	// nothing  } -// *HACK: Must match name in Library or agent inventory -const std::string ROOT_GESTURES_FOLDER = "Gestures"; -const std::string COMMON_GESTURES_FOLDER = "Common Gestures"; -const std::string MALE_GESTURES_FOLDER = "Male Gestures"; -const std::string FEMALE_GESTURES_FOLDER = "Female Gestures"; -const std::string SPEECH_GESTURES_FOLDER = "Speech Gestures"; -const std::string OTHER_GESTURES_FOLDER = "Other Gestures";  const S32 OPT_CLOSED_WINDOW = -1;  const S32 OPT_MALE = 0;  const S32 OPT_FEMALE = 1; @@ -2422,84 +2415,30 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response)  	return false;  } -void LLStartUp::copyLibraryGestures(const std::string& same_gender_gestures) -{ -	llinfos << "Copying library gestures" << llendl; - -	// Copy gestures -	LLUUID lib_gesture_cat_id = -		gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE,false,true); -	if (lib_gesture_cat_id.isNull()) -	{ -		llwarns << "Unable to copy gestures, source category not found" << llendl; -	} -	LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); - -	std::vector<std::string> gesture_folders_to_copy; -	gesture_folders_to_copy.push_back(MALE_GESTURES_FOLDER); -	gesture_folders_to_copy.push_back(FEMALE_GESTURES_FOLDER); -	gesture_folders_to_copy.push_back(COMMON_GESTURES_FOLDER); -	gesture_folders_to_copy.push_back(SPEECH_GESTURES_FOLDER); -	gesture_folders_to_copy.push_back(OTHER_GESTURES_FOLDER); - -	for(std::vector<std::string>::iterator it = gesture_folders_to_copy.begin(); -		it != gesture_folders_to_copy.end(); -		++it) -	{ -		std::string& folder_name = *it; - -		LLPointer<LLInventoryCallback> cb(NULL); - -		if (folder_name == same_gender_gestures || -			folder_name == COMMON_GESTURES_FOLDER || -			folder_name == OTHER_GESTURES_FOLDER) -		{ -			cb = new ActivateGestureCallback; -		} - - -		LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name); -		if (cat_id.isNull()) -		{ -			llwarns << "failed to find gesture folder for " << folder_name << llendl; -		} -		else -		{ -			llinfos << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << llendl; -			LLAppearanceMgr* app_mgr = LLAppearanceMgr::getInstance(); -			callAfterCategoryFetch(cat_id, -								   boost::bind(&LLAppearanceMgr::shallowCopyCategory, -											   app_mgr, -											   cat_id, -											   dst_id, -											   cb)); -		} -	} -} -  void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,  								   const std::string& gender_name )  { -	llinfos << "starting" << llendl; +	lldebugs << "starting" << llendl;  	// Not going through the processAgentInitialWearables path, so need to set this here.  	LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);  	// Initiate creation of COF, since we're also bypassing that.  	gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); -	S32 gender = 0; -	std::string same_gender_gestures; +	ESex gender;  	if (gender_name == "male")  	{ -		gender = OPT_MALE; -		same_gender_gestures = MALE_GESTURES_FOLDER; +		lldebugs << "male" << llendl; +		gender = SEX_MALE;  	}  	else  	{ -		gender = OPT_FEMALE; -		same_gender_gestures = FEMALE_GESTURES_FOLDER; +		lldebugs << "female" << llendl; +		gender = SEX_FEMALE;  	} +	gAgentAvatarp->setSex(gender); +  	// try to find the outfit - if not there, create some default  	// wearables.  	LLUUID cat_id = findDescendentCategoryIDByName( @@ -2507,7 +2446,8 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,  		outfit_folder_name);  	if (cat_id.isNull())  	{ -		gAgentWearables.createStandardWearables(gender); +		lldebugs << "standard wearables" << llendl; +		gAgentWearables.createStandardWearables();  	}  	else  	{ @@ -2517,26 +2457,28 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,  		bool do_append = false;  		LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);  		LLAppearanceMgr::instance().wearInventoryCategory(cat, do_copy, do_append); +		lldebugs << "initial outfit category id: " << cat_id << llendl;  	} -	// Copy gestures -	copyLibraryGestures(same_gender_gestures); -	  	// This is really misnamed -- it means we have started loading  	// an outfit/shape that will give the avatar a gender eventually. JC  	gAgent.setGenderChosen(TRUE); -  }  //static  void LLStartUp::saveInitialOutfit()  { -	if (sInitialOutfit.empty()) return; +	if (sInitialOutfit.empty()) { +		lldebugs << "sInitialOutfit is empty" << llendl; +		return; +	}  	if (sWearablesLoadedCon.connected())  	{ +		lldebugs << "sWearablesLoadedCon is connected, disconnecting" << llendl;  		sWearablesLoadedCon.disconnect();  	} +	lldebugs << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << llendl;  	LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false);  } @@ -3340,8 +3282,6 @@ bool process_login_success_response()  	}  	// Initial outfit for the user. -	// QUESTION: Why can't we simply simply set the users outfit directly -	// from a web page into the user info on the server? - Roxie  	LLSD initial_outfit = response["initial-outfit"][0];  	if(initial_outfit.size())  	{ diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 99a644eb9c..0a18ef1b2d 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -90,8 +90,6 @@ public:  	static void initNameCache(); -	static void copyLibraryGestures(const std::string& same_gender_gestures); -  	static void cleanupNameCache();  	// outfit_folder_name can be a folder anywhere in your inventory,  diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 87b6304f9d..70b0a31308 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -36,6 +36,7 @@  // Included to allow LLTextureCache::purgeTextures() to pause watchdog timeout  #include "llappviewer.h"  +#include "llmemory.h"  // Cache organization:  // cache/texture.entries @@ -176,7 +177,7 @@ private:  bool LLTextureCacheLocalFileWorker::doRead()  { -	S32 local_size = LLAPRFile::size(mFileName); +	S32 local_size = LLAPRFile::size(mFileName, mCache->getLocalAPRFilePool());  	if (local_size > 0 && mFileName.size() > 4)  	{ @@ -250,7 +251,7 @@ bool LLTextureCacheLocalFileWorker::doRead()  	}  	mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize); -	S32 bytes_read = LLAPRFile::readEx(mFileName, mReadData, mOffset, mDataSize); +	S32 bytes_read = LLAPRFile::readEx(mFileName, mReadData, mOffset, mDataSize, mCache->getLocalAPRFilePool());	  	if (bytes_read != mDataSize)  	{ @@ -331,7 +332,7 @@ bool LLTextureCacheRemoteWorker::doRead()  		// Is it a JPEG2000 file?   		{  			local_filename = filename + ".j2c"; -			local_size = LLAPRFile::size(local_filename); +			local_size = LLAPRFile::size(local_filename, mCache->getLocalAPRFilePool());  			if (local_size > 0)  			{  				mImageFormat = IMG_CODEC_J2C; @@ -341,7 +342,7 @@ bool LLTextureCacheRemoteWorker::doRead()  		if (local_size == 0)  		{  			local_filename = filename + ".jpg"; -			local_size = LLAPRFile::size(local_filename); +			local_size = LLAPRFile::size(local_filename, mCache->getLocalAPRFilePool());  			if (local_size > 0)  			{  				mImageFormat = IMG_CODEC_JPEG; @@ -352,7 +353,7 @@ bool LLTextureCacheRemoteWorker::doRead()  		if (local_size == 0)  		{  			local_filename = filename + ".tga"; -			local_size = LLAPRFile::size(local_filename); +			local_size = LLAPRFile::size(local_filename, mCache->getLocalAPRFilePool());  			if (local_size > 0)  			{  				mImageFormat = IMG_CODEC_TGA; @@ -378,7 +379,8 @@ bool LLTextureCacheRemoteWorker::doRead()  		}  		// Allocate read buffer  		mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize); -		S32 bytes_read = LLAPRFile::readEx(local_filename, mReadData, mOffset, mDataSize); +		S32 bytes_read = LLAPRFile::readEx(local_filename,  +											 mReadData, mOffset, mDataSize, mCache->getLocalAPRFilePool());  		if (bytes_read != mDataSize)  		{   			llwarns << "Error reading file from local cache: " << local_filename @@ -429,7 +431,8 @@ bool LLTextureCacheRemoteWorker::doRead()  		size = llmin(size, mDataSize);  		// Allocate the read buffer  		mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), size); -		S32 bytes_read = LLAPRFile::readEx(mCache->mHeaderDataFileName, mReadData, offset, size); +		S32 bytes_read = LLAPRFile::readEx(mCache->mHeaderDataFileName,  +											 mReadData, offset, size, mCache->getLocalAPRFilePool());  		if (bytes_read != size)  		{  			llwarns << "LLTextureCacheWorker: "  << mID @@ -455,7 +458,7 @@ bool LLTextureCacheRemoteWorker::doRead()  	if (!done && (mState == BODY))  	{  		std::string filename = mCache->getTextureFileName(mID); -		S32 filesize = LLAPRFile::size(filename); +		S32 filesize = LLAPRFile::size(filename, mCache->getLocalAPRFilePool());  		if (filesize && (filesize + TEXTURE_CACHE_ENTRY_SIZE) > mOffset)  		{ @@ -497,7 +500,8 @@ bool LLTextureCacheRemoteWorker::doRead()  			// Read the data at last  			S32 bytes_read = LLAPRFile::readEx(filename,   											 mReadData + data_offset, -											 file_offset, file_size); +											 file_offset, file_size, +											 mCache->getLocalAPRFilePool());  			if (bytes_read != file_size)  			{  				llwarns << "LLTextureCacheWorker: "  << mID @@ -598,13 +602,13 @@ bool LLTextureCacheRemoteWorker::doWrite()  			U8* padBuffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), TEXTURE_CACHE_ENTRY_SIZE);  			memset(padBuffer, 0, TEXTURE_CACHE_ENTRY_SIZE);		// Init with zeros  			memcpy(padBuffer, mWriteData, mDataSize);			// Copy the write buffer -			bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, padBuffer, offset, size); +			bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, padBuffer, offset, size, mCache->getLocalAPRFilePool());  			FREE_MEM(LLImageBase::getPrivatePool(), padBuffer);  		}  		else  		{  			// Write the header record (== first TEXTURE_CACHE_ENTRY_SIZE bytes of the raw file) in the header file -			bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, mWriteData, offset, size); +			bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, mWriteData, offset, size, mCache->getLocalAPRFilePool());  		}  		if (bytes_written <= 0) @@ -639,7 +643,8 @@ bool LLTextureCacheRemoteWorker::doWrite()  // 			llinfos << "Writing Body: " << filename << " Bytes: " << file_offset+file_size << llendl;  			S32 bytes_written = LLAPRFile::writeEx(	filename,   													mWriteData + TEXTURE_CACHE_ENTRY_SIZE, -													0, file_size); +													0, file_size, +													mCache->getLocalAPRFilePool());  			if (bytes_written <= 0)  			{  				llwarns << "LLTextureCacheWorker: "  << mID @@ -736,6 +741,9 @@ void LLTextureCacheWorker::endWork(S32 param, bool aborted)  LLTextureCache::LLTextureCache(bool threaded)  	: LLWorkerThread("TextureCache", threaded), +	  mWorkersMutex(NULL), +	  mHeaderMutex(NULL), +	  mListMutex(NULL),  	  mHeaderAPRFile(NULL),  	  mReadOnly(TRUE), //do not allow to change the texture cache until setReadOnly() is called.  	  mTexturesSizeTotal(0), @@ -839,7 +847,7 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id)  	// Is it a JPEG2000 file?   	{  		local_filename = filename + ".j2c"; -		local_size = LLAPRFile::size(local_filename); +		local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool());  		if (local_size > 0)  		{  			return TRUE ; @@ -849,7 +857,7 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id)  	// If not, is it a jpeg file?		  	{  		local_filename = filename + ".jpg"; -		local_size = LLAPRFile::size(local_filename); +		local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool());  		if (local_size > 0)  		{  			return TRUE ; @@ -859,7 +867,7 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id)  	// Hmm... What about a targa file? (used for UI texture mostly)		  	{  		local_filename = filename + ".tga"; -		local_size = LLAPRFile::size(local_filename); +		local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool());  		if (local_size > 0)  		{  			return TRUE ; @@ -905,10 +913,10 @@ void LLTextureCache::purgeCache(ELLPath location)  		if(LLFile::isdir(mTexturesDirName))  		{  			std::string file_name = gDirUtilp->getExpandedFilename(location, entries_filename); -			LLAPRFile::remove(file_name); +			LLAPRFile::remove(file_name, getLocalAPRFilePool());  			file_name = gDirUtilp->getExpandedFilename(location, cache_filename); -			LLAPRFile::remove(file_name); +			LLAPRFile::remove(file_name, getLocalAPRFilePool());  			purgeAllTextures(true);  		} @@ -984,9 +992,7 @@ LLAPRFile* LLTextureCache::openHeaderEntriesFile(bool readonly, S32 offset)  {  	llassert_always(mHeaderAPRFile == NULL);  	apr_int32_t flags = readonly ? APR_READ|APR_BINARY : APR_READ|APR_WRITE|APR_BINARY; -	// All code calling openHeaderEntriesFile, immediately calls closeHeaderEntriesFile, -	// so this file is very short-lived. -	mHeaderAPRFile = new LLAPRFile(mHeaderEntriesFileName, flags); +	mHeaderAPRFile = new LLAPRFile(mHeaderEntriesFileName, flags, getLocalAPRFilePool());  	if(offset > 0)  	{  		mHeaderAPRFile->seek(APR_SET, offset); @@ -1009,9 +1015,10 @@ void LLTextureCache::readEntriesHeader()  {  	// mHeaderEntriesInfo initializes to default values so safe not to read it  	llassert_always(mHeaderAPRFile == NULL); -	if (LLAPRFile::isExist(mHeaderEntriesFileName)) +	if (LLAPRFile::isExist(mHeaderEntriesFileName, getLocalAPRFilePool()))  	{ -		LLAPRFile::readEx(mHeaderEntriesFileName, (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo)); +		LLAPRFile::readEx(mHeaderEntriesFileName, (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo), +						  getLocalAPRFilePool());  	}  	else //create an empty entries header.  	{ @@ -1026,7 +1033,8 @@ void LLTextureCache::writeEntriesHeader()  	llassert_always(mHeaderAPRFile == NULL);  	if (!mReadOnly)  	{ -		LLAPRFile::writeEx(mHeaderEntriesFileName, (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo)); +		LLAPRFile::writeEx(mHeaderEntriesFileName, (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo), +						   getLocalAPRFilePool());  	}  } @@ -1615,7 +1623,7 @@ void LLTextureCache::purgeTextures(bool validate)  			if (uuididx == validate_idx)  			{   				LL_DEBUGS("TextureCache") << "Validating: " << filename << "Size: " << entries[idx].mBodySize << LL_ENDL; -				S32 bodysize = LLAPRFile::size(filename); +				S32 bodysize = LLAPRFile::size(filename, getLocalAPRFilePool());  				if (bodysize != entries[idx].mBodySize)  				{  					LL_WARNS("TextureCache") << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mBodySize @@ -1850,7 +1858,7 @@ void LLTextureCache::removeCachedTexture(const LLUUID& id)  		mTexturesSizeMap.erase(id);  	}  	mHeaderIDMap.erase(id); -	LLAPRFile::remove(getTextureFileName(id));		 +	LLAPRFile::remove(getTextureFileName(id), getLocalAPRFilePool());		  }  //called after mHeaderMutex is locked. @@ -1862,7 +1870,7 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename)  	{  		if (entry.mBodySize == 0)	// Always attempt to remove when mBodySize > 0.  		{ -		  if (LLAPRFile::isExist(filename))		// Sanity check. Shouldn't exist when body size is 0. +		  if (LLAPRFile::isExist(filename, getLocalAPRFilePool()))		// Sanity check. Shouldn't exist when body size is 0.  		  {  			  LL_WARNS("TextureCache") << "Entry has body size of zero but file " << filename << " exists. Deleting this file, too." << LL_ENDL;  		  } @@ -1883,7 +1891,7 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename)  	if (file_maybe_exists)  	{ -		LLAPRFile::remove(filename); +		LLAPRFile::remove(filename, getLocalAPRFilePool());		  	}  } diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 79f5ba5835..64e3a2658c 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -142,6 +142,9 @@ protected:  	std::string getTextureFileName(const LLUUID& id);  	void addCompleted(Responder* responder, bool success); +protected: +	//void setFileAPRPool(apr_pool_t* pool) { mFileAPRPool = pool ; } +  private:  	void setDirNames(ELLPath location);  	void readHeaderCache(); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index e9be45ffd0..56dfb61c4f 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -674,6 +674,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,  	  mRetryAttempt(0),  	  mActiveCount(0),  	  mGetStatus(0), +	  mWorkMutex(NULL),  	  mFirstPacket(0),  	  mLastPacket(-1),  	  mTotalPackets(0), @@ -1810,11 +1811,13 @@ bool LLTextureFetchWorker::writeToCacheComplete()  // public  LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded, bool qa_mode) -	: LLWorkerThread("TextureFetch", threaded), +	: LLWorkerThread("TextureFetch", threaded, true),  	  mDebugCount(0),  	  mDebugPause(FALSE),  	  mPacketCount(0),  	  mBadPacketCount(0), +	  mQueueMutex(getAPRPool()), +	  mNetworkQueueMutex(getAPRPool()),  	  mTextureCache(cache),  	  mImageDecodeThread(imagedecodethread),  	  mTextureBandwidth(0), diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 8139f7deda..b9293b3b31 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -149,7 +149,7 @@ void LLFilePickerThread::run()  //static  void LLFilePickerThread::initClass()  { -	sMutex = new LLMutex(); +	sMutex = new LLMutex(NULL);  }  //static @@ -816,7 +816,8 @@ LLUUID upload_new_resource(  		uuid = tid.makeAssetID(gAgent.getSecureSessionID());  		// copy this file into the vfs for upload  		S32 file_size; -		LLAPRFile infile(filename, LL_APR_RB, &file_size); +		LLAPRFile infile ; +		infile.open(filename, LL_APR_RB, NULL, &file_size);  		if (infile.getFileHandle())  		{  			LLVFile file(gVFS, uuid, asset_type, LLVFile::WRITE); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e457cc3e70..bdab250b49 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7524,7 +7524,8 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )  // static  void LLVOAvatar::dumpArchetypeXML( void* )  { -	LLAPRFile outfile(gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER, "new archetype.xml"), LL_APR_WB); +	LLAPRFile outfile; +	outfile.open(gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"new archetype.xml"), LL_APR_WB );  	apr_file_t* file = outfile.getFileHandle() ;  	if (!file)  	{ diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index baf01ec066..7db19c5c1b 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -268,6 +268,7 @@ LLVOCache::LLVOCache():  	mCacheSize(1)  {  	mEnabled = gSavedSettings.getBOOL("ObjectCacheEnabled"); +	mLocalAPRFilePoolp = new LLVolatileAPRPool() ;  }  LLVOCache::~LLVOCache() @@ -277,6 +278,7 @@ LLVOCache::~LLVOCache()  		writeCacheHeader();  		clearCacheInMemory();  	} +	delete mLocalAPRFilePoolp;  }  void LLVOCache::setDirNames(ELLPath location) @@ -433,7 +435,7 @@ void LLVOCache::removeFromCache(HeaderEntryInfo* entry)  	std::string filename;  	getObjectCacheFilename(entry->mHandle, filename); -	LLAPRFile::remove(filename); +	LLAPRFile::remove(filename, mLocalAPRFilePoolp);  	entry->mTime = INVALID_TIME ;  	updateEntry(entry) ; //update the head file.  } @@ -450,9 +452,9 @@ void LLVOCache::readCacheHeader()  	clearCacheInMemory();	  	bool success = true ; -	if (LLAPRFile::isExist(mHeaderFileName)) +	if (LLAPRFile::isExist(mHeaderFileName, mLocalAPRFilePoolp))  	{ -		LLAPRFile apr_file(mHeaderFileName, APR_READ|APR_BINARY);		 +		LLAPRFile apr_file(mHeaderFileName, APR_READ|APR_BINARY, mLocalAPRFilePoolp);		  		//read the meta element  		success = check_read(&apr_file, &mMetaInfo, sizeof(HeaderMetaInfo)) ; @@ -537,7 +539,7 @@ void LLVOCache::writeCacheHeader()  	bool success = true ;  	{ -		LLAPRFile apr_file(mHeaderFileName, APR_CREATE|APR_WRITE|APR_BINARY); +		LLAPRFile apr_file(mHeaderFileName, APR_CREATE|APR_WRITE|APR_BINARY, mLocalAPRFilePoolp);  		//write the meta element  		success = check_write(&apr_file, &mMetaInfo, sizeof(HeaderMetaInfo)) ; @@ -575,7 +577,7 @@ void LLVOCache::writeCacheHeader()  BOOL LLVOCache::updateEntry(const HeaderEntryInfo* entry)  { -	LLAPRFile apr_file(mHeaderFileName, APR_WRITE|APR_BINARY); +	LLAPRFile apr_file(mHeaderFileName, APR_WRITE|APR_BINARY, mLocalAPRFilePoolp);  	apr_file.seek(APR_SET, entry->mIndex * sizeof(HeaderEntryInfo) + sizeof(HeaderMetaInfo)) ;  	return check_write(&apr_file, (void*)entry, sizeof(HeaderEntryInfo)) ; @@ -601,7 +603,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca  	{  		std::string filename;  		getObjectCacheFilename(handle, filename); -		LLAPRFile apr_file(filename, APR_READ|APR_BINARY); +		LLAPRFile apr_file(filename, APR_READ|APR_BINARY, mLocalAPRFilePoolp);  		LLUUID cache_id ;  		success = check_read(&apr_file, cache_id.mData, UUID_BYTES) ; @@ -724,7 +726,7 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:  	{  		std::string filename;  		getObjectCacheFilename(handle, filename); -		LLAPRFile apr_file(filename, APR_CREATE|APR_WRITE|APR_BINARY); +		LLAPRFile apr_file(filename, APR_CREATE|APR_WRITE|APR_BINARY, mLocalAPRFilePoolp);  		success = check_write(&apr_file, (void*)id.mData, UUID_BYTES) ; diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 13651c6779..14e3b4c793 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -142,6 +142,7 @@ private:  	U32                  mNumEntries;  	std::string          mHeaderFileName ;  	std::string          mObjectCacheDirName; +	LLVolatileAPRPool*   mLocalAPRFilePoolp ; 	  	header_entry_queue_t mHeaderEntryQueue;  	handle_entry_map_t   mHandleEntryMap;	 diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 90a05cd9e5..56d71e96b3 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -942,7 +942,7 @@ void LLVivoxVoiceClient::stateMachine()  				if(!mSocket)  				{ -					mSocket = LLSocket::create(LLSocket::STREAM_TCP);	 +					mSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP);	  				}  				mConnected = mSocket->blockingConnect(mDaemonHost); diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp index 64ca94b567..4f582fc2db 100644 --- a/indra/newview/llwatchdog.cpp +++ b/indra/newview/llwatchdog.cpp @@ -178,8 +178,8 @@ void LLWatchdog::init(killer_event_callback func)  	mKillerCallback = func;  	if(!mSuspectsAccessMutex && !mTimer)  	{ -		mSuspectsAccessMutex = new LLMutex; -		mTimer = new LLWatchdogTimerThread; +		mSuspectsAccessMutex = new LLMutex(NULL); +		mTimer = new LLWatchdogTimerThread();  		mTimer->setSleepTime(WATCHDOG_SLEEP_TIME_USEC / 1000);  		mLastClockCount = LLTimer::getTotalTime(); diff --git a/indra/newview/skins/default/xui/en/floater_build_options.xml b/indra/newview/skins/default/xui/en/floater_build_options.xml index c247a12e7a..afb7917043 100644 --- a/indra/newview/skins/default/xui/en/floater_build_options.xml +++ b/indra/newview/skins/default/xui/en/floater_build_options.xml @@ -37,7 +37,7 @@       layout="topleft"       left="10"       tool_tip="Grid opacity" -     name="grid_opacity_label" +     name="grid_mode_label"       top_pad="30"       width="123">          Mode diff --git a/indra/newview/skins/default/xui/en/panel_region_covenant.xml b/indra/newview/skins/default/xui/en/panel_region_covenant.xml index 2b2ea78fac..df16f6fd37 100644 --- a/indra/newview/skins/default/xui/en/panel_region_covenant.xml +++ b/indra/newview/skins/default/xui/en/panel_region_covenant.xml @@ -107,13 +107,13 @@      <text_editor       enabled="false"       follows="left|top" -     height="100" +     height="180"       layout="topleft" -     left="110" +     left="10"       max_length="65535"       name="covenant_editor" -     top_delta="30" -     width="340" +     top_delta="20" +     width="460"       word_wrap="true">          There is no Covenant provided for this Estate.      </text_editor> diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml index 15df095efa..4550603134 100644 --- a/indra/newview/skins/default/xui/en/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml @@ -174,31 +174,31 @@      <button       follows="left|top"       height="20" -     label="Get Top Scripts..." +     label="Restart Region"       layout="topleft" -     left="10" -     name="top_scripts_btn" -     tool_tip="List of objects spending the most time running scripts" -     top_pad="5" +     left_pad="155" +     name="restart_btn" +     tool_tip="Give 2 minute countdown and restart region" +     top_delta="0"       width="150" />      <button       follows="left|top"       height="20" -     label="Restart Region" +     label="Get Top Scripts..."       layout="topleft"       left="10" -     name="restart_btn" -     tool_tip="Give 2 minute countdown and restart region" +     name="top_scripts_btn" +     tool_tip="List of objects spending the most time running scripts"       top_pad="5" -     width="130" /> +     width="150" />      <button       follows="left|top"       height="20"       label="Delay Restart"       layout="topleft" -     left="10" +     left_pad="155"       name="cancel_restart_btn"       tool_tip="Delay region restart by one hour" -     top_pad="5" -     width="130" /> +     top_delta="0" +     width="150" />  </panel> diff --git a/indra/newview/skins/default/xui/es/panel_pick_info.xml b/indra/newview/skins/default/xui/es/panel_pick_info.xml index a1259cf483..3450279b4a 100644 --- a/indra/newview/skins/default/xui/es/panel_pick_info.xml +++ b/indra/newview/skins/default/xui/es/panel_pick_info.xml @@ -1,6 +1,6 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel name="panel_pick_info"> -	<text name="title" value="Información del destacado"/> +	<text name="title" value="Datos del destacado"/>  	<scroll_container name="profile_scroll">  		<panel name="scroll_content_panel">  			<text_editor name="pick_name" value="[nombre]"/> diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp index 102294959a..acc6e814bc 100644 --- a/indra/newview/tests/llworldmap_test.cpp +++ b/indra/newview/tests/llworldmap_test.cpp @@ -27,6 +27,7 @@  // Dependencies  #include "linden_common.h" +#include "llapr.h"  #include "llsingleton.h"  #include "lltrans.h"  #include "lluistring.h" | 
