diff options
| -rwxr-xr-x | .hgtags | 1 | ||||
| -rwxr-xr-x | autobuild.xml | 10 | ||||
| -rwxr-xr-x | indra/llmessage/llassetstorage.cpp | 26 | ||||
| -rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/VIEWER_VERSION.txt | 2 | 
5 files changed, 45 insertions, 16 deletions
| @@ -511,3 +511,4 @@ d07f76c5b9860fb87924d00ca729f7d4532534d6 3.7.29-release  e821ef17c6edea4a59997719d8ba416d8c16e143 3.8.5-release  5a5bd148943bfb46cf2ff2ccf376c42dee93d19b 3.8.6-release  ae3297cdd03ab14f19f3811acbc4acd3eb600336 4.0.0-release +759710a9acef61aaf7b69f4bc4a5a913de87ad8a 4.0.1-release diff --git a/autobuild.xml b/autobuild.xml index 72f55fce1d..ff436a7ef8 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1536,11 +1536,11 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>6b9eaaf83fcf8bfd4bb6966c24df7f29</string> +              <string>fe4b09930b509d322b10bd27821bd876</string>                <key>hash_algorithm</key>                <string>md5</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/310043/arch/Darwin/installer/llceflib-1.5.1.310043-darwin-310043.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/310159/arch/Darwin/installer/llceflib-1.5.3.310159-darwin-310159.tar.bz2</string>              </map>              <key>name</key>              <string>darwin</string> @@ -1550,18 +1550,18 @@              <key>archive</key>              <map>                <key>hash</key> -              <string>578f21be02efc98bbf426529f916fce8</string> +              <string>8fe98baea7ecb950d9611e9f6850cb1f</string>                <key>hash_algorithm</key>                <string>md5</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/310043/arch/CYGWIN/installer/llceflib-1.5.1.310043-windows-310043.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/310159/arch/CYGWIN/installer/llceflib-1.5.3.310159-windows-310159.tar.bz2</string>              </map>              <key>name</key>              <string>windows</string>            </map>          </map>          <key>version</key> -        <string>1.5.1.310043</string> +        <string>1.5.3.310159</string>        </map>        <key>llphysicsextensions_source</key>        <map> diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 61663e1982..11505fcc75 100755 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -608,36 +608,42 @@ void LLAssetStorage::downloadCompleteCallback(  		return;  	} +	LLUUID callback_id; +	LLAssetType::EType callback_type; +  	// Inefficient since we're doing a find through a list that may have thousands of elements.  	// This is due for refactoring; we will probably change mPendingDownloads into a set.  	request_list_t::iterator download_iter = std::find(gAssetStorage->mPendingDownloads.begin(),   													   gAssetStorage->mPendingDownloads.end(),  													   req); -	// If the LLAssetRequest doesn't exist in the downloads queue, then it either has already been deleted -	// by _cleanupRequests, or it's a transfer. +  	if (download_iter != gAssetStorage->mPendingDownloads.end())  	{ -		req->setUUID(file_id); -		req->setType(file_type); +		// either has already been deleted by _cleanupRequests (as result req becomes invalid) +		// or it's a transfer. +		callback_id = file_id; +		callback_type = file_type; +	} +	else +	{ +		// we will be deleting elements from mPendingDownloads which req should be part of, save id and type +		callback_id = req->getUUID(); +		callback_type = req->getType();  	}  	if (LL_ERR_NOERR == result)  	{  		// we might have gotten a zero-size file -		LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getType()); +		LLVFile vfile(gAssetStorage->mVFS, callback_id, callback_type);  		if (vfile.getSize() <= 0)  		{ -			LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset " << req->getUUID() << LL_ENDL; +			LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset " << callback_id << LL_ENDL;  			result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE;  			vfile.remove();  		}  	} -	// we will be deleting elements of mPendingDownloads which req might be part of, save id and type for reference -	LLUUID callback_id = req->getUUID(); -	LLAssetType::EType callback_type = req->getType(); -	  	// find and callback ALL pending requests for this UUID  	// SJB: We process the callbacks in reverse order, I do not know if this is important,  	//      but I didn't want to mess with it. diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 9028f73e30..8d9d1dd975 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -69,6 +69,7 @@ private:  	bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password);  	void onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle);  	void onFileDownloadCallback(std::string filename); +	const std::string onFileDialogCallback();  	void postDebugMessage(const std::string& msg);  	void authResponse(LLPluginMessage &message); @@ -95,6 +96,7 @@ private:  	bool mCanPaste;  	std::string mCachePath;  	std::string mCookiePath; +	std::string mPickedFile;  	LLCEFLib* mLLCEFLib;      VolumeCatcher mVolumeCatcher; @@ -123,6 +125,7 @@ MediaPluginBase(host_send_func, host_user_data)  	mCanPaste = false;  	mCachePath = "";  	mCookiePath = ""; +	mPickedFile = "";  	mLLCEFLib = new LLCEFLib();  } @@ -305,6 +308,20 @@ void MediaPluginCEF::onFileDownloadCallback(const std::string filename)  	sendMessage(message);  } +//////////////////////////////////////////////////////////////////////////////// +// +const std::string MediaPluginCEF::onFileDialogCallback() +{ +	mPickedFile.clear(); + +	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file"); +	message.setValueBoolean("blocking_request", true); + +	sendMessage(message); + +	return mPickedFile; +} +  void MediaPluginCEF::onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle)  {  	std::string name = ""; @@ -439,6 +456,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)  				mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1, _2));  				mLLCEFLib->setOnHTTPAuthCallback(boost::bind(&MediaPluginCEF::onHTTPAuthCallback, this, _1, _2, _3, _4));  				mLLCEFLib->setOnFileDownloadCallback(boost::bind(&MediaPluginCEF::onFileDownloadCallback, this, _1)); +				mLLCEFLib->setOnFileDialogCallback(boost::bind(&MediaPluginCEF::onFileDialogCallback, this));  				mLLCEFLib->setOnCursorChangedCallback(boost::bind(&MediaPluginCEF::onCursorChangedCallback, this, _1, _2));  				mLLCEFLib->setOnRequestExitCallback(boost::bind(&MediaPluginCEF::onRequestExitCallback, this)); @@ -648,6 +666,10 @@ void MediaPluginCEF::receiveMessage(const char* message_string)  			{  				mEnableMediaPluginDebugging = message_in.getValueBoolean("enable");  			} +			if (message_name == "pick_file_response") +			{ +				mPickedFile = message_in.getValue("file"); +			}  			if (message_name == "auth_response")  			{  				authResponse(message_in); diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 1454f6ed4b..4d54daddb6 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -4.0.1 +4.0.2 | 
