mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Added POST handler for /sims/ in the grid server
Removed asset/user config in grid mode in the region server Added "create user" command in the user server console Begun buggy code to send sim details to the grid at startup Drank whole pack of red bull in one night and made stupid jokes in SVN logs and C# comments
This commit is contained in:
@@ -1,67 +1,67 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="OpenSim.Framework" default="build">
|
||||
<target name="build">
|
||||
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||
<fileset basedir="${project::get-base-directory()}">
|
||||
</fileset>
|
||||
</copy>
|
||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||
<resources prefix="OpenSim.Framework" dynamicprefix="true" >
|
||||
</resources>
|
||||
<sources failonempty="true">
|
||||
<include name="AgentCiruitData.cs" />
|
||||
<include name="AgentInventory.cs" />
|
||||
<include name="AssetBase.cs" />
|
||||
<include name="BlockingQueue.cs" />
|
||||
<include name="HeightMapGenHills.cs" />
|
||||
<include name="IAssetServer.cs" />
|
||||
<include name="IConfig.cs" />
|
||||
<include name="IGenericConfig.cs" />
|
||||
<include name="IGridConfig.cs" />
|
||||
<include name="IGridServer.cs" />
|
||||
<include name="ILocalStorage.cs" />
|
||||
<include name="IUserConfig.cs" />
|
||||
<include name="IUserServer.cs" />
|
||||
<include name="LocalGridBase.cs" />
|
||||
<include name="Login.cs" />
|
||||
<include name="LoginService.cs" />
|
||||
<include name="NeighbourInfo.cs" />
|
||||
<include name="PrimData.cs" />
|
||||
<include name="RemoteGridBase.cs" />
|
||||
<include name="SimProfile.cs" />
|
||||
<include name="SimProfileBase.cs" />
|
||||
<include name="UserProfile.cs" />
|
||||
<include name="UserProfileManager.cs" />
|
||||
<include name="UserProfileManagerBase.cs" />
|
||||
<include name="Util.cs" />
|
||||
<include name="Properties/AssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${project::get-base-directory()}">
|
||||
<lib>
|
||||
<include name="${project::get-base-directory()}" />
|
||||
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||
</lib>
|
||||
<include name="System.dll" />
|
||||
<include name="System.Xml.dll" />
|
||||
<include name="../bin/libsecondlife.dll" />
|
||||
<include name="../bin/Db4objects.Db4o.dll" />
|
||||
</references>
|
||||
</csc>
|
||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
||||
<mkdir dir="${project::get-base-directory()}/../bin/"/>
|
||||
<copy todir="${project::get-base-directory()}/../bin/">
|
||||
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||
<include name="*.dll"/>
|
||||
<include name="*.exe"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="clean">
|
||||
<delete dir="${bin.dir}" failonerror="false" />
|
||||
<delete dir="${obj.dir}" failonerror="false" />
|
||||
</target>
|
||||
<target name="doc" description="Creates documentation.">
|
||||
</target>
|
||||
</project>
|
||||
<?xml version="1.0" ?>
|
||||
<project name="OpenSim.Framework" default="build">
|
||||
<target name="build">
|
||||
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||
<fileset basedir="${project::get-base-directory()}">
|
||||
</fileset>
|
||||
</copy>
|
||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||
<resources prefix="OpenSim.Framework" dynamicprefix="true" >
|
||||
</resources>
|
||||
<sources failonempty="true">
|
||||
<include name="AgentCiruitData.cs" />
|
||||
<include name="AgentInventory.cs" />
|
||||
<include name="AssetBase.cs" />
|
||||
<include name="BlockingQueue.cs" />
|
||||
<include name="HeightMapGenHills.cs" />
|
||||
<include name="IAssetServer.cs" />
|
||||
<include name="IConfig.cs" />
|
||||
<include name="IGenericConfig.cs" />
|
||||
<include name="IGridConfig.cs" />
|
||||
<include name="IGridServer.cs" />
|
||||
<include name="ILocalStorage.cs" />
|
||||
<include name="IUserConfig.cs" />
|
||||
<include name="IUserServer.cs" />
|
||||
<include name="LocalGridBase.cs" />
|
||||
<include name="Login.cs" />
|
||||
<include name="LoginService.cs" />
|
||||
<include name="NeighbourInfo.cs" />
|
||||
<include name="PrimData.cs" />
|
||||
<include name="RemoteGridBase.cs" />
|
||||
<include name="SimProfile.cs" />
|
||||
<include name="SimProfileBase.cs" />
|
||||
<include name="UserProfile.cs" />
|
||||
<include name="UserProfileManager.cs" />
|
||||
<include name="UserProfileManagerBase.cs" />
|
||||
<include name="Util.cs" />
|
||||
<include name="Properties/AssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${project::get-base-directory()}">
|
||||
<lib>
|
||||
<include name="${project::get-base-directory()}" />
|
||||
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||
</lib>
|
||||
<include name="System.dll" />
|
||||
<include name="System.Xml.dll" />
|
||||
<include name="../bin/libsecondlife.dll" />
|
||||
<include name="../bin/Db4objects.Db4o.dll" />
|
||||
</references>
|
||||
</csc>
|
||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
||||
<mkdir dir="${project::get-base-directory()}/../bin/"/>
|
||||
<copy todir="${project::get-base-directory()}/../bin/">
|
||||
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||
<include name="*.dll"/>
|
||||
<include name="*.exe"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="clean">
|
||||
<delete dir="${bin.dir}" failonerror="false" />
|
||||
<delete dir="${obj.dir}" failonerror="false" />
|
||||
</target>
|
||||
<target name="doc" description="Creates documentation.">
|
||||
</target>
|
||||
</project>
|
||||
|
||||
@@ -16,11 +16,10 @@ namespace OpenSim.Framework.Sims
|
||||
{
|
||||
Hashtable GridReqParams = new Hashtable();
|
||||
GridReqParams["region_handle"] = region_handle.ToString();
|
||||
GridReqParams["caller"] = "userserver";
|
||||
GridReqParams["authkey"] = SendKey;
|
||||
ArrayList SendParams = new ArrayList();
|
||||
SendParams.Add(GridReqParams);
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("get_sim_info", SendParams);
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
|
||||
|
||||
XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
|
||||
|
||||
@@ -42,6 +41,40 @@ namespace OpenSim.Framework.Sims
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
Hashtable GridReqParams = new Hashtable();
|
||||
GridReqParams["UUID"] = UUID.ToString();
|
||||
GridReqParams["caller"] = "userserver";
|
||||
GridReqParams["authkey"] = SendKey;
|
||||
ArrayList SendParams = new ArrayList();
|
||||
SendParams.Add(GridReqParams);
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
|
||||
|
||||
XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
|
||||
|
||||
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 = (uint)Convert.ToUInt16(RespData["sim_port"]);
|
||||
this.caps_url = (string)RespData["caps_url"];
|
||||
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)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public SimProfile()
|
||||
{
|
||||
|
||||
@@ -90,8 +90,8 @@ namespace OpenSim.Framework.User
|
||||
|
||||
LLUUID AgentID = TheUser.UUID;
|
||||
TheUser.InitSessionData();
|
||||
// SimProfile SimInfo = new SimProfile();
|
||||
// SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
|
||||
SimProfile SimInfo = new SimProfile();
|
||||
SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
|
||||
|
||||
|
||||
Hashtable GlobalT = new Hashtable();
|
||||
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.User
|
||||
InitialOutfit.Add(InitialOutfitHash);
|
||||
|
||||
uint circode = (uint)(Util.RandomClass.Next());
|
||||
//TheUser.AddSimCircuit(circode, SimInfo.UUID);
|
||||
TheUser.AddSimCircuit(circode, SimInfo.UUID);
|
||||
|
||||
responseData["last_name"] = TheUser.lastname;
|
||||
responseData["ui-config"] = ui_config;
|
||||
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.User
|
||||
|
||||
this.CustomiseResponse(ref responseData, TheUser);
|
||||
response.Value = responseData;
|
||||
//TheUser.SendDataToSim(SimInfo);
|
||||
// TheUser.SendDataToSim(SimInfo);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user