From e0f8362e7a24a842a569b692652bc18784a2248b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 14 Apr 2010 22:31:11 +0100
Subject: minor: add some documentation around the asset udp request path and
replace some magic numbers with libomv enums
---
OpenSim/Data/SQLite/SQLiteAssetData.cs | 2 +-
.../Region/ClientStack/LindenUDP/LLClientView.cs | 51 ++++++++++++++--------
2 files changed, 34 insertions(+), 19 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index ace40e5..a032670 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
-
+
cmd.ExecuteNonQuery();
}
}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index f0f3932..b3f5f09 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -7069,6 +7069,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true;
}
+ ///
+ /// This is the entry point for the UDP route by which the client can retrieve asset data. If the request
+ /// is successful then a TransferInfo packet will be sent back, followed by one or more TransferPackets
+ ///
+ ///
+ ///
+ /// This parameter may be ignored since we appear to return true whatever happens
private bool HandleTransferRequest(IClientAPI sender, Packet Pack)
{
//m_log.Debug("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request");
@@ -7079,7 +7086,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Has to be done here, because AssetCache can't do it
//
UUID taskID = UUID.Zero;
- if (transfer.TransferInfo.SourceType == 3)
+ if (transfer.TransferInfo.SourceType == (int)SourceType.SimInventoryItem)
{
taskID = new UUID(transfer.TransferInfo.Params, 48);
UUID itemID = new UUID(transfer.TransferInfo.Params, 64);
@@ -11356,17 +11363,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return String.Empty;
}
- public void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID)
+ ///
+ /// Make an asset request to the asset service in response to a client request.
+ ///
+ ///
+ ///
+ protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID)
{
UUID requestID = UUID.Zero;
- if (transferRequest.TransferInfo.SourceType == 2)
+ if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset)
{
- //direct asset request
requestID = new UUID(transferRequest.TransferInfo.Params, 0);
}
- else if (transferRequest.TransferInfo.SourceType == 3)
+ else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem)
{
- //inventory asset request
requestID = new UUID(transferRequest.TransferInfo.Params, 80);
//m_log.Debug("[XXX] inventory asset request " + requestID);
//if (taskID == UUID.Zero) // Agent
@@ -11379,29 +11389,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// }
}
- //check to see if asset is in local cache, if not we need to request it from asset server.
- //m_log.Debug("asset request " + requestID);
+ //m_log.DebugFormat("[LLCLIENTVIEW]: {0} requesting asset {1}", Name, requestID);
m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived);
-
}
+ ///
+ /// When we get a reply back from the asset service in response to a client request, send back the data.
+ ///
+ ///
+ ///
+ ///
protected void AssetReceived(string id, Object sender, AssetBase asset)
{
TransferRequestPacket transferRequest = (TransferRequestPacket)sender;
UUID requestID = UUID.Zero;
- byte source = 2;
- if ((transferRequest.TransferInfo.SourceType == 2) || (transferRequest.TransferInfo.SourceType == 2222))
+ byte source = (byte)SourceType.Asset;
+
+ if ((transferRequest.TransferInfo.SourceType == (int)SourceType.Asset)
+ || (transferRequest.TransferInfo.SourceType == 2222))
{
- //direct asset request
requestID = new UUID(transferRequest.TransferInfo.Params, 0);
}
- else if ((transferRequest.TransferInfo.SourceType == 3) || (transferRequest.TransferInfo.SourceType == 3333))
+ else if ((transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem)
+ || (transferRequest.TransferInfo.SourceType == 3333))
{
- //inventory asset request
requestID = new UUID(transferRequest.TransferInfo.Params, 80);
- source = 3;
+ source = (byte)SourceType.SimInventoryItem;
//m_log.Debug("asset request " + requestID);
}
@@ -11414,9 +11429,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if ((userAssets != string.Empty) && (userAssets != m_hyperAssets.GetSimAssetServer()))
{
m_log.DebugFormat("[CLIENT]: asset {0} not found in local asset storage. Trying user's storage.", id);
- if (transferRequest.TransferInfo.SourceType == 2)
+ if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset)
transferRequest.TransferInfo.SourceType = 2222; // marker
- else if (transferRequest.TransferInfo.SourceType == 3)
+ else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem)
transferRequest.TransferInfo.SourceType = 3333; // marker
m_assetService.Get(userAssets + "/" + id, transferRequest, AssetReceived);
@@ -11431,7 +11446,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
// Scripts cannot be retrieved by direct request
- if (transferRequest.TransferInfo.SourceType == 2 && asset.Type == 10)
+ if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset && asset.Type == 10)
return;
// The asset is known to exist and is in our cache, so add it to the AssetRequests list
--
cgit v1.1
From 407b48f3bb20b643c694c725bbf94a02e73d9fd6 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 14 Apr 2010 19:22:48 -0700
Subject: The missing .csproj for the Robust 32 bit launcher
---
.../Robust.32BitLaunch/Robust.32BitLaunch.csproj | 62 ++++++++++++++++++++++
1 file changed, 62 insertions(+)
create mode 100644 OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj
(limited to 'OpenSim')
diff --git a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj
new file mode 100644
index 0000000..f19e082
--- /dev/null
+++ b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj
@@ -0,0 +1,62 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {595D67F3-B413-4A43-8568-5B5930E3B31D}
+ Exe
+ Properties
+ Robust._32BitLaunch
+ Robust.32BitLaunch
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ ..\..\..\bin\
+ DEBUG;TRACE
+ prompt
+ 4
+ x86
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\bin\log4net.dll
+
+
+ False
+ ..\..\..\bin\OpenSim.Server.exe
+
+
+
+ 3.5
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit v1.1