*Removed SimProfile.cs as it is no longer needed (in favor of SimProfileData)

*Added simulator_data_request XMLRPC method to request data from the grid server about a sim instead of faking its login
*Login is progressing, now just getting an XML error (http://pastebin.com/942515) -- if you can fix this, throw MingChen in IRC a Private Message
This commit is contained in:
mingchen
2007-07-05 15:15:28 +00:00
parent ad86e94b3d
commit 583f2a9de8
40 changed files with 406 additions and 421 deletions

View File

@@ -86,16 +86,16 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="CommunicationsManager.cs">
<Compile Include="IUserServices.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IGridServices.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IInterRegionCommunications.cs">
<Compile Include="CommunicationsManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IUserServices.cs">
<Compile Include="IInterRegionCommunications.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">

View File

@@ -11,10 +11,10 @@
<resources prefix="OpenSim.Framework.Communications" dynamicprefix="true" >
</resources>
<sources failonempty="true">
<include name="CommunicationsManager.cs" />
<include name="IGridServices.cs" />
<include name="IInterRegionCommunications.cs" />
<include name="IUserServices.cs" />
<include name="IGridServices.cs" />
<include name="CommunicationsManager.cs" />
<include name="IInterRegionCommunications.cs" />
<include name="Properties/AssemblyInfo.cs" />
</sources>
<references basedir="${project::get-base-directory()}">

View File

@@ -69,10 +69,10 @@
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ConsoleCallbacksBase.cs">
<Compile Include="LogBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="LogBase.cs">
<Compile Include="ConsoleCallbacksBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="MainLog.cs">

View File

@@ -12,8 +12,8 @@
</resources>
<sources failonempty="true">
<include name="AssemblyInfo.cs" />
<include name="ConsoleCallbacksBase.cs" />
<include name="LogBase.cs" />
<include name="ConsoleCallbacksBase.cs" />
<include name="MainLog.cs" />
</sources>
<references basedir="${project::get-base-directory()}">

View File

@@ -88,15 +88,15 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="DB4oUserData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB4oGridData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB4oManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB4oUserData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>

View File

@@ -11,9 +11,9 @@
<resources prefix="OpenSim.Framework.Data.DB4o" dynamicprefix="true" >
</resources>
<sources failonempty="true">
<include name="DB4oUserData.cs" />
<include name="DB4oGridData.cs" />
<include name="DB4oManager.cs" />
<include name="DB4oUserData.cs" />
<include name="Properties/AssemblyInfo.cs" />
</sources>
<references basedir="${project::get-base-directory()}">

View File

@@ -88,19 +88,19 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="MySQLGridData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="MySQLInventoryData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="MySQLLogData.cs">
<Compile Include="MySQLUserData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="MySQLManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="MySQLUserData.cs">
<Compile Include="MySQLLogData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="MySQLGridData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">

View File

@@ -11,11 +11,11 @@
<resources prefix="OpenSim.Framework.Data.MySQL" dynamicprefix="true" >
</resources>
<sources failonempty="true">
<include name="MySQLGridData.cs" />
<include name="MySQLInventoryData.cs" />
<include name="MySQLLogData.cs" />
<include name="MySQLManager.cs" />
<include name="MySQLUserData.cs" />
<include name="MySQLManager.cs" />
<include name="MySQLLogData.cs" />
<include name="MySQLGridData.cs" />
<include name="Properties/AssemblyInfo.cs" />
</sources>
<references basedir="${project::get-base-directory()}">

View File

@@ -88,10 +88,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="SQLiteGridData.cs">
<Compile Include="SQLiteManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SQLiteManager.cs">
<Compile Include="SQLiteGridData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">

View File

@@ -11,8 +11,8 @@
<resources prefix="OpenSim.Framework.Data.SQLite" dynamicprefix="true" >
</resources>
<sources failonempty="true">
<include name="SQLiteGridData.cs" />
<include name="SQLiteManager.cs" />
<include name="SQLiteGridData.cs" />
<include name="Properties/AssemblyInfo.cs" />
</sources>
<references basedir="${project::get-base-directory()}">

View File

@@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@@ -6,7 +6,8 @@
<ProjectGuid>{36B72A9B-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenSim.Framework.Data</AssemblyName>
@@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenSim.Framework.Data</RootNamespace>
<StartupObject></StartupObject>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -28,7 +31,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -46,7 +51,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@@ -55,29 +61,34 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="libsecondlife.dll" >
<Reference Include="libsecondlife.dll">
<HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" >
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data" >
<Reference Include="System.Data">
<HintPath>System.Data.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="XMLRPC, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<Compile Include="ReservationData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GridData.cs">
<SubType>Code</SubType>
</Compile>
@@ -90,18 +101,15 @@
<Compile Include="InventoryData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ReservationData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SimProfileData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="UserData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="UserProfileData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SimProfileData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@@ -113,4 +121,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@@ -11,14 +11,14 @@
<resources prefix="OpenSim.Framework.Data" dynamicprefix="true" >
</resources>
<sources failonempty="true">
<include name="ReservationData.cs" />
<include name="GridData.cs" />
<include name="ILogData.cs" />
<include name="IniConfig.cs" />
<include name="InventoryData.cs" />
<include name="ReservationData.cs" />
<include name="SimProfileData.cs" />
<include name="UserData.cs" />
<include name="UserProfileData.cs" />
<include name="SimProfileData.cs" />
<include name="Properties/AssemblyInfo.cs" />
</sources>
<references basedir="${project::get-base-directory()}">

View File

@@ -26,6 +26,10 @@
*
*/
using libsecondlife;
using Nwc.XmlRpc;
using System;
using System.Collections;
namespace OpenSim.Framework.Data
{
@@ -108,5 +112,71 @@ namespace OpenSim.Framework.Data
/// Region Map Texture Asset
/// </summary>
public LLUUID regionMapTextureID = new LLUUID("00000000-0000-0000-9999-000000000006");
/// <summary>
/// Get Sim profile data from grid server when in grid mode
/// </summary>
/// <param name="region_uuid"></param>
/// <param name="gridserver_url"></param>
/// <param name="?"></param>
/// <returns></returns>
public SimProfileData RequestSimProfileData(LLUUID region_uuid, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey)
{
Hashtable requestData = new Hashtable();
requestData["region_uuid"] = region_uuid.UUID.ToString();
requestData["authkey"] = gridserver_sendkey;
ArrayList SendParams = new ArrayList();
SendParams.Add(requestData);
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000);
Hashtable responseData = (Hashtable)GridResp.Value;
if (responseData.ContainsKey("error"))
{
return null;
}
SimProfileData simData = new SimProfileData();
simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]);
simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]);
simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256));
simData.serverIP = (string)responseData["sim_ip"];
simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]);
simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/";
simData.UUID = new LLUUID((string)responseData["region_UUID"]);
simData.regionName = (string)responseData["region_name"];
return simData;
}
public SimProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey)
{
Hashtable requestData = new Hashtable();
requestData["region_handle"] = region_handle.ToString();
requestData["authkey"] = gridserver_sendkey;
ArrayList SendParams = new ArrayList();
SendParams.Add(requestData);
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000);
Hashtable responseData = (Hashtable)GridResp.Value;
if (responseData.ContainsKey("error"))
{
return null;
}
SimProfileData simData = new SimProfileData();
simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]);
simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]);
simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256));
simData.serverIP = (string)responseData["sim_ip"];
simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]);
simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/";
simData.UUID = new LLUUID((string)responseData["region_UUID"]);
simData.regionName = (string)responseData["region_name"];
return simData;
}
}
}

View File

@@ -97,85 +97,67 @@
<Compile Include="BlockingQueue.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IRegionCommsListener.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="LoginService.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="RegionCommsListener.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Remoting.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SimProfile.cs">
<Compile Include="Util.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="UserProfile.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Util.cs">
<Compile Include="IRegionCommsListener.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Remoting.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="RegionCommsListener.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="LoginService.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\AuthenticateResponse.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IUserServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IAssetServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IWorld.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IClientAPI.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\ILocalStorage.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IUserServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IWorld.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\Config\IGenericConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\Config\IGridConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\Config\IUserConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AgentCiruitData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AgentWearable.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AssetBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AssetLandmark.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AssetStorage.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\EstateSettings.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\Login.cs">
<Compile Include="Interfaces\Config\IGridConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\MapBlockData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\PrimitiveBaseShape.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AssetLandmark.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\NeighbourInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\NetworkServersInfo.cs">
<Compile Include="Types\RegionInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\RegionHandle.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\ParcelData.cs">
@@ -184,18 +166,33 @@
<Compile Include="Types\PrimData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\PrimitiveBaseShape.cs">
<Compile Include="Types\AgentWearable.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\RegionHandle.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\RegionInfo.cs">
<Compile Include="Types\AssetStorage.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\UUID.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\EstateSettings.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\Login.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AgentCiruitData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AssetBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\NetworkServersInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>

View File

@@ -14,39 +14,38 @@
<include name="AgentInventory.cs" />
<include name="AuthenticateSessionBase.cs" />
<include name="BlockingQueue.cs" />
<include name="IRegionCommsListener.cs" />
<include name="LoginService.cs" />
<include name="RegionCommsListener.cs" />
<include name="Remoting.cs" />
<include name="SimProfile.cs" />
<include name="UserProfile.cs" />
<include name="Util.cs" />
<include name="UserProfile.cs" />
<include name="IRegionCommsListener.cs" />
<include name="Remoting.cs" />
<include name="RegionCommsListener.cs" />
<include name="LoginService.cs" />
<include name="Interfaces/AuthenticateResponse.cs" />
<include name="Interfaces/IUserServer.cs" />
<include name="Interfaces/IAssetServer.cs" />
<include name="Interfaces/IWorld.cs" />
<include name="Interfaces/IClientAPI.cs" />
<include name="Interfaces/ILocalStorage.cs" />
<include name="Interfaces/IUserServer.cs" />
<include name="Interfaces/IWorld.cs" />
<include name="Interfaces/Config/IGenericConfig.cs" />
<include name="Interfaces/Config/IGridConfig.cs" />
<include name="Interfaces/Config/IUserConfig.cs" />
<include name="Properties/AssemblyInfo.cs" />
<include name="Types/AgentCiruitData.cs" />
<include name="Types/AgentWearable.cs" />
<include name="Types/AssetBase.cs" />
<include name="Types/AssetLandmark.cs" />
<include name="Types/AssetStorage.cs" />
<include name="Types/EstateSettings.cs" />
<include name="Types/Login.cs" />
<include name="Interfaces/Config/IGridConfig.cs" />
<include name="Types/MapBlockData.cs" />
<include name="Types/PrimitiveBaseShape.cs" />
<include name="Types/AssetLandmark.cs" />
<include name="Types/NeighbourInfo.cs" />
<include name="Types/NetworkServersInfo.cs" />
<include name="Types/RegionInfo.cs" />
<include name="Types/RegionHandle.cs" />
<include name="Types/ParcelData.cs" />
<include name="Types/PrimData.cs" />
<include name="Types/PrimitiveBaseShape.cs" />
<include name="Types/RegionHandle.cs" />
<include name="Types/RegionInfo.cs" />
<include name="Types/AgentWearable.cs" />
<include name="Types/AssetStorage.cs" />
<include name="Types/UUID.cs" />
<include name="Types/EstateSettings.cs" />
<include name="Types/Login.cs" />
<include name="Types/AgentCiruitData.cs" />
<include name="Types/AssetBase.cs" />
<include name="Types/NetworkServersInfo.cs" />
<include name="Properties/AssemblyInfo.cs" />
</sources>
<references basedir="${project::get-base-directory()}">
<lib>

View File

@@ -1,119 +0,0 @@
/*
* Copyright (c) Contributors, http://www.openmetaverse.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* 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 OpenSim Project 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 THE DEVELOPERS ``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 THE CONTRIBUTORS 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.Collections;
using libsecondlife;
using Nwc.XmlRpc;
namespace OpenSim.Framework.Sims
{
public class SimProfile
{
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 bool online;
public SimProfile LoadFromGrid(ulong region_handle, string GridURL, string SendKey, string RecvKey)
{
try
{
Hashtable GridReqParams = new Hashtable();
GridReqParams["region_handle"] = region_handle.ToString();
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 = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
this.regionname = (string)RespData["regionname"];
this.sim_ip = (string)RespData["sim_ip"];
this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
this.sendkey = SendKey;
this.recvkey = RecvKey;
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
return this;
}
public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
{
try
{
Hashtable GridReqParams = new Hashtable();
GridReqParams["UUID"] = UUID.ToString();
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 = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
this.regionname = (string)RespData["regionname"];
this.sim_ip = (string)RespData["sim_ip"];
this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
this.sendkey = SendKey;
this.recvkey = RecvKey;
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
return this;
}
public SimProfile()
{
}
}
}

View File

@@ -357,6 +357,8 @@ namespace OpenSim.Framework.UserManagement
/// <returns>The response to send</returns>
public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
{
System.Console.WriteLine("Attempting login now...");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable requestData = (Hashtable)request.Params[0];
@@ -457,11 +459,13 @@ namespace OpenSim.Framework.UserManagement
{
System.Console.WriteLine(e.ToString());
return logResponse.CreateDeadRegionResponse();
//return logResponse.ToXmlRpcResponse();
}
CommitAgent(ref userProfile);
return logResponse.ToXmlRpcResponse();
}
catch (Exception E)
{
System.Console.WriteLine(E.ToString());