Done some more conversion work on the asset server
parent
328c9ccb24
commit
002336e95c
|
@ -38,22 +38,18 @@ using OpenSim.Framework;
|
|||
using OpenSim.Framework.Sims;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Interfaces;
|
||||
using OpenSim.GridInterfaces.Local; // REFACTORING IS NEEDED!!!!!!!!!!!
|
||||
using OpenSim.Servers;
|
||||
|
||||
namespace OpenGridServices.GridServer
|
||||
namespace OpenGridServices.AssetServer
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class OpenGrid_Main : BaseServer, conscmd_callback
|
||||
public class OpenAsset_Main : BaseServer, conscmd_callback
|
||||
{
|
||||
private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll";
|
||||
public GridConfig Cfg;
|
||||
private IObjectContainer db;
|
||||
|
||||
public static OpenGrid_Main thegrid;
|
||||
|
||||
//public LLUUID highestUUID;
|
||||
|
||||
private SimProfileManager m_simProfileManager;
|
||||
public static OpenAsset_Main assetserver;
|
||||
|
||||
private ConsoleBase m_console;
|
||||
|
||||
|
@ -62,10 +58,10 @@ namespace OpenGridServices.GridServer
|
|||
{
|
||||
Console.WriteLine("Starting...\n");
|
||||
|
||||
thegrid = new OpenGrid_Main();
|
||||
thegrid.Startup();
|
||||
assetserver = new OpenAsset_Main();
|
||||
assetserver.Startup();
|
||||
|
||||
thegrid.Work();
|
||||
assetserver.Work();
|
||||
}
|
||||
|
||||
private void Work()
|
||||
|
@ -78,57 +74,34 @@ namespace OpenGridServices.GridServer
|
|||
}
|
||||
}
|
||||
|
||||
private OpenGrid_Main()
|
||||
private OpenAsset_Main()
|
||||
{
|
||||
m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
|
||||
m_console = new ConsoleBase("opengrid-AssetServer-console.log", "OpenGrid", this, false);
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
public void Startup()
|
||||
{
|
||||
m_console.WriteLine("Main.cs:Startup() - Loading configuration");
|
||||
/*m_console.WriteLine("Main.cs:Startup() - Loading configuration");
|
||||
Cfg = this.LoadConfigDll(this.ConfigDll);
|
||||
Cfg.InitConfig();
|
||||
Cfg.InitConfig();
*/
|
||||
|
||||
m_console.WriteLine("Main.cs:Startup() - Loading sim profiles from database");
|
||||
m_simProfileManager = new SimProfileManager( this );
|
||||
m_simProfileManager.LoadProfiles();
|
||||
|
||||
m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(8001);
|
||||
BaseHttpServer httpServer = new BaseHttpServer(8003);
|
||||
|
||||
httpServer.AddXmlRPCHandler("simulator_login", m_simProfileManager.XmlRpcLoginToSimulatorMethod);
|
||||
|
||||
httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod);
|
||||
/*httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod);
|
||||
httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod);
|
||||
httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod);
|
||||
httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod);
|
||||
httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod);
*/
|
||||
httpServer.AddRestHAndler("GET", "/assets/", this.assetGetMethod);
|
||||
|
||||
|
||||
// lbsa71 : This code snippet taken from old http server.
|
||||
// I have no idea what this was supposed to do - looks like an infinite recursion to me.
|
||||
// case "regions":
|
||||
//// DIRTY HACK ALERT
|
||||
//Console.WriteLine("/regions/ accessed");
|
||||
//TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle((ulong)Convert.ToUInt64(rest_params[1]));
|
||||
//respstring = ParseREST("/regions/" + rest_params[1], requestBody, HTTPmethod);
|
||||
//break;
|
||||
|
||||
// lbsa71 : I guess these were never used?
|
||||
//Listener.Prefixes.Add("http://+:8001/gods/");
|
||||
//Listener.Prefixes.Add("http://+:8001/highestuuid/");
|
||||
//Listener.Prefixes.Add("http://+:8001/uuidblocks/");
|
||||
|
||||
httpServer.Start();
|
||||
|
||||
m_console.WriteLine("Main.cs:Startup() - Starting sim status checker");
|
||||
|
||||
Timer simCheckTimer = new Timer( 300000 ); // 5 minutes
|
||||
simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
|
||||
simCheckTimer.Enabled = true;
|
||||
}
|
||||
|
||||
private GridConfig LoadConfigDll(string dllName)
|
||||
/*private GridConfig LoadConfigDll(string dllName)
|
||||
{
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||
GridConfig config = null;
|
||||
|
@ -154,49 +127,14 @@ namespace OpenGridServices.GridServer
|
|||
}
|
||||
pluginAssembly = null;
|
||||
return config;
|
||||
}
|
||||
|
||||
public void CheckSims(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values)
|
||||
{
|
||||
string SimResponse = "";
|
||||
try
|
||||
{
|
||||
WebRequest CheckSim = WebRequest.Create("http://" + sim.sim_ip + ":" + sim.sim_port.ToString() + "/checkstatus/");
|
||||
CheckSim.Method = "GET";
|
||||
CheckSim.ContentType = "text/plaintext";
|
||||
CheckSim.ContentLength = 0;
|
||||
|
||||
StreamWriter stOut = new StreamWriter(CheckSim.GetRequestStream(), System.Text.Encoding.ASCII);
|
||||
stOut.Write("");
|
||||
stOut.Close();
|
||||
|
||||
StreamReader stIn = new StreamReader(CheckSim.GetResponse().GetResponseStream());
|
||||
SimResponse = stIn.ReadToEnd();
|
||||
stIn.Close();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
if (SimResponse == "OK")
|
||||
{
|
||||
m_simProfileManager.SimProfiles[sim.UUID].online = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_simProfileManager.SimProfiles[sim.UUID].online = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public void RunCmd(string cmd, string[] cmdparams)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
case "help":
|
||||
m_console.WriteLine("shutdown - shutdown the grid (USE CAUTION!)");
|
||||
m_console.WriteLine("shutdown - shutdown this asset server (USE CAUTION!)");
|
||||
break;
|
||||
|
||||
case "shutdown":
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OGS-GridServer")]
|
||||
[assembly: AssemblyTitle("OGS-AssetServer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("OGS-GridServer")]
|
||||
[assembly: AssemblyProduct("OGS-AssetServer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2007")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -1,328 +0,0 @@
|
|||
/*
|
||||
Copyright (c) OpenGrid project, http://osgrid.org/
|
||||
|
||||
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the <organization> nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using libsecondlife;
|
||||
using OpenSim.Framework.Utilities;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Sims;
|
||||
using Db4objects.Db4o;
|
||||
using Nwc.XmlRpc;
|
||||
using System.Xml;
|
||||
|
||||
namespace OpenGridServices.GridServer
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class SimProfileManager
|
||||
{
|
||||
|
||||
public Dictionary<LLUUID, SimProfileBase> SimProfiles = new Dictionary<LLUUID, SimProfileBase>();
|
||||
private OpenGrid_Main m_gridManager;
|
||||
|
||||
public SimProfileManager(OpenGrid_Main gridManager)
|
||||
{
|
||||
m_gridManager = gridManager;
|
||||
}
|
||||
|
||||
public void LoadProfiles()
|
||||
{ // should abstract this out
|
||||
IObjectContainer db;
|
||||
db = Db4oFactory.OpenFile("simprofiles.yap");
|
||||
IObjectSet result = db.Get(typeof(SimProfileBase));
|
||||
foreach (SimProfileBase simprof in result)
|
||||
{
|
||||
SimProfiles.Add(simprof.UUID, simprof);
|
||||
}
|
||||
MainConsole.Instance.WriteLine("SimProfiles.Cs:LoadProfiles() - Successfully loaded " + result.Count.ToString() + " from database");
|
||||
db.Close();
|
||||
}
|
||||
|
||||
public SimProfileBase GetProfileByHandle(ulong reqhandle)
|
||||
{
|
||||
foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys)
|
||||
{
|
||||
if (SimProfiles[UUID].regionhandle == reqhandle) return SimProfiles[UUID];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public SimProfileBase GetProfileByLLUUID(LLUUID ProfileLLUUID)
|
||||
{
|
||||
foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys)
|
||||
{
|
||||
if (SimProfiles[UUID].UUID == ProfileLLUUID) return SimProfiles[UUID];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool AuthenticateSim(LLUUID RegionUUID, uint regionhandle, string simrecvkey)
|
||||
{
|
||||
SimProfileBase TheSim = GetProfileByHandle(regionhandle);
|
||||
if (TheSim != null)
|
||||
if (TheSim.recvkey == simrecvkey)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else return false;
|
||||
|
||||
}
|
||||
|
||||
public string GetXMLNeighbours(ulong reqhandle)
|
||||
{
|
||||
string response = "";
|
||||
SimProfileBase central_region = GetProfileByHandle(reqhandle);
|
||||
SimProfileBase neighbour;
|
||||
for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
|
||||
{
|
||||
if (GetProfileByHandle(Util.UIntsToLong((uint)((central_region.RegionLocX + x) * 256), (uint)(central_region.RegionLocY + y) * 256)) != null)
|
||||
{
|
||||
neighbour = GetProfileByHandle(Util.UIntsToLong((uint)((central_region.RegionLocX + x) * 256), (uint)(central_region.RegionLocY + y) * 256));
|
||||
response += "<neighbour>";
|
||||
response += "<sim_ip>" + neighbour.sim_ip + "</sim_ip>";
|
||||
response += "<sim_port>" + neighbour.sim_port.ToString() + "</sim_port>";
|
||||
response += "<locx>" + neighbour.RegionLocX.ToString() + "</locx>";
|
||||
response += "<locy>" + neighbour.RegionLocY.ToString() + "</locy>";
|
||||
response += "<regionhandle>" + neighbour.regionhandle.ToString() + "</regionhandle>";
|
||||
response += "</neighbour>";
|
||||
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
public SimProfileBase CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey)
|
||||
{
|
||||
SimProfileBase newprofile = new SimProfileBase();
|
||||
newprofile.regionname = regionname;
|
||||
newprofile.sim_ip = sim_ip;
|
||||
newprofile.sim_port = sim_port;
|
||||
newprofile.RegionLocX = RegionLocX;
|
||||
newprofile.RegionLocY = RegionLocY;
|
||||
newprofile.caps_url = "http://" + sim_ip + ":9000/";
|
||||
newprofile.sendkey = sendkey;
|
||||
newprofile.recvkey = recvkey;
|
||||
newprofile.regionhandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
|
||||
newprofile.UUID = LLUUID.Random();
|
||||
this.SimProfiles.Add(newprofile.UUID, newprofile);
|
||||
return newprofile;
|
||||
}
|
||||
|
||||
public XmlRpcResponse XmlRpcLoginToSimulatorMethod(XmlRpcRequest request)
|
||||
{
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable responseData = new Hashtable();
|
||||
response.Value = responseData;
|
||||
|
||||
SimProfileBase TheSim = null;
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
|
||||
if (requestData.ContainsKey("UUID"))
|
||||
{
|
||||
TheSim = GetProfileByLLUUID(new LLUUID((string)requestData["UUID"]));
|
||||
}
|
||||
else if (requestData.ContainsKey("region_handle"))
|
||||
{
|
||||
TheSim = GetProfileByHandle((ulong)Convert.ToUInt64(requestData["region_handle"]));
|
||||
}
|
||||
|
||||
if (TheSim == null)
|
||||
{
|
||||
responseData["error"] = "sim not found";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
ArrayList SimNeighboursData = new ArrayList();
|
||||
|
||||
SimProfileBase neighbour;
|
||||
Hashtable NeighbourBlock;
|
||||
for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
|
||||
{
|
||||
if (GetProfileByHandle(Helpers.UIntsToLong((uint)((TheSim.RegionLocX + x) * 256), (uint)(TheSim.RegionLocY + y) * 256)) != null)
|
||||
{
|
||||
neighbour = GetProfileByHandle(Helpers.UIntsToLong((uint)((TheSim.RegionLocX + x) * 256), (uint)(TheSim.RegionLocY + y) * 256));
|
||||
|
||||
NeighbourBlock = new Hashtable();
|
||||
NeighbourBlock["sim_ip"] = neighbour.sim_ip;
|
||||
NeighbourBlock["sim_port"] = neighbour.sim_port.ToString();
|
||||
NeighbourBlock["region_locx"] = neighbour.RegionLocX.ToString();
|
||||
NeighbourBlock["region_locy"] = neighbour.RegionLocY.ToString();
|
||||
NeighbourBlock["UUID"] = neighbour.UUID.ToString();
|
||||
|
||||
if (neighbour.UUID != TheSim.UUID) SimNeighboursData.Add(NeighbourBlock);
|
||||
}
|
||||
}
|
||||
|
||||
responseData["UUID"] = TheSim.UUID.ToString();
|
||||
responseData["region_locx"] = TheSim.RegionLocX.ToString();
|
||||
responseData["region_locy"] = TheSim.RegionLocY.ToString();
|
||||
responseData["regionname"] = TheSim.regionname;
|
||||
responseData["estate_id"] = "1";
|
||||
responseData["neighbours"] = SimNeighboursData;
|
||||
|
||||
responseData["sim_ip"] = TheSim.sim_ip;
|
||||
responseData["sim_port"] = TheSim.sim_port.ToString();
|
||||
responseData["asset_url"] = m_gridManager.Cfg.DefaultAssetServer;
|
||||
responseData["asset_sendkey"] = m_gridManager.Cfg.AssetSendKey;
|
||||
responseData["asset_recvkey"] = m_gridManager.Cfg.AssetRecvKey;
|
||||
responseData["user_url"] = m_gridManager.Cfg.DefaultUserServer;
|
||||
responseData["user_sendkey"] = m_gridManager.Cfg.UserSendKey;
|
||||
responseData["user_recvkey"] = m_gridManager.Cfg.UserRecvKey;
|
||||
responseData["authkey"] = m_gridManager.Cfg.SimSendKey;
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
public string RestSetSimMethod(string request, string path, string param)
|
||||
{
|
||||
Console.WriteLine("SimProfiles.cs:RestSetSimMethod() - processing request......");
|
||||
SimProfileBase TheSim;
|
||||
TheSim = GetProfileByLLUUID(new LLUUID(param));
|
||||
if ((TheSim) == null)
|
||||
{
|
||||
TheSim = new SimProfileBase();
|
||||
LLUUID UUID = new LLUUID(param);
|
||||
TheSim.UUID = UUID;
|
||||
}
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.LoadXml(request);
|
||||
XmlNode rootnode = doc.FirstChild;
|
||||
XmlNode authkeynode = rootnode.ChildNodes[0];
|
||||
if (authkeynode.Name != "authkey")
|
||||
{
|
||||
return "ERROR! bad XML - expected authkey tag";
|
||||
}
|
||||
|
||||
XmlNode simnode = rootnode.ChildNodes[1];
|
||||
if (simnode.Name != "sim")
|
||||
{
|
||||
return "ERROR! bad XML - expected sim tag";
|
||||
}
|
||||
|
||||
if (authkeynode.InnerText != m_gridManager.Cfg.SimRecvKey)
|
||||
{
|
||||
return "ERROR! invalid key";
|
||||
}
|
||||
for (int i = 0; i < simnode.ChildNodes.Count; i++)
|
||||
{
|
||||
switch (simnode.ChildNodes[i].Name)
|
||||
{
|
||||
case "regionname":
|
||||
TheSim.regionname = simnode.ChildNodes[i].InnerText;
|
||||
break;
|
||||
|
||||
case "sim_ip":
|
||||
TheSim.sim_ip = simnode.ChildNodes[i].InnerText;
|
||||
break;
|
||||
|
||||
case "sim_port":
|
||||
TheSim.sim_port = Convert.ToUInt32(simnode.ChildNodes[i].InnerText);
|
||||
break;
|
||||
|
||||
case "region_locx":
|
||||
TheSim.RegionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
||||
TheSim.regionhandle = Helpers.UIntsToLong((TheSim.RegionLocX * 256), (TheSim.RegionLocY * 256));
|
||||
break;
|
||||
|
||||
case "region_locy":
|
||||
TheSim.RegionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
||||
TheSim.regionhandle = Helpers.UIntsToLong((TheSim.RegionLocX * 256), (TheSim.RegionLocY * 256));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
SimProfiles.Add(TheSim.UUID, TheSim);
|
||||
IObjectContainer db;
|
||||
db = Db4oFactory.OpenFile("simprofiles.yap");
|
||||
db.Set(TheSim);
|
||||
db.Close();
|
||||
return "OK";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return "ERROR! could not save to database!";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public string RestGetRegionMethod(string request, string path, string param)
|
||||
{
|
||||
SimProfileBase TheSim = GetProfileByHandle((ulong)Convert.ToUInt64(param));
|
||||
return RestGetSimMethod("", "/sims/", param);
|
||||
}
|
||||
|
||||
public string RestSetRegionMethod(string request, string path, string param)
|
||||
{
|
||||
SimProfileBase TheSim = GetProfileByHandle((ulong)Convert.ToUInt64(param));
|
||||
return RestSetSimMethod("", "/sims/", param);
|
||||
}
|
||||
|
||||
public string RestGetSimMethod(string request, string path, string param)
|
||||
{
|
||||
string respstring = String.Empty;
|
||||
|
||||
SimProfileBase TheSim;
|
||||
LLUUID UUID = new LLUUID(param);
|
||||
TheSim = GetProfileByLLUUID(UUID);
|
||||
|
||||
if (!(TheSim == null))
|
||||
{
|
||||
respstring = "<Root>";
|
||||
respstring += "<authkey>" + m_gridManager.Cfg.SimSendKey + "</authkey>";
|
||||
respstring += "<sim>";
|
||||
respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
|
||||
respstring += "<regionname>" + TheSim.regionname + "</regionname>";
|
||||
respstring += "<sim_ip>" + TheSim.sim_ip + "</sim_ip>";
|
||||
respstring += "<sim_port>" + TheSim.sim_port.ToString() + "</sim_port>";
|
||||
respstring += "<region_locx>" + TheSim.RegionLocX.ToString() + "</region_locx>";
|
||||
respstring += "<region_locy>" + TheSim.RegionLocY.ToString() + "</region_locy>";
|
||||
respstring += "<estate_id>1</estate_id>";
|
||||
respstring += "</sim>";
|
||||
respstring += "</Root>";
|
||||
}
|
||||
|
||||
return respstring;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -37,6 +37,7 @@
|
|||
<include name="Properties/AssemblyInfo.cs" />
|
||||
<include name="Types/AgentCiruitData.cs" />
|
||||
<include name="Types/AssetBase.cs" />
|
||||
<include name="Types/AssetStorage.cs" />
|
||||
<include name="Types/Login.cs" />
|
||||
<include name="Types/NeighbourInfo.cs" />
|
||||
<include name="Types/OSVector3.cs" />
|
||||
|
|
|
@ -146,11 +146,4 @@ namespace OpenSim.GridInterfaces.Local
|
|||
}
|
||||
}
|
||||
|
||||
public class AssetStorage
|
||||
{
|
||||
public byte[] Data;
|
||||
public sbyte Type;
|
||||
public string Name;
|
||||
public LLUUID UUID;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,10 +63,11 @@ namespace OpenSim.GridInterfaces.Remote
|
|||
while (true)
|
||||
{
|
||||
//we need to add support for the asset server not knowing about a requested asset
|
||||
// 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 + "getasset/" + AssetSendKey + "/" + assetID + "/data");
|
||||
WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "getasset/" + AssetSendKey + "/" + assetID + "/data");
|
||||
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");
|
||||
WebResponse AssetResponse = AssetLoad.GetResponse();
|
||||
byte[] idata = new byte[(int)AssetResponse.ContentLength];
|
||||
BinaryReader br = new BinaryReader(AssetResponse.GetResponseStream());
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
<nant buildfile="OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="clean" />
|
||||
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="clean" />
|
||||
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="clean" />
|
||||
<nant buildfile="OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="clean" />
|
||||
<nant buildfile="OpenSim/OpenSim.exe.build" target="clean" />
|
||||
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="clean" />
|
||||
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="clean" />
|
||||
|
@ -76,6 +77,7 @@
|
|||
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="build" />
|
||||
<nant buildfile="OpenSim.Servers/OpenSim.Servers.dll.build" target="build" />
|
||||
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="build" />
|
||||
<nant buildfile="OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="build" />
|
||||
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="build" />
|
||||
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="build" />
|
||||
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="build" />
|
||||
|
@ -118,6 +120,7 @@
|
|||
<nant buildfile="OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="doc" />
|
||||
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="doc" />
|
||||
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="doc" />
|
||||
<nant buildfile="OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="doc" />
|
||||
<nant buildfile="OpenSim/OpenSim.exe.build" target="doc" />
|
||||
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="doc" />
|
||||
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="doc" />
|
||||
|
|
29
prebuild.xml
29
prebuild.xml
|
@ -153,6 +153,35 @@
|
|||
</Files>
|
||||
</Project>
|
||||
|
||||
<Project name="OpenGridServices.AssetServer" path="OpenGridServices.AssetServer" type="Exe">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<ReferencePath>../bin/</ReferencePath>
|
||||
<Reference name="System" localCopy="false"/>
|
||||
<Reference name="System.Data" localCopy="false"/>
|
||||
<Reference name="System.Xml" localCopy="false"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="OpenSim.GridInterfaces.Local"/>
|
||||
<Reference name="OpenSim.Servers"/>
|
||||
<Reference name="libsecondlife.dll"/>
|
||||
<Reference name="Db4objects.Db4o.dll"/>
|
||||
<Reference name="XMLRPC"/>
|
||||
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<Project name="OpenGridServices.UserServer" path="OpenGridServices.UserServer" type="Exe">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
|
|
Loading…
Reference in New Issue