diff --git a/gridserver/src/SimProfiles.cs b/gridserver/src/SimProfiles.cs index d5aaab755e..91a92ea6a2 100644 --- a/gridserver/src/SimProfiles.cs +++ b/gridserver/src/SimProfiles.cs @@ -78,7 +78,7 @@ namespace OpenGridServices newprofile.sim_port=sim_port; newprofile.RegionLocX=RegionLocX; newprofile.RegionLocY=RegionLocY; - newprofile.caps_url="http://" + sim_ip + ":12036"; + newprofile.caps_url="http://" + sim_ip + ":9000/"; newprofile.sendkey=sendkey; newprofile.recvkey=recvkey; newprofile.regionhandle=Util.UIntsToLong((RegionLocX*256), (RegionLocY*256)); diff --git a/opensim/src/CAPS/SimHttp.cs b/opensim/src/CAPS/SimHttp.cs index 9d85baebcc..eb20f3e3e2 100644 --- a/opensim/src/CAPS/SimHttp.cs +++ b/opensim/src/CAPS/SimHttp.cs @@ -73,8 +73,16 @@ namespace OpenSim Hashtable requestData = (Hashtable)request.Params[0]; switch(request.MethodName) { - // Eventually will be used for useful things if we actually use XML-RPC - case "": + case "expect_user": + GridServers.agentcircuitdata agent_data = new GridServers.agentcircuitdata(); + agent_data.SessionID = new LLUUID((string)requestData["session_id"]); + agent_data.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); + agent_data.firstname = (string)requestData["firstname"]; + agent_data.lastname = (string)requestData["lastname"]; + agent_data.AgentID = new LLUUID((string)requestData["agent_id"]); + agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); + OpenSim_Main.gridServers.GridServer.agentcircuits.Add((uint)agent_data.circuitcode,agent_data); + return ""; break; } } catch(Exception e) { diff --git a/opensim/src/Config/SimConfig/AssemblyInfo.cs b/opensim/src/Config/SimConfig/AssemblyInfo.cs index 9c57c2d8c6..dc001d338d 100644 --- a/opensim/src/Config/SimConfig/AssemblyInfo.cs +++ b/opensim/src/Config/SimConfig/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.196")] +[assembly: AssemblyVersionAttribute("0.1.*.199")] [assembly: AssemblyTitleAttribute("opensim-simconfig")] [assembly: AssemblyDescriptionAttribute("The default configuration handler")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/opensim/src/GridInterfaces/AssemblyInfo.cs b/opensim/src/GridInterfaces/AssemblyInfo.cs index 0a41503369..0519dcaf36 100644 --- a/opensim/src/GridInterfaces/AssemblyInfo.cs +++ b/opensim/src/GridInterfaces/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.196")] +[assembly: AssemblyVersionAttribute("0.1.*.199")] [assembly: AssemblyTitleAttribute("opensim-gridinterfaces")] [assembly: AssemblyDescriptionAttribute("Definitions for OGS interface")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/opensim/src/GridInterfaces/IGridServer.cs b/opensim/src/GridInterfaces/IGridServer.cs index fef4c3e538..c2d71724dd 100644 --- a/opensim/src/GridInterfaces/IGridServer.cs +++ b/opensim/src/GridInterfaces/IGridServer.cs @@ -32,6 +32,7 @@ using System.Net; using System.Net.Sockets; using System.IO; using libsecondlife; +using OpenSim; namespace OpenSim.GridServers { @@ -46,6 +47,10 @@ namespace OpenSim.GridServers public interface IGridServer { bool RequestConnection(); + Dictionary agentcircuits { + get; + set; + } UUIDBlock RequestUUIDBlock(); void RequestNeighbours(); //should return a array of neighbouring regions AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); @@ -91,4 +96,16 @@ namespace OpenSim.GridServers { IGridServer GetGridServer(); } + + public class agentcircuitdata { + public agentcircuitdata() { } + public LLUUID AgentID; + public LLUUID SessionID; + public LLUUID SecureSessionID; + public string firstname; + public string lastname; + public uint circuitcode; + } + + } diff --git a/opensim/src/LocalServers/LocalGridServers/AssemblyInfo.cs b/opensim/src/LocalServers/LocalGridServers/AssemblyInfo.cs index 612dd28f24..ec7f899a7d 100644 --- a/opensim/src/LocalServers/LocalGridServers/AssemblyInfo.cs +++ b/opensim/src/LocalServers/LocalGridServers/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.196")] +[assembly: AssemblyVersionAttribute("0.1.*.199")] [assembly: AssemblyTitleAttribute("opensim-localservers")] [assembly: AssemblyDescriptionAttribute("local grid servers")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/opensim/src/LocalServers/LocalGridServers/LocalGrid.cs b/opensim/src/LocalServers/LocalGridServers/LocalGrid.cs index 5adce27a9a..86a68d5db1 100644 --- a/opensim/src/LocalServers/LocalGridServers/LocalGrid.cs +++ b/opensim/src/LocalServers/LocalGridServers/LocalGrid.cs @@ -113,7 +113,14 @@ namespace LocalGridServers public class LocalGridServer :IGridServer { public List Sessions = new List(); - + + private Dictionary AgentCircuits = new Dictionary(); + + public Dictionary agentcircuits { + get {return agentcircuits;} + set {agentcircuits=value;} + } + public LocalGridServer() { Sessions = new List(); diff --git a/opensim/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs b/opensim/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs index f5ee3201ce..b9910c1f73 100644 --- a/opensim/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs +++ b/opensim/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.196")] +[assembly: AssemblyVersionAttribute("0.1.*.199")] [assembly: AssemblyTitleAttribute("opensim-localstorage")] [assembly: AssemblyDescriptionAttribute("The local storage handler")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/opensim/src/Main.cs b/opensim/src/Main.cs index 79c07825c1..506f87b39d 100644 --- a/opensim/src/Main.cs +++ b/opensim/src/Main.cs @@ -56,7 +56,8 @@ namespace OpenSim public static SimConfig cfg; public static World local_world; public static Grid gridServers; - + public static SimCAPSHTTPServer http_server; + public static Socket Server; private static IPEndPoint ServerIncoming; private static byte[] RecvBuffer = new byte[4096]; @@ -169,6 +170,9 @@ namespace OpenSim local_world.LoadStorageDLL("Db4LocalStorage.dll"); //all these dll names shouldn't be hard coded. local_world.LoadPrimsFromStorage(); + ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server"); + http_server = new SimCAPSHTTPServer(); + MainServerListener(); } diff --git a/opensim/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs b/opensim/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs index 526e59c0d2..867a9c9cec 100644 --- a/opensim/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs +++ b/opensim/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.196")] +[assembly: AssemblyVersionAttribute("0.1.*.199")] [assembly: AssemblyTitleAttribute("opensim-remoteservers")] [assembly: AssemblyDescriptionAttribute("Connects to remote OGS installation")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/opensim/src/RemoteServers/RemoteGridServers/RemoteGrid.cs b/opensim/src/RemoteServers/RemoteGridServers/RemoteGrid.cs index 9175d65845..4340e49e0d 100644 --- a/opensim/src/RemoteServers/RemoteGridServers/RemoteGrid.cs +++ b/opensim/src/RemoteServers/RemoteGridServers/RemoteGrid.cs @@ -70,6 +70,11 @@ namespace RemoteGridServers private string GridServerUrl; private string GridSendKey; private Dictionary AgentCircuits = new Dictionary(); + + public Dictionary agentcircuits { + get {return AgentCircuits;} + set {AgentCircuits=value;} + } public RemoteGridServer() { @@ -80,7 +85,8 @@ namespace RemoteGridServers { return true; } - + + public AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) { agentcircuitdata validcircuit=this.AgentCircuits[circuitcode]; @@ -209,16 +215,6 @@ namespace RemoteGridServers } } - public class agentcircuitdata { - public agentcircuitdata() { } - public LLUUID AgentID; - public LLUUID SessionID; - public LLUUID SecureSessionID; - public string firstname; - public string lastname; - public uint circuitcode; - } - public class BlockingQueue< T > { private Queue< T > _queue = new Queue< T >(); private object _queueSync = new object(); diff --git a/opensim/src/ServerConsole/ServerConsole/AssemblyInfo.cs b/opensim/src/ServerConsole/ServerConsole/AssemblyInfo.cs index d6929b7ff1..cd538dd413 100644 --- a/opensim/src/ServerConsole/ServerConsole/AssemblyInfo.cs +++ b/opensim/src/ServerConsole/ServerConsole/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.196")] +[assembly: AssemblyVersionAttribute("0.1.*.199")] [assembly: AssemblyTitleAttribute("opensim-serverconsole")] [assembly: AssemblyDescriptionAttribute("The default server console")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/opensim/src/Util.cs b/opensim/src/Util.cs index d575beee17..e7ca608d61 100644 --- a/opensim/src/Util.cs +++ b/opensim/src/Util.cs @@ -59,6 +59,16 @@ namespace OpenSim public bool Incoming; } + public class agentcircuitdata { + public agentcircuitdata() { } + public LLUUID AgentID; + public LLUUID SessionID; + public LLUUID SecureSessionID; + public string firstname; + public string lastname; + public uint circuitcode; + } + public class BlockingQueue< T > { private Queue< T > _queue = new Queue< T >(); diff --git a/opensim/src/VersionInfo.cs b/opensim/src/VersionInfo.cs index 9ccb1e32fa..dfe24361d5 100644 --- a/opensim/src/VersionInfo.cs +++ b/opensim/src/VersionInfo.cs @@ -32,6 +32,6 @@ namespace OpenSim /// public class VersionInfo { - public static string Version = "0.1, Build 1173807988, Revision 196M"; + public static string Version = "0.1, Build 1173826017, Revision 199M"; } } diff --git a/opensim/src/physics/AssemblyInfo.cs b/opensim/src/physics/AssemblyInfo.cs index e8f0058fac..785805c167 100644 --- a/opensim/src/physics/AssemblyInfo.cs +++ b/opensim/src/physics/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.196")] +[assembly: AssemblyVersionAttribute("0.1.*.199")] [assembly: AssemblyTitleAttribute("opensim-physicsmanager")] [assembly: AssemblyDescriptionAttribute("Handles physics plugins")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/opensim/src/physics/plugins/AssemblyInfo.cs b/opensim/src/physics/plugins/AssemblyInfo.cs index 3caac3c632..db85ee87b7 100644 --- a/opensim/src/physics/plugins/AssemblyInfo.cs +++ b/opensim/src/physics/plugins/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.196")] +[assembly: AssemblyVersionAttribute("0.1.*.199")] [assembly: AssemblyTitleAttribute("opensim-physicsmanager-physx")] [assembly: AssemblyDescriptionAttribute("PhysX plugin for OpenSim")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/userserver/src/UserHttp.cs b/userserver/src/UserHttp.cs index 02b2139397..c6c9e21c34 100644 --- a/userserver/src/UserHttp.cs +++ b/userserver/src/UserHttp.cs @@ -165,6 +165,9 @@ namespace OpenGridServices ArrayList InitialOutfit = new ArrayList(); InitialOutfit.Add(InitialOutfitHash); + uint circode = (uint)(new Random()).Next(); + TheUser.AddSimCircuit(circode, SimInfo.UUID); + LoginGoodData["last_name"]="\"" + TheUser.firstname + "\""; LoginGoodData["ui-config"]=ui_config; LoginGoodData["sim_ip"]=SimInfo.sim_ip.ToString(); @@ -184,7 +187,7 @@ namespace OpenGridServices LoginGoodData["home"]="{'region_handle':[r" + (SimInfo.RegionLocX*256).ToString() + ",r" + (SimInfo.RegionLocY*256).ToString() + "], 'position':[r" + TheUser.homepos.X.ToString() + ",r" + TheUser.homepos.Y.ToString() + ",r" + TheUser.homepos.Z.ToString() + "], 'look_at':[r" + TheUser.homelookat.X.ToString() + ",r" + TheUser.homelookat.Y.ToString() + ",r" + TheUser.homelookat.Z.ToString() + "]}"; LoginGoodData["message"]=OpenUser_Main.userserver.DefaultStartupMsg; LoginGoodData["first_name"]="\"" + firstname + "\""; - LoginGoodData["circuit_code"]=(Int32)(new Random()).Next(); + LoginGoodData["circuit_code"]=(Int32)circode; LoginGoodData["sim_port"]=(Int32)SimInfo.sim_port; LoginGoodData["secure_session_id"]=TheUser.CurrentSecureSessionID.ToStringHyphenated(); LoginGoodData["look_at"]="\n[r" + TheUser.homelookat.X.ToString() + ",r" + TheUser.homelookat.Y.ToString() + ",r" + TheUser.homelookat.Z.ToString() + "]\n"; @@ -197,6 +200,7 @@ namespace OpenGridServices LoginGoodData["login"]="true"; LoginGoodResp.Value=LoginGoodData; + TheUser.SendDataToSim(SimInfo); return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(LoginGoodResp),"utf-16","utf-8" )); } catch (Exception E) { diff --git a/userserver/src/UserProfiles.cs b/userserver/src/UserProfiles.cs index 3b73d0728b..4586ab3e73 100644 --- a/userserver/src/UserProfiles.cs +++ b/userserver/src/UserProfiles.cs @@ -131,7 +131,24 @@ namespace OpenGridServices } public void AddSimCircuit(uint circuit_code, LLUUID region_UUID) { - if(!this.Circuits.ContainsKey(region_UUID)) this.Circuits.Add(region_UUID, circuit_code); + if(this.Circuits.ContainsKey(region_UUID)== false) + this.Circuits.Add(region_UUID, circuit_code); + } + + public void SendDataToSim(SimProfile TheSim) { + Console.WriteLine(TheSim.caps_url); + Hashtable SimParams = new Hashtable(); + SimParams["session_id"]=this.CurrentSessionID.ToString(); + SimParams["secure_session_id"]=this.CurrentSecureSessionID.ToString(); + SimParams["firstname"]=this.firstname; + SimParams["lastname"]=this.lastname; + SimParams["agent_id"]=this.UUID.ToString(); + SimParams["circuit_code"]=(Int32)this.Circuits[TheSim.UUID]; + ArrayList SendParams = new ArrayList(); + SendParams.Add(SimParams); + + XmlRpcRequest GridReq = new XmlRpcRequest("expect_user",SendParams); + XmlRpcResponse GridResp = GridReq.Send(TheSim.caps_url,3000); } } @@ -180,15 +197,15 @@ namespace OpenGridServices XmlRpcResponse GridResp = GridReq.Send(GridURL,3000); - Hashtable RespData=(Hashtable)GridResp.Value; - this.UUID = new LLUUID(RespData["UUID"].ToString()); - this.regionhandle = Convert.ToUInt64(RespData["regionhandle"]); + Hashtable RespData=(Hashtable)GridResp.Value; + this.UUID = new LLUUID((string)RespData["UUID"]); + this.regionhandle = (ulong)Convert.ToUInt64(RespData["regionhandle"]); this.regionname=(string)RespData["regionname"]; this.sim_ip=(string)RespData["sim_ip"]; - this.sim_port=Convert.ToUInt16(RespData["sim_port"]); + this.sim_port=(uint)Convert.ToUInt16(RespData["sim_port"]); this.caps_url=(string)RespData["caps_url"]; - this.RegionLocX=Convert.ToUInt32(RespData["RegionLocX"]); - this.RegionLocY=Convert.ToUInt32(RespData["RegionLocY"]); + this.RegionLocX=(uint)Convert.ToUInt32(RespData["RegionLocX"]); + this.RegionLocY=(uint)Convert.ToUInt32(RespData["RegionLocY"]); this.sendkey=(string)RespData["sendkey"]; this.recvkey=(string)RespData["recvkey"]; } catch(Exception e) {