It kinda works...

Loads assets across the network, body shape still broken and not displaying properly in grid mode
0.1-prestable
gareth 2007-04-30 04:50:25 +00:00
parent d9d301c9d9
commit ce60ca5e67
2 changed files with 31 additions and 3 deletions

View File

@ -100,7 +100,35 @@ namespace OpenGridServices.AssetServer
}
public string assetGetMethod(string request, string path, string param) {
return "";
byte[] assetdata=getAssetData(new LLUUID(param),false);
if(assetdata!=null) {
return System.Text.Encoding.ASCII.GetString(assetdata);
} else {
return "";
}
}
public byte[] getAssetData(LLUUID assetID, bool isTexture) {
byte[] idata = null;
bool found = false;
AssetStorage foundAsset = null;
IObjectSet result = db.Get(new AssetStorage(assetID));
if (result.Count > 0)
{
foundAsset = (AssetStorage)result.Next();
found = true;
}
if (found)
{
return foundAsset.Data;
}
else
{
return null;
}
}
public void setupDB() {

View File

@ -66,8 +66,8 @@ namespace OpenSim.GridInterfaces.Remote
// 404... THE MAGIC FILE NOT FOUND ERROR, very useful for telling you things such as a file (or asset ;) ) not being found!!!!!!!!!!! it's 2:22AM
ARequest req = this._assetRequests.Dequeue();
LLUUID assetID = req.AssetID;
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(" RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID + "/data");
WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "assets/" + assetID + "/data");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(" RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID);
WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "assets/" + assetID);
WebResponse AssetResponse = AssetLoad.GetResponse();
byte[] idata = new byte[(int)AssetResponse.ContentLength];
BinaryReader br = new BinaryReader(AssetResponse.GetResponseStream());