* Replaced GridHTTPServer and UserHTTPServer with BaseHttpServer
* Now dumping default value in config. *0.1-prestable
parent
cb88393f6b
commit
1a28ef6292
|
@ -48,18 +48,18 @@ namespace OpenGrid.Config.GridConfigDb4o
|
||||||
public void LoadDefaults() {
|
public void LoadDefaults() {
|
||||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
|
||||||
|
|
||||||
this.GridOwner = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid owner [OGS development team]: ", "OGS development team");
|
this.GridOwner = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team");
|
||||||
|
|
||||||
this.DefaultAssetServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default asset server [no default]: ");
|
this.DefaultAssetServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default asset server");
|
||||||
this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to asset server: ");
|
this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to asset server");
|
||||||
this.AssetRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from asset server: ");
|
this.AssetRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from asset server");
|
||||||
|
|
||||||
this.DefaultUserServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default user server [no default]: ");
|
this.DefaultUserServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default user server");
|
||||||
this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server: ");
|
this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server");
|
||||||
this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server: ");
|
this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server");
|
||||||
|
|
||||||
this.SimSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to sims: ");
|
this.SimSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to sims");
|
||||||
this.SimRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from sims: ");
|
this.SimRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from sims");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitConfig() {
|
public override void InitConfig() {
|
||||||
|
|
|
@ -1,307 +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 Nwc.XmlRpc;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Net;
|
|
||||||
using System.Xml;
|
|
||||||
using System.IO;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using libsecondlife;
|
|
||||||
using OpenSim.Framework.Sims;
|
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using OpenSim.Servers;
|
|
||||||
|
|
||||||
namespace OpenGridServices.GridServer
|
|
||||||
{
|
|
||||||
public class GridHTTPServer : BaseHttpServer {
|
|
||||||
public Thread HTTPD;
|
|
||||||
public HttpListener Listener;
|
|
||||||
|
|
||||||
public GridHTTPServer() : base( 8001 ) {
|
|
||||||
Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Start()
|
|
||||||
{
|
|
||||||
MainConsole.Instance.WriteLine("Starting up HTTP Server");
|
|
||||||
HTTPD = new Thread(new ThreadStart(StartHTTP));
|
|
||||||
HTTPD.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartHTTP() {
|
|
||||||
MainConsole.Instance.WriteLine("GridHttp.cs:StartHTTP() - Spawned main thread OK");
|
|
||||||
Listener = new HttpListener();
|
|
||||||
|
|
||||||
Listener.Prefixes.Add("http://+:8001/");
|
|
||||||
Listener.Prefixes.Add("http://+:8001/sims/");
|
|
||||||
Listener.Prefixes.Add("http://+:8001/gods/");
|
|
||||||
Listener.Prefixes.Add("http://+:8001/highestuuid/");
|
|
||||||
Listener.Prefixes.Add("http://+:8001/uuidblocks/");
|
|
||||||
Listener.Start();
|
|
||||||
|
|
||||||
MainConsole.Instance.WriteLine("GridHttp.cs:StartHTTP() - Successfully bound to port 8001");
|
|
||||||
|
|
||||||
HttpListenerContext context;
|
|
||||||
while(true) {
|
|
||||||
context = Listener.GetContext();
|
|
||||||
ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static string ParseXMLRPC(string requestBody, string referrer) {
|
|
||||||
try{
|
|
||||||
XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
|
|
||||||
|
|
||||||
Hashtable requestData = (Hashtable)request.Params[0];
|
|
||||||
switch(request.MethodName) {
|
|
||||||
case "simulator_login":
|
|
||||||
|
|
||||||
/*if(!((string)requestData["authkey"]==OpenGrid_Main.thegrid.SimRecvKey)) {
|
|
||||||
XmlRpcResponse ErrorResp = new XmlRpcResponse();
|
|
||||||
Hashtable ErrorRespData = new Hashtable();
|
|
||||||
ErrorRespData["error"]="invalid key";
|
|
||||||
ErrorResp.Value=ErrorRespData;
|
|
||||||
return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(ErrorResp),"utf-16","utf-8"));
|
|
||||||
}*/
|
|
||||||
SimProfileBase TheSim = null;
|
|
||||||
|
|
||||||
if(requestData.ContainsKey("UUID")) {
|
|
||||||
TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByLLUUID(new LLUUID((string)requestData["UUID"]));
|
|
||||||
} else if (requestData.ContainsKey("region_handle")){
|
|
||||||
TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle((ulong)Convert.ToUInt64(requestData["region_handle"]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(TheSim==null) {
|
|
||||||
XmlRpcResponse ErrorResp = new XmlRpcResponse();
|
|
||||||
Hashtable ErrorRespData = new Hashtable();
|
|
||||||
ErrorRespData["error"]="sim not found";
|
|
||||||
ErrorResp.Value=ErrorRespData;
|
|
||||||
return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(ErrorResp),"utf-16","utf-8"));
|
|
||||||
}
|
|
||||||
|
|
||||||
XmlRpcResponse SimLoginResp = new XmlRpcResponse();
|
|
||||||
Hashtable SimLoginRespData = new Hashtable();
|
|
||||||
|
|
||||||
ArrayList SimNeighboursData = new ArrayList();
|
|
||||||
|
|
||||||
SimProfileBase neighbour;
|
|
||||||
Hashtable NeighbourBlock;
|
|
||||||
for(int x=-1; x<2; x++) for(int y=-1; y<2; y++) {
|
|
||||||
if(OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle(Helpers.UIntsToLong((uint)((TheSim.RegionLocX+x)*256), (uint)(TheSim.RegionLocY+y)*256))!=null) {
|
|
||||||
neighbour=OpenGrid_Main.thegrid._regionmanager.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();
|
|
||||||
SimNeighboursData.Add(NeighbourBlock);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SimLoginRespData["UUID"]=TheSim.UUID;
|
|
||||||
SimLoginRespData["region_locx"]=TheSim.RegionLocX.ToString();
|
|
||||||
SimLoginRespData["region_locy"]=TheSim.RegionLocY.ToString();
|
|
||||||
SimLoginRespData["regionname"]=TheSim.regionname;
|
|
||||||
SimLoginRespData["estate_id"]="1";
|
|
||||||
SimLoginRespData["neighbours"]=SimNeighboursData;
|
|
||||||
SimLoginRespData["asset_url"]=OpenGrid_Main.thegrid.DefaultAssetServer;
|
|
||||||
SimLoginRespData["asset_sendkey"]=OpenGrid_Main.thegrid.AssetSendKey;
|
|
||||||
SimLoginRespData["asset_recvkey"]=OpenGrid_Main.thegrid.AssetRecvKey;
|
|
||||||
SimLoginRespData["user_url"]=OpenGrid_Main.thegrid.DefaultUserServer;
|
|
||||||
SimLoginRespData["user_sendkey"]=OpenGrid_Main.thegrid.UserSendKey;
|
|
||||||
SimLoginRespData["user_recvkey"]=OpenGrid_Main.thegrid.UserRecvKey;
|
|
||||||
SimLoginRespData["authkey"]=OpenGrid_Main.thegrid.SimSendKey;
|
|
||||||
SimLoginResp.Value=SimLoginRespData;
|
|
||||||
return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(SimLoginResp),"utf-16","utf-8"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} catch(Exception e) {
|
|
||||||
Console.WriteLine(e.ToString());
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
static string ParseREST(string requestURL, string requestBody, string HTTPmethod) {
|
|
||||||
char[] splitter = {'/'};
|
|
||||||
string[] rest_params = requestURL.Split(splitter);
|
|
||||||
string req_type = rest_params[0]; // First part of the URL is the type of request -
|
|
||||||
string respstring="";
|
|
||||||
SimProfileBase TheSim;
|
|
||||||
Console.WriteLine(req_type);
|
|
||||||
switch(req_type) {
|
|
||||||
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;
|
|
||||||
|
|
||||||
case "sims":
|
|
||||||
LLUUID UUID = new LLUUID((string)rest_params[1]);
|
|
||||||
TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByLLUUID(UUID);
|
|
||||||
if(!(TheSim==null)) {
|
|
||||||
switch(HTTPmethod) {
|
|
||||||
case "GET":
|
|
||||||
respstring="<authkey>" + OpenGrid_Main.thegrid.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>";
|
|
||||||
break;
|
|
||||||
case "POST":
|
|
||||||
Console.WriteLine("Updating sim details.....");
|
|
||||||
XmlDocument doc = new XmlDocument();
|
|
||||||
doc.LoadXml(requestBody);
|
|
||||||
XmlNode authkeynode = doc.FirstChild;
|
|
||||||
if (authkeynode.Name != "authkey") {
|
|
||||||
respstring = "ERROR! bad XML - expected authkey tag";
|
|
||||||
return respstring;
|
|
||||||
}
|
|
||||||
XmlNode simnode = doc.ChildNodes[1];
|
|
||||||
if (simnode.Name != "sim") {
|
|
||||||
respstring = "ERROR! bad XML - expected sim tag";
|
|
||||||
return respstring;
|
|
||||||
}
|
|
||||||
if (authkeynode.Name != OpenGrid_Main.thegrid.SimRecvKey) {
|
|
||||||
respstring = "ERROR! invalid key";
|
|
||||||
return respstring;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TheSim==null) {
|
|
||||||
respstring="ERROR! sim not found";
|
|
||||||
return respstring;
|
|
||||||
} else {
|
|
||||||
for(int i=0; i<= simnode.ChildNodes.Count; i++) {
|
|
||||||
switch(simnode.ChildNodes[i].Name) {
|
|
||||||
case "uuid":
|
|
||||||
// should a sim be able to update it's own UUID? To be decided
|
|
||||||
// watch next week for the exciting conclusion in "the adventures of OpenGridServices.GridServer/GridHttp.cs:ParseREST() at line 190!
|
|
||||||
break; // and line 190's arch-enemy - THE BREAK STATEMENT! OH NOES!!!!! (this code written at 6:57AM, no sleep, lots of caffeine)
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
respstring="OK";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return respstring;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void HandleRequest(Object stateinfo) {
|
|
||||||
HttpListenerContext context=(HttpListenerContext)stateinfo;
|
|
||||||
|
|
||||||
HttpListenerRequest request = context.Request;
|
|
||||||
HttpListenerResponse response = context.Response;
|
|
||||||
|
|
||||||
response.KeepAlive=false;
|
|
||||||
response.SendChunked=false;
|
|
||||||
|
|
||||||
System.IO.Stream body = request.InputStream;
|
|
||||||
System.Text.Encoding encoding = System.Text.Encoding.UTF8;
|
|
||||||
System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
|
|
||||||
|
|
||||||
string requestBody = reader.ReadToEnd();
|
|
||||||
body.Close();
|
|
||||||
reader.Close();
|
|
||||||
|
|
||||||
// TODO: AUTHENTICATION!!!!!!!!! MUST ADD!!!!!!!!!! SCRIPT KIDDIES LOVE LACK OF IT!!!!!!!!!!
|
|
||||||
|
|
||||||
string responseString="";
|
|
||||||
switch(request.ContentType) {
|
|
||||||
case "text/xml":
|
|
||||||
// must be XML-RPC, so pass to the XML-RPC parser
|
|
||||||
|
|
||||||
responseString=ParseXMLRPC(requestBody,request.Headers["Referer"]);
|
|
||||||
response.AddHeader("Content-type","text/xml");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "text/plaintext":
|
|
||||||
// must be REST
|
|
||||||
responseString=ParseREST(request.RawUrl,requestBody,request.HttpMethod);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case null:
|
|
||||||
// must be REST or invalid crap, so pass to the REST parser
|
|
||||||
responseString=ParseREST(request.RawUrl,requestBody,request.HttpMethod);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
|
|
||||||
System.IO.Stream output = response.OutputStream;
|
|
||||||
response.SendChunked=false;
|
|
||||||
response.ContentLength64=buffer.Length;
|
|
||||||
output.Write(buffer,0,buffer.Length);
|
|
||||||
output.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -38,16 +38,19 @@ using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Sims;
|
using OpenSim.Framework.Sims;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
|
using OpenSim.Servers;
|
||||||
|
|
||||||
namespace OpenGridServices.GridServer
|
namespace OpenGridServices.GridServer
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OpenGrid_Main : conscmd_callback
|
public class OpenGrid_Main : BaseServer, conscmd_callback
|
||||||
{
|
{
|
||||||
private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll";
|
private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll";
|
||||||
private GridConfig Cfg;
|
private GridConfig Cfg;
|
||||||
|
|
||||||
public static OpenGrid_Main thegrid;
|
public static OpenGrid_Main thegrid;
|
||||||
|
|
||||||
public string GridOwner;
|
public string GridOwner;
|
||||||
public string DefaultStartupMsg;
|
public string DefaultStartupMsg;
|
||||||
public string DefaultAssetServer;
|
public string DefaultAssetServer;
|
||||||
|
@ -56,16 +59,14 @@ namespace OpenGridServices.GridServer
|
||||||
public string DefaultUserServer;
|
public string DefaultUserServer;
|
||||||
public string UserSendKey;
|
public string UserSendKey;
|
||||||
public string UserRecvKey;
|
public string UserRecvKey;
|
||||||
public string SimSendKey;
|
public string SimSendKey;
|
||||||
public string SimRecvKey;
|
public string SimRecvKey;
|
||||||
public LLUUID highestUUID;
|
//public LLUUID highestUUID;
|
||||||
|
|
||||||
public GridHTTPServer _httpd;
|
private SimProfileManager m_simProfileManager;
|
||||||
public SimProfileManager _regionmanager;
|
|
||||||
|
|
||||||
private ConsoleBase m_console;
|
private ConsoleBase m_console;
|
||||||
private Timer SimCheckTimer;
|
|
||||||
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
@ -92,29 +93,49 @@ namespace OpenGridServices.GridServer
|
||||||
m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this);
|
m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this);
|
||||||
MainConsole.Instance = m_console;
|
MainConsole.Instance = m_console;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Startup()
|
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 = this.LoadConfigDll(this.ConfigDll);
|
||||||
Cfg.InitConfig();
|
Cfg.InitConfig();
|
||||||
|
|
||||||
m_console.WriteLine("Main.cs:Startup() - Loading sim profiles from database");
|
m_console.WriteLine("Main.cs:Startup() - Loading sim profiles from database");
|
||||||
this._regionmanager = new SimProfileManager();
|
m_simProfileManager = new SimProfileManager( this );
|
||||||
_regionmanager.LoadProfiles();
|
m_simProfileManager.LoadProfiles();
|
||||||
|
|
||||||
m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
|
m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
|
||||||
_httpd = new GridHTTPServer();
|
BaseHttpServer httpServer = new BaseHttpServer(8001);
|
||||||
_httpd.Start();
|
|
||||||
|
|
||||||
m_console.WriteLine("Main.cs:Startup() - Starting sim status checker");
|
httpServer.AddXmlRPCHandler("simulator_login", m_simProfileManager.XmlRpcLoginToSimulatorMethod);
|
||||||
SimCheckTimer = new Timer();
|
|
||||||
SimCheckTimer.Interval = 300000; // 5 minutes
|
httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod);
|
||||||
SimCheckTimer.Elapsed+=new ElapsedEventHandler(CheckSims);
|
httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod);
|
||||||
SimCheckTimer.Enabled=true;
|
|
||||||
|
// 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);
|
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||||
GridConfig config = null;
|
GridConfig config = null;
|
||||||
|
@ -142,33 +163,42 @@ namespace OpenGridServices.GridServer
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CheckSims(object sender, ElapsedEventArgs e) {
|
public void CheckSims(object sender, ElapsedEventArgs e)
|
||||||
foreach(SimProfileBase sim in _regionmanager.SimProfiles.Values) {
|
{
|
||||||
string SimResponse="";
|
foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values)
|
||||||
try {
|
{
|
||||||
WebRequest CheckSim = WebRequest.Create("http://" + sim.sim_ip + ":" + sim.sim_port.ToString() + "/checkstatus/");
|
string SimResponse = "";
|
||||||
CheckSim.Method = "GET";
|
try
|
||||||
CheckSim.ContentType = "text/plaintext";
|
{
|
||||||
CheckSim.ContentLength = 0;
|
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);
|
StreamWriter stOut = new StreamWriter(CheckSim.GetRequestStream(), System.Text.Encoding.ASCII);
|
||||||
stOut.Write("");
|
stOut.Write("");
|
||||||
stOut.Close();
|
stOut.Close();
|
||||||
|
|
||||||
StreamReader stIn = new StreamReader(CheckSim.GetResponse().GetResponseStream());
|
StreamReader stIn = new StreamReader(CheckSim.GetResponse().GetResponseStream());
|
||||||
SimResponse = stIn.ReadToEnd();
|
SimResponse = stIn.ReadToEnd();
|
||||||
stIn.Close();
|
stIn.Close();
|
||||||
} catch(Exception exception) {
|
}
|
||||||
}
|
catch
|
||||||
if(SimResponse=="OK") {
|
{
|
||||||
_regionmanager.SimProfiles[sim.UUID].online=true;
|
}
|
||||||
} else {
|
|
||||||
_regionmanager.SimProfiles[sim.UUID].online=false;
|
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)
|
public void RunCmd(string cmd, string[] cmdparams)
|
||||||
{
|
{
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -100,9 +100,6 @@
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="GridHttp.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Main.cs">
|
<Compile Include="Main.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<resources prefix="OpenGridServices.GridServer" dynamicprefix="true" >
|
<resources prefix="OpenGridServices.GridServer" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
<include name="GridHttp.cs" />
|
|
||||||
<include name="Main.cs" />
|
<include name="Main.cs" />
|
||||||
<include name="SimProfiles.cs" />
|
<include name="SimProfiles.cs" />
|
||||||
<include name="Properties/AssemblyInfo.cs" />
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
|
|
@ -36,6 +36,8 @@ using OpenSim.Framework.Utilities;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Sims;
|
using OpenSim.Framework.Sims;
|
||||||
using Db4objects.Db4o;
|
using Db4objects.Db4o;
|
||||||
|
using Nwc.XmlRpc;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
namespace OpenGridServices.GridServer
|
namespace OpenGridServices.GridServer
|
||||||
{
|
{
|
||||||
|
@ -44,9 +46,11 @@ namespace OpenGridServices.GridServer
|
||||||
public class SimProfileManager {
|
public class SimProfileManager {
|
||||||
|
|
||||||
public Dictionary<LLUUID, SimProfileBase> SimProfiles = new Dictionary<LLUUID, SimProfileBase>();
|
public Dictionary<LLUUID, SimProfileBase> SimProfiles = new Dictionary<LLUUID, SimProfileBase>();
|
||||||
|
private OpenGrid_Main m_gridManager;
|
||||||
|
|
||||||
public SimProfileManager() {
|
public SimProfileManager(OpenGrid_Main gridManager) {
|
||||||
}
|
m_gridManager = gridManager;
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadProfiles() { // should abstract this out
|
public void LoadProfiles() { // should abstract this out
|
||||||
IObjectContainer db;
|
IObjectContainer db;
|
||||||
|
@ -117,26 +121,176 @@ namespace OpenGridServices.GridServer
|
||||||
return 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();
|
||||||
|
SimNeighboursData.Add(NeighbourBlock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
responseData["UUID"] = TheSim.UUID;
|
||||||
|
responseData["region_locx"] = TheSim.RegionLocX.ToString();
|
||||||
|
responseData["region_locy"] = TheSim.RegionLocY.ToString();
|
||||||
|
responseData["regionname"] = TheSim.regionname;
|
||||||
|
responseData["estate_id"] = "1";
|
||||||
|
responseData["neighbours"] = SimNeighboursData;
|
||||||
|
|
||||||
|
responseData["asset_url"] = m_gridManager.DefaultAssetServer;
|
||||||
|
responseData["asset_sendkey"] = m_gridManager.AssetSendKey;
|
||||||
|
responseData["asset_recvkey"] = m_gridManager.AssetRecvKey;
|
||||||
|
responseData["user_url"] = m_gridManager.DefaultUserServer;
|
||||||
|
responseData["user_sendkey"] = m_gridManager.UserSendKey;
|
||||||
|
responseData["user_recvkey"] = m_gridManager.UserRecvKey;
|
||||||
|
responseData["authkey"] = m_gridManager.SimSendKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string RestSetSimMethod(string request, string path, string param)
|
||||||
|
{
|
||||||
|
string respstring = String.Empty;
|
||||||
|
|
||||||
|
SimProfileBase TheSim;
|
||||||
|
LLUUID UUID = new LLUUID(param);
|
||||||
|
TheSim = GetProfileByLLUUID(UUID);
|
||||||
|
|
||||||
|
if (!(TheSim == null))
|
||||||
|
{
|
||||||
|
Console.WriteLine("Updating sim details.....");
|
||||||
|
XmlDocument doc = new XmlDocument();
|
||||||
|
doc.LoadXml(request);
|
||||||
|
XmlNode authkeynode = doc.FirstChild;
|
||||||
|
if (authkeynode.Name != "authkey")
|
||||||
|
{
|
||||||
|
respstring = "ERROR! bad XML - expected authkey tag";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XmlNode simnode = doc.ChildNodes[1];
|
||||||
|
if (simnode.Name != "sim")
|
||||||
|
{
|
||||||
|
respstring = "ERROR! bad XML - expected sim tag";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (authkeynode.Name != m_gridManager.SimRecvKey)
|
||||||
|
{
|
||||||
|
respstring = "ERROR! invalid key";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (TheSim == null)
|
||||||
|
{
|
||||||
|
respstring = "ERROR! sim not found";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i <= simnode.ChildNodes.Count; i++)
|
||||||
|
{
|
||||||
|
switch (simnode.ChildNodes[i].Name)
|
||||||
|
{
|
||||||
|
case "uuid":
|
||||||
|
// should a sim be able to update it's own UUID? To be decided
|
||||||
|
// watch next week for the exciting conclusion in "the adventures of OpenGridServices.GridServer/GridHttp.cs:ParseREST() at line 190!
|
||||||
|
break; // and line 190's arch-enemy - THE BREAK STATEMENT! OH NOES!!!!! (this code written at 6:57AM, no sleep, lots of caffeine)
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
respstring = "OK";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return respstring;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 = "<authkey>" + m_gridManager.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>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return respstring;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* is in OpenSim.Framework
|
|
||||||
public class SimProfileBase {
|
|
||||||
public LLUUID UUID;
|
|
||||||
public ulong regionhandle;
|
|
||||||
public string regionname;
|
|
||||||
public string sim_ip;
|
|
||||||
public uint sim_port;
|
|
||||||
public string caps_url;
|
|
||||||
public uint RegionLocX;
|
|
||||||
public uint RegionLocY;
|
|
||||||
public string sendkey;
|
|
||||||
public string recvkey;
|
|
||||||
|
|
||||||
|
|
||||||
public SimProfileBase() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,126 +39,126 @@ using OpenSim.Framework.Sims;
|
||||||
using OpenSim.Framework.Inventory;
|
using OpenSim.Framework.Inventory;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
using OpenSim.Servers;
|
||||||
|
|
||||||
namespace OpenGridServices.UserServer
|
namespace OpenGridServices.UserServer
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OpenUser_Main : conscmd_callback
|
public class OpenUser_Main : BaseServer, conscmd_callback
|
||||||
{
|
{
|
||||||
private string ConfigDll = "OpenUser.Config.UserConfigDb4o.dll";
|
private string ConfigDll = "OpenUser.Config.UserConfigDb4o.dll";
|
||||||
private UserConfig Cfg;
|
private UserConfig Cfg;
|
||||||
|
|
||||||
public static OpenUser_Main userserver;
|
private UserProfileManager m_userProfileManager;
|
||||||
|
|
||||||
public UserHTTPServer _httpd;
|
|
||||||
public UserProfileManager _profilemanager;
|
|
||||||
|
|
||||||
public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>();
|
public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>();
|
||||||
|
|
||||||
ConsoleBase m_console;
|
ConsoleBase m_console;
|
||||||
|
|
||||||
[STAThread]
|
|
||||||
public static void Main( string[] args )
|
|
||||||
{
|
|
||||||
Console.WriteLine("Starting...\n");
|
|
||||||
|
|
||||||
userserver = new OpenUser_Main();
|
[STAThread]
|
||||||
userserver.Startup();
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
userserver.Work();
|
Console.WriteLine("Starting...\n");
|
||||||
}
|
|
||||||
|
|
||||||
private OpenUser_Main()
|
OpenUser_Main userserver = new OpenUser_Main();
|
||||||
{
|
userserver.Startup();
|
||||||
m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this);
|
userserver.Work();
|
||||||
MainConsole.Instance = m_console;
|
}
|
||||||
|
|
||||||
|
private OpenUser_Main()
|
||||||
|
{
|
||||||
|
m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this);
|
||||||
|
MainConsole.Instance = m_console;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Work()
|
||||||
|
{
|
||||||
|
m_console.WriteLine("\nEnter help for a list of commands\n");
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
m_console.MainConsolePrompt();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void Work()
|
|
||||||
{
|
|
||||||
m_console.WriteLine("\nEnter help for a list of commands\n");
|
|
||||||
|
|
||||||
while (true)
|
public void Startup()
|
||||||
{
|
{
|
||||||
m_console.MainConsolePrompt();
|
MainConsole.Instance.WriteLine("Main.cs:Startup() - Loading configuration");
|
||||||
}
|
Cfg = this.LoadConfigDll(this.ConfigDll);
|
||||||
}
|
Cfg.InitConfig();
|
||||||
|
|
||||||
public void Startup() {
|
|
||||||
MainConsole.Instance.WriteLine("Main.cs:Startup() - Loading configuration");
|
|
||||||
Cfg = this.LoadConfigDll(this.ConfigDll);
|
|
||||||
Cfg.InitConfig();
|
|
||||||
|
|
||||||
MainConsole.Instance.WriteLine("Main.cs:Startup() - Creating user profile manager");
|
MainConsole.Instance.WriteLine("Main.cs:Startup() - Creating user profile manager");
|
||||||
_profilemanager = new UserProfileManager();
|
m_userProfileManager = new UserProfileManager();
|
||||||
_profilemanager.InitUserProfiles();
|
m_userProfileManager.InitUserProfiles();
|
||||||
_profilemanager.SetKeys(Cfg.GridSendKey, Cfg.GridRecvKey, Cfg.GridServerURL, Cfg.DefaultStartupMsg);
|
m_userProfileManager.SetKeys(Cfg.GridSendKey, Cfg.GridRecvKey, Cfg.GridServerURL, Cfg.DefaultStartupMsg);
|
||||||
|
|
||||||
MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting HTTP process");
|
MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting HTTP process");
|
||||||
_httpd = new UserHTTPServer();
|
BaseHttpServer httpServer = new BaseHttpServer(8002);
|
||||||
|
|
||||||
_httpd.AddXmlRPCHandler("login_to_simulator", _profilemanager.XmlRpcLoginMethod);
|
httpServer.AddXmlRPCHandler("login_to_simulator", m_userProfileManager.XmlRpcLoginMethod);
|
||||||
_httpd.AddRestHandler( "DELETE", "/usersessions/", _profilemanager.RestDeleteUserSessionMethod );
|
httpServer.AddRestHandler("DELETE", "/usersessions/", m_userProfileManager.RestDeleteUserSessionMethod);
|
||||||
|
|
||||||
_httpd.Start();
|
|
||||||
|
|
||||||
}
|
// I guess that this was never used?
|
||||||
|
//Listener.Prefixes.Add("http://+:8002/userserver/");
|
||||||
|
|
||||||
|
httpServer.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void do_create(string what)
|
||||||
|
{
|
||||||
|
switch (what)
|
||||||
|
{
|
||||||
|
case "user":
|
||||||
|
m_console.WriteLine("Creating new user profile");
|
||||||
|
string tempfirstname;
|
||||||
|
string templastname;
|
||||||
|
string tempMD5Passwd;
|
||||||
|
|
||||||
|
tempfirstname = m_console.CmdPrompt("First name");
|
||||||
|
templastname = m_console.CmdPrompt("Last name");
|
||||||
|
tempMD5Passwd = m_console.PasswdPrompt("Password");
|
||||||
|
|
||||||
|
System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
|
||||||
|
byte[] bs = System.Text.Encoding.UTF8.GetBytes(tempMD5Passwd);
|
||||||
|
bs = x.ComputeHash(bs);
|
||||||
|
System.Text.StringBuilder s = new System.Text.StringBuilder();
|
||||||
|
foreach (byte b in bs)
|
||||||
|
{
|
||||||
|
s.Append(b.ToString("x2").ToLower());
|
||||||
|
}
|
||||||
|
tempMD5Passwd = s.ToString();
|
||||||
|
|
||||||
|
UserProfile newuser = m_userProfileManager.CreateNewProfile(tempfirstname, templastname, tempMD5Passwd);
|
||||||
|
newuser.homelookat = new LLVector3(-0.57343f, -0.819255f, 0f);
|
||||||
|
newuser.homepos = new LLVector3(128f, 128f, 23f);
|
||||||
|
m_userProfileManager.SaveUserProfiles();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void do_create(string what)
|
|
||||||
{
|
|
||||||
switch(what)
|
|
||||||
{
|
|
||||||
case "user":
|
|
||||||
m_console.WriteLine("Creating new user profile");
|
|
||||||
string tempfirstname;
|
|
||||||
string templastname;
|
|
||||||
string tempMD5Passwd;
|
|
||||||
|
|
||||||
tempfirstname=m_console.CmdPrompt("First name: ");
|
|
||||||
templastname=m_console.CmdPrompt("Last name: ");
|
|
||||||
tempMD5Passwd=m_console.PasswdPrompt("Password: ");
|
|
||||||
|
|
||||||
System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
|
|
||||||
byte[] bs = System.Text.Encoding.UTF8.GetBytes(tempMD5Passwd);
|
|
||||||
bs = x.ComputeHash(bs);
|
|
||||||
System.Text.StringBuilder s = new System.Text.StringBuilder();
|
|
||||||
foreach (byte b in bs)
|
|
||||||
{
|
|
||||||
s.Append(b.ToString("x2").ToLower());
|
|
||||||
}
|
|
||||||
tempMD5Passwd = s.ToString();
|
|
||||||
|
|
||||||
UserProfile newuser=_profilemanager.CreateNewProfile(tempfirstname,templastname,tempMD5Passwd);
|
|
||||||
newuser.homelookat = new LLVector3(-0.57343f, -0.819255f, 0f);
|
|
||||||
newuser.homepos = new LLVector3(128f,128f,23f);
|
|
||||||
_profilemanager.SaveUserProfiles();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RunCmd(string cmd, string[] cmdparams)
|
public void RunCmd(string cmd, string[] cmdparams)
|
||||||
{
|
{
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case "help":
|
case "help":
|
||||||
m_console.WriteLine("create user - create a new user");
|
m_console.WriteLine("create user - create a new user");
|
||||||
m_console.WriteLine("shutdown - shutdown the grid (USE CAUTION!)");
|
m_console.WriteLine("shutdown - shutdown the grid (USE CAUTION!)");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "create":
|
case "create":
|
||||||
do_create(cmdparams[0]);
|
do_create(cmdparams[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "shutdown":
|
case "shutdown":
|
||||||
m_console.Close();
|
m_console.Close();
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private UserConfig LoadConfigDll(string dllName)
|
private UserConfig LoadConfigDll(string dllName)
|
||||||
{
|
{
|
||||||
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||||
UserConfig config = null;
|
UserConfig config = null;
|
||||||
|
@ -185,9 +185,9 @@ namespace OpenGridServices.UserServer
|
||||||
pluginAssembly = null;
|
pluginAssembly = null;
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Show(string ShowWhat)
|
public void Show(string ShowWhat)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,9 +103,6 @@
|
||||||
<Compile Include="Main.cs">
|
<Compile Include="Main.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="UserHttp.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
<include name="Main.cs" />
|
<include name="Main.cs" />
|
||||||
<include name="UserHttp.cs" />
|
|
||||||
<include name="Properties/AssemblyInfo.cs" />
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
</sources>
|
</sources>
|
||||||
<references basedir="${project::get-base-directory()}">
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
|
|
@ -1,154 +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 Nwc.XmlRpc;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Net;
|
|
||||||
using System.IO;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using libsecondlife;
|
|
||||||
using OpenSim.Framework.User;
|
|
||||||
using OpenSim.Framework.Sims;
|
|
||||||
using OpenSim.Framework.Inventory;
|
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using OpenSim.Servers;
|
|
||||||
|
|
||||||
namespace OpenGridServices.UserServer
|
|
||||||
{
|
|
||||||
public class UserHTTPServer : BaseHttpServer
|
|
||||||
{
|
|
||||||
public Thread HTTPD;
|
|
||||||
public HttpListener Listener;
|
|
||||||
|
|
||||||
public UserHTTPServer() : base( 8002 )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Start()
|
|
||||||
{
|
|
||||||
MainConsole.Instance.WriteLine("Starting up HTTP Server");
|
|
||||||
HTTPD = new Thread(new ThreadStart(StartHTTP));
|
|
||||||
HTTPD.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartHTTP()
|
|
||||||
{
|
|
||||||
MainConsole.Instance.WriteLine("UserHttp.cs:StartHTTP() - Spawned main thread OK");
|
|
||||||
Listener = new HttpListener();
|
|
||||||
|
|
||||||
Listener.Prefixes.Add("http://+:8002/userserver/");
|
|
||||||
Listener.Prefixes.Add("http://+:8002/usersessions/");
|
|
||||||
Listener.Start();
|
|
||||||
|
|
||||||
HttpListenerContext context;
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
context = Listener.GetContext();
|
|
||||||
ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static string ParseXMLRPC(string requestBody)
|
|
||||||
{
|
|
||||||
return OpenUser_Main.userserver._profilemanager.ParseXMLRPC(requestBody);
|
|
||||||
}
|
|
||||||
|
|
||||||
static string ParseREST(HttpListenerRequest www_req)
|
|
||||||
{
|
|
||||||
Console.WriteLine("INCOMING REST - " + www_req.RawUrl);
|
|
||||||
|
|
||||||
char[] splitter = { '/' };
|
|
||||||
string[] rest_params = www_req.RawUrl.Split(splitter);
|
|
||||||
string req_type = rest_params[1]; // First part of the URL is the type of request - usersessions/userprofiles/inventory/blabla
|
|
||||||
switch (req_type)
|
|
||||||
{
|
|
||||||
case "usersessions":
|
|
||||||
string param = rest_params[2];
|
|
||||||
string result = "";
|
|
||||||
if (www_req.HttpMethod == "DELETE")
|
|
||||||
{
|
|
||||||
result = OpenUser_Main.userserver._profilemanager.RestDeleteUserSessionMethod( null, null, param );
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void HandleRequest(Object stateinfo)
|
|
||||||
{
|
|
||||||
HttpListenerContext context = (HttpListenerContext)stateinfo;
|
|
||||||
|
|
||||||
HttpListenerRequest request = context.Request;
|
|
||||||
HttpListenerResponse response = context.Response;
|
|
||||||
|
|
||||||
response.KeepAlive = false;
|
|
||||||
response.SendChunked = false;
|
|
||||||
|
|
||||||
System.IO.Stream body = request.InputStream;
|
|
||||||
System.Text.Encoding encoding = System.Text.Encoding.UTF8;
|
|
||||||
System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
|
|
||||||
|
|
||||||
string requestBody = reader.ReadToEnd();
|
|
||||||
body.Close();
|
|
||||||
reader.Close();
|
|
||||||
|
|
||||||
string responseString = "";
|
|
||||||
switch (request.ContentType)
|
|
||||||
{
|
|
||||||
case "text/xml":
|
|
||||||
// must be XML-RPC, so pass to the XML-RPC parser
|
|
||||||
|
|
||||||
responseString = ParseXMLRPC(requestBody);
|
|
||||||
response.AddHeader("Content-type", "text/xml");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "text/plaintext":
|
|
||||||
responseString = ParseREST(request);
|
|
||||||
response.AddHeader("Content-type", "text/plaintext");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
|
|
||||||
System.IO.Stream output = response.OutputStream;
|
|
||||||
response.SendChunked = false;
|
|
||||||
response.ContentLength64 = buffer.Length;
|
|
||||||
output.Write(buffer, 0, buffer.Length);
|
|
||||||
output.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -84,14 +84,14 @@ namespace OpenSim.Framework.Console
|
||||||
// Displays a command prompt and waits for the user to enter a string, then returns that string
|
// Displays a command prompt and waits for the user to enter a string, then returns that string
|
||||||
public string CmdPrompt(string prompt)
|
public string CmdPrompt(string prompt)
|
||||||
{
|
{
|
||||||
this.Write(prompt);
|
this.Write(String.Format("{0}: ", prompt));
|
||||||
return this.ReadLine();
|
return this.ReadLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Displays a command prompt and returns a default value if the user simply presses enter
|
// Displays a command prompt and returns a default value if the user simply presses enter
|
||||||
public string CmdPrompt(string prompt, string defaultresponse)
|
public string CmdPrompt(string prompt, string defaultresponse)
|
||||||
{
|
{
|
||||||
string temp = CmdPrompt(prompt);
|
string temp = CmdPrompt(String.Format( "{0} [{1}]", prompt, defaultresponse ));
|
||||||
if (temp == "")
|
if (temp == "")
|
||||||
{
|
{
|
||||||
return defaultresponse;
|
return defaultresponse;
|
||||||
|
|
|
@ -212,7 +212,7 @@ namespace OpenSim.Physics.OdePlugin
|
||||||
private PhysicsVector _velocity;
|
private PhysicsVector _velocity;
|
||||||
private PhysicsVector _acceleration;
|
private PhysicsVector _acceleration;
|
||||||
private bool flying;
|
private bool flying;
|
||||||
private float gravityAccel;
|
//private float gravityAccel;
|
||||||
private IntPtr BoundingCapsule;
|
private IntPtr BoundingCapsule;
|
||||||
IntPtr capsule_geom;
|
IntPtr capsule_geom;
|
||||||
d.Mass capsule_mass;
|
d.Mass capsule_mass;
|
||||||
|
|
|
@ -60,7 +60,6 @@ namespace OpenSim
|
||||||
//private IGenericConfig remoteConfig;
|
//private IGenericConfig remoteConfig;
|
||||||
private PhysicsManager physManager;
|
private PhysicsManager physManager;
|
||||||
private Grid GridServers;
|
private Grid GridServers;
|
||||||
private BaseHttpServer _httpServer;
|
|
||||||
private PacketServer _packetServer;
|
private PacketServer _packetServer;
|
||||||
private World LocalWorld;
|
private World LocalWorld;
|
||||||
private AssetCache AssetCache;
|
private AssetCache AssetCache;
|
||||||
|
@ -175,12 +174,13 @@ namespace OpenSim
|
||||||
|
|
||||||
m_console.WriteLine("Main.cs:Startup() - Initialising HTTP server");
|
m_console.WriteLine("Main.cs:Startup() - Initialising HTTP server");
|
||||||
// HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort);
|
// HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort);
|
||||||
_httpServer = new BaseHttpServer(regionData.IPListenPort);
|
|
||||||
|
BaseHttpServer httpServer = new BaseHttpServer( regionData.IPListenPort );
|
||||||
|
|
||||||
if (gridServer.GetName() == "Remote")
|
if (gridServer.GetName() == "Remote")
|
||||||
{
|
{
|
||||||
//we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server
|
//we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server
|
||||||
_httpServer.AddXmlRPCHandler("expect_user",
|
httpServer.AddXmlRPCHandler("expect_user",
|
||||||
delegate(XmlRpcRequest request)
|
delegate(XmlRpcRequest request)
|
||||||
{
|
{
|
||||||
Hashtable requestData = (Hashtable)request.Params[0];
|
Hashtable requestData = (Hashtable)request.Params[0];
|
||||||
|
@ -196,7 +196,7 @@ namespace OpenSim
|
||||||
|
|
||||||
return new XmlRpcResponse();
|
return new XmlRpcResponse();
|
||||||
});
|
});
|
||||||
_httpServer.AddRestHandler("GET", "/simstatus/",
|
httpServer.AddRestHandler("GET", "/simstatus/",
|
||||||
delegate(string request, string path, string param )
|
delegate(string request, string path, string param )
|
||||||
{
|
{
|
||||||
return "OK";
|
return "OK";
|
||||||
|
@ -218,20 +218,20 @@ namespace OpenSim
|
||||||
this.GridServers.UserServer = loginServer;
|
this.GridServers.UserServer = loginServer;
|
||||||
adminLoginServer = loginServer;
|
adminLoginServer = loginServer;
|
||||||
|
|
||||||
_httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod);
|
httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//sandbox mode with loginserver not using accounts
|
//sandbox mode with loginserver not using accounts
|
||||||
_httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod);
|
httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer);
|
AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer);
|
||||||
adminWebFront.LoadMethods(_httpServer);
|
adminWebFront.LoadMethods(httpServer);
|
||||||
|
|
||||||
m_console.WriteLine("Main.cs:Startup() - Starting HTTP server");
|
m_console.WriteLine("Main.cs:Startup() - Starting HTTP server");
|
||||||
_httpServer.Start();
|
httpServer.Start();
|
||||||
|
|
||||||
MainServerListener();
|
MainServerListener();
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ namespace OpenSim
|
||||||
attri = configData.GetAttribute("SimName");
|
attri = configData.GetAttribute("SimName");
|
||||||
if (attri == "")
|
if (attri == "")
|
||||||
{
|
{
|
||||||
this.RegionName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Name [OpenSim test]: ", "OpenSim test");
|
this.RegionName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Name", "OpenSim test");
|
||||||
configData.SetAttribute("SimName", this.RegionName);
|
configData.SetAttribute("SimName", this.RegionName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -106,7 +106,7 @@ namespace OpenSim
|
||||||
attri = configData.GetAttribute("SimLocationX");
|
attri = configData.GetAttribute("SimLocationX");
|
||||||
if (attri == "")
|
if (attri == "")
|
||||||
{
|
{
|
||||||
string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X [997]: ", "997");
|
string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X", "997");
|
||||||
configData.SetAttribute("SimLocationX", location);
|
configData.SetAttribute("SimLocationX", location);
|
||||||
this.RegionLocX = (uint)Convert.ToUInt32(location);
|
this.RegionLocX = (uint)Convert.ToUInt32(location);
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ namespace OpenSim
|
||||||
attri = configData.GetAttribute("SimLocationY");
|
attri = configData.GetAttribute("SimLocationY");
|
||||||
if (attri == "")
|
if (attri == "")
|
||||||
{
|
{
|
||||||
string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y [996]: ", "996");
|
string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y", "996");
|
||||||
configData.SetAttribute("SimLocationY", location);
|
configData.SetAttribute("SimLocationY", location);
|
||||||
this.RegionLocY = (uint)Convert.ToUInt32(location);
|
this.RegionLocY = (uint)Convert.ToUInt32(location);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ namespace OpenSim
|
||||||
attri = configData.GetAttribute("SimListenPort");
|
attri = configData.GetAttribute("SimListenPort");
|
||||||
if (attri == "")
|
if (attri == "")
|
||||||
{
|
{
|
||||||
string port = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("UDP port for client connections [9000]: ", "9000");
|
string port = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("UDP port for client connections", "9000");
|
||||||
configData.SetAttribute("SimListenPort", port);
|
configData.SetAttribute("SimListenPort", port);
|
||||||
this.IPListenPort = Convert.ToInt32(port);
|
this.IPListenPort = Convert.ToInt32(port);
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ namespace OpenSim
|
||||||
attri = configData.GetAttribute("SimListenAddress");
|
attri = configData.GetAttribute("SimListenAddress");
|
||||||
if (attri == "")
|
if (attri == "")
|
||||||
{
|
{
|
||||||
this.IPListenAddr = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("IP Address to listen on for client connections [127.0.0.1]: ", "127.0.0.1");
|
this.IPListenAddr = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("IP Address to listen on for client connections", "127.0.0.1");
|
||||||
configData.SetAttribute("SimListenAddress", this.IPListenAddr);
|
configData.SetAttribute("SimListenAddress", this.IPListenAddr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -162,7 +162,7 @@ namespace OpenSim
|
||||||
attri = configData.GetAttribute("GridServerURL");
|
attri = configData.GetAttribute("GridServerURL");
|
||||||
if (attri == "")
|
if (attri == "")
|
||||||
{
|
{
|
||||||
this.GridURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL: ");
|
this.GridURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL");
|
||||||
configData.SetAttribute("GridServerURL", this.GridURL);
|
configData.SetAttribute("GridServerURL", this.GridURL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -175,7 +175,7 @@ namespace OpenSim
|
||||||
attri = configData.GetAttribute("GridSendKey");
|
attri = configData.GetAttribute("GridSendKey");
|
||||||
if (attri == "")
|
if (attri == "")
|
||||||
{
|
{
|
||||||
this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server: ");
|
this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server");
|
||||||
configData.SetAttribute("GridSendKey", this.GridSendKey);
|
configData.SetAttribute("GridSendKey", this.GridSendKey);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -188,7 +188,7 @@ namespace OpenSim
|
||||||
attri = configData.GetAttribute("GridRecvKey");
|
attri = configData.GetAttribute("GridRecvKey");
|
||||||
if (attri == "")
|
if (attri == "")
|
||||||
{
|
{
|
||||||
this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server: ");
|
this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server");
|
||||||
configData.SetAttribute("GridRecvKey", this.GridRecvKey);
|
configData.SetAttribute("GridRecvKey", this.GridRecvKey);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace OpenSim.world
|
||||||
private ulong m_regionHandle;
|
private ulong m_regionHandle;
|
||||||
private Dictionary<uint, SimClient> m_clientThreads;
|
private Dictionary<uint, SimClient> m_clientThreads;
|
||||||
private string m_regionName;
|
private string m_regionName;
|
||||||
private bool childShadowAvatar = false;
|
//private bool childShadowAvatar = false;
|
||||||
|
|
||||||
public Avatar(SimClient TheClient, World world, string regionName, Dictionary<uint, SimClient> clientThreads, ulong regionHandle)
|
public Avatar(SimClient TheClient, World world, string regionName, Dictionary<uint, SimClient> clientThreads, ulong regionHandle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,6 @@ namespace OpenSim.world
|
||||||
private bool physicsEnabled = false;
|
private bool physicsEnabled = false;
|
||||||
|
|
||||||
private Dictionary<LLUUID, InventoryItem> inventoryItems;
|
private Dictionary<LLUUID, InventoryItem> inventoryItems;
|
||||||
private string inventoryFileName = "";
|
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
private ushort _interfaceCount;
|
private ushort _interfaceCount;
|
||||||
private ushort _fieldCount;
|
private ushort _fieldCount;
|
||||||
private ushort _methodCount;
|
private ushort _methodCount;
|
||||||
private ushort _attributeCount;
|
//private ushort _attributeCount;
|
||||||
private string _name;
|
//private string _name;
|
||||||
public Dictionary<string, BaseType> StaticFields = new Dictionary<string, BaseType>();
|
public Dictionary<string, BaseType> StaticFields = new Dictionary<string, BaseType>();
|
||||||
public PoolClass mClass;
|
public PoolClass mClass;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Servers
|
||||||
|
{
|
||||||
|
public class BaseServer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -55,7 +55,6 @@ namespace OpenSim.UserServer
|
||||||
public IPAddress clientAddress = IPAddress.Loopback;
|
public IPAddress clientAddress = IPAddress.Loopback;
|
||||||
public IPAddress remoteAddress = IPAddress.Any;
|
public IPAddress remoteAddress = IPAddress.Any;
|
||||||
private int NumClients;
|
private int NumClients;
|
||||||
private string _defaultResponse;
|
|
||||||
private bool userAccounts = false;
|
private bool userAccounts = false;
|
||||||
private string _mpasswd;
|
private string _mpasswd;
|
||||||
private bool _needPasswd = false;
|
private bool _needPasswd = false;
|
||||||
|
|
|
@ -89,6 +89,9 @@
|
||||||
<Compile Include="BaseHttpServer.cs">
|
<Compile Include="BaseHttpServer.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="BaseServer.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="IRestHandler.cs">
|
<Compile Include="IRestHandler.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
<include name="BaseHttpServer.cs" />
|
<include name="BaseHttpServer.cs" />
|
||||||
|
<include name="BaseServer.cs" />
|
||||||
<include name="IRestHandler.cs" />
|
<include name="IRestHandler.cs" />
|
||||||
<include name="LocalUserProfileManager.cs" />
|
<include name="LocalUserProfileManager.cs" />
|
||||||
<include name="LoginResponse.cs" />
|
<include name="LoginResponse.cs" />
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Storage.LocalStorageBDB
|
||||||
|
|
||||||
DbHash sim;
|
DbHash sim;
|
||||||
Db DB;
|
Db DB;
|
||||||
BEFormatter formatter;
|
//BEFormatter formatter;
|
||||||
|
|
||||||
public BDBLocalStorage()
|
public BDBLocalStorage()
|
||||||
{
|
{
|
||||||
|
|
228
OpenSim.sln
228
OpenSim.sln
|
@ -43,97 +43,139 @@ EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.GridServer", "OpenGridServices.GridServer\OpenGridServices.GridServer.csproj", "{21BFC8E2-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.GridServer", "OpenGridServices.GridServer\OpenGridServices.GridServer.csproj", "{21BFC8E2-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectDependencies) = postSolution
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({632E1BFD-0000-0000-0000-000000000000}).5 = ({2270B8FE-0000-0000-0000-000000000000})
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({632E1BFD-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({632E1BFD-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({632E1BFD-0000-0000-0000-000000000000}).8 = ({E88EF749-0000-0000-0000-000000000000})
|
||||||
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({632E1BFD-0000-0000-0000-000000000000}).9 = ({8BE16150-0000-0000-0000-000000000000})
|
||||||
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({632E1BFD-0000-0000-0000-000000000000}).10 = ({8BB20F0A-0000-0000-0000-000000000000})
|
||||||
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
|
||||||
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({EE9E5D96-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({EE9E5D96-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({438A9556-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({438A9556-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({438A9556-0000-0000-0000-000000000000}).7 = ({8BE16150-0000-0000-0000-000000000000})
|
||||||
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({438A9556-0000-0000-0000-000000000000}).8 = ({8BB20F0A-0000-0000-0000-000000000000})
|
||||||
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({438A9556-0000-0000-0000-000000000000}).9 = ({632E1BFD-0000-0000-0000-000000000000})
|
||||||
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({E88EF749-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({8BE16150-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({8BE16150-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({97A82740-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({66591469-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({66591469-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({66591469-0000-0000-0000-000000000000}).5 = ({8BB20F0A-0000-0000-0000-000000000000})
|
||||||
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({4F874463-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
|
||||||
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({B0027747-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({B0027747-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({988F0AC4-0000-0000-0000-000000000000}).3 = ({8BE16150-0000-0000-0000-000000000000})
|
||||||
{E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({B55C0B5D-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({B55C0B5D-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({8BB20F0A-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({8BB20F0A-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({E1B79ECF-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({E1B79ECF-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({6B20B603-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({6B20B603-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({7E494328-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({7E494328-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({546099CD-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
({546099CD-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
({21BFC8E2-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||||
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
({21BFC8E2-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||||
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
({21BFC8E2-0000-0000-0000-000000000000}).5 = ({8BB20F0A-0000-0000-0000-000000000000})
|
||||||
{4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
EndGlobalSection
|
||||||
{4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{4F874463-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4F874463-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{546099CD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{546099CD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
EndGlobalSection
|
{4F874463-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
{4F874463-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
HideSolutionNode = FALSE
|
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
EndGlobalSection
|
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{546099CD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{546099CD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
@ -48,11 +48,11 @@ namespace OpenUser.Config.UserConfigDb4o
|
||||||
public void LoadDefaults() {
|
public void LoadDefaults() {
|
||||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
|
||||||
|
|
||||||
this.DefaultStartupMsg = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default startup message [Welcome to OGS]: ", "Welcome to OGS");
|
this.DefaultStartupMsg = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
|
||||||
|
|
||||||
this.GridServerURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL: ");
|
this.GridServerURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL");
|
||||||
this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server: ");
|
this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server");
|
||||||
this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server: ");
|
this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitConfig() {
|
public override void InitConfig() {
|
||||||
|
|
Loading…
Reference in New Issue