*Added support for reservations in OpenGridServices (mysql only for now)

*SQL file coming soon (as soon as I can figure out how to get the
Sugilite
mingchen 2007-06-26 17:50:27 +00:00
parent 2989c22702
commit 8ff1d0968f
13 changed files with 257 additions and 121 deletions

View File

@ -157,5 +157,10 @@ namespace OpenGrid.Framework.Data.DB4o
{
return "0.1";
}
public ReservationData GetReservationAtPoint(uint x, uint y)
{
return null;
}
}
}

View File

@ -106,5 +106,8 @@ namespace OpenGrid.Framework.Data
/// <param name="profile">The profile to add</param>
/// <returns>RESPONSE_OK if successful, error if not.</returns>
DataResponse AddProfile(SimProfileData profile);
ReservationData GetReservationAtPoint(uint x, uint y);
}
}

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>{62CDF671-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenGrid.Framework.Data</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenGrid.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,22 +61,23 @@
<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>
@ -90,6 +97,7 @@
<Compile Include="InventoryData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ReservationData.cs" />
<Compile Include="SimProfileData.cs">
<SubType>Code</SubType>
</Compile>
@ -110,4 +118,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@ -0,0 +1,51 @@
/*
* 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.Generic;
using System.Text;
using libsecondlife;
namespace OpenGrid.Framework.Data
{
public class ReservationData
{
public LLUUID userUUID = new LLUUID();
public int reservationMinX = 0;
public int reservationMinY = 0;
public int reservationMaxX = 65536;
public int reservationMaxY = 65536;
public string reservationName = "";
public string reservationCompany = "";
public bool status = true;
public string gridSendKey = "";
public string gridRecvKey = "";
}
}

View File

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Config.GridConfigDb4o", "OpenGridServices\OpenGrid.Config\GridConfigDb4o\OpenGrid.Config.GridConfigDb4o.csproj", "{B0027747-0000-0000-0000-000000000000}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data", "Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj", "{62CDF671-0000-0000-0000-000000000000}"
@ -25,71 +25,61 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenGridServices\OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
({39BD9497-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
({0A563AC1-0000-0000-0000-000000000000}).1 = ({62CDF671-0000-0000-0000-000000000000})
({0F3C3AC1-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
({1E3F341A-0000-0000-0000-000000000000}).1 = ({62CDF671-0000-0000-0000-000000000000})
({DA9A7391-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).3 = ({7924FD35-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{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
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{DA9A7391-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA9A7391-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA9A7391-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA9A7391-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0021261B-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
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66591469-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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{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
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{DA9A7391-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA9A7391-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA9A7391-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA9A7391-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0021261B-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
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66591469-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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -181,10 +181,12 @@ namespace OpenGrid.Framework.Data.MSSQL
byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
byte[] hash = HashProvider.ComputeHash(stream);
return false;
}
public ReservationData GetReservationAtPoint(uint x, uint y)
{
return null;
}
}
}

View File

@ -252,6 +252,33 @@ namespace OpenGrid.Framework.Data.MySQL
return false;
}
public ReservationData GetReservationAtPoint(uint x, uint y)
{
try
{
lock (database)
{
Dictionary<string, string> param = new Dictionary<string, string>();
param["?x"] = x.ToString();
param["?y"] = y.ToString();
System.Data.IDbCommand result = database.Query("SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y", param);
System.Data.IDataReader reader = result.ExecuteReader();
ReservationData row = database.readReservationRow(reader);
reader.Close();
result.Dispose();
return row;
}
}
catch (Exception e)
{
database.Reconnect();
Console.WriteLine(e.ToString());
return null;
}
}
}

View File

@ -240,6 +240,34 @@ namespace OpenGrid.Framework.Data.MySQL
return retval;
}
/// <summary>
/// Reads a reservation row from a database reader
/// </summary>
/// <param name="reader">An active database reader</param>
/// <returns>A reservation data object</returns>
public ReservationData readReservationRow(IDataReader reader)
{
ReservationData retval = new ReservationData();
if (reader.Read())
{
retval.gridRecvKey = (string)reader["gridRecvKey"];
retval.gridSendKey = (string)reader["gridSendKey"];
retval.reservationCompany = (string)reader["resCompany"];
retval.reservationMaxX = (int)reader["resXMax"];
retval.reservationMaxY = (int)reader["resYMax"];
retval.reservationMinX = (int)reader["resXMin"];
retval.reservationMinY = (int)reader["resYMin"];
retval.reservationName = (string)reader["resName"];
retval.status = (bool)reader["status"];
retval.userUUID = new libsecondlife.LLUUID((string)reader["userUUID"]);
}
else
{
return null;
}
return retval;
}
/// <summary>
/// Reads an agent row from a database reader
/// </summary>

View File

@ -184,6 +184,11 @@ namespace OpenGrid.Framework.Data.SQLite
return false;
}
public ReservationData GetReservationAtPoint(uint x, uint y)
{
return null;
}
}

View File

@ -81,7 +81,7 @@ namespace OpenGridServices.AssetServer
private OpenAsset_Main()
{
m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false);
MainLog.Instance = m_console;
OpenSim.Framework.Console.MainLog.Instance = m_console;
}
public void Startup()

View File

@ -392,11 +392,11 @@ namespace OpenGridServices.GridServer
simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString();
// For Sugilite compatibility
simProfileBlock["regionhandle"] = aSim.Value.regionHandle.ToString();
simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString();
simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString();
simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString();
simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated();
simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString();
simProfileBlock["sim_ip"] = simProfile.serverIP.ToString();
simProfileBlock["sim_port"] = simProfile.serverPort.ToString();
simProfileBlock["sim_uri"] = simProfile.serverURI.ToString();
simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated();
simProfileList.Add(simProfileBlock);
}
@ -561,6 +561,7 @@ namespace OpenGridServices.GridServer
return "ERROR! Servers must register with public addresses.";
}
try
{
OpenSim.Framework.Console.MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
@ -568,9 +569,18 @@ namespace OpenGridServices.GridServer
{
try
{
kvp.Value.AddProfile(TheSim);
OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")");
logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
//Check reservations
ReservationData reserveData = kvp.Value.GetReservationAtPoint(TheSim.regionLocX, TheSim.regionLocY);
if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null))
{
kvp.Value.AddProfile(TheSim);
OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")");
logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
}
else
{
return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
}
}
catch (Exception e)
{

View File

@ -73,7 +73,7 @@ namespace OpenGridServices.UserServer
private OpenUser_Main()
{
m_console = new LogBase("opengrid-userserver-console.log", "OpenUser", this , false);
MainLog.Instance = m_console;
OpenSim.Framework.Console.MainLog.Instance = m_console;
}
private void Work()
@ -93,16 +93,16 @@ namespace OpenGridServices.UserServer
this.ConfigDB(this.localXMLConfig);
this.localXMLConfig.Close();
MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration");
OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration");
Cfg = this.LoadConfigDll(this.ConfigDll);
Cfg.InitConfig();
MainLog.Instance.Verbose( "Main.cs:Startup() - Establishing data connection");
OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection");
m_userManager = new UserManager();
m_userManager._config = Cfg;
m_userManager.AddPlugin(StorageDll);
MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process");
OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process");
BaseHttpServer httpServer = new BaseHttpServer(8002);
httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod);

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>{66591469-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenGridServices.UserServer</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Exe</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenGridServices.UserServer</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,50 +61,47 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Db4objects.Db4o.dll" >
<Reference Include="Db4objects.Db4o.dll">
<HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="libsecondlife.dll" >
<Reference Include="libsecondlife.dll">
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenGrid.Framework.UserManager" >
<HintPath>OpenGrid.Framework.UserManager.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.Framework" >
<Reference Include="OpenSim.Framework">
<HintPath>OpenSim.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.Framework.Console" >
<Reference Include="OpenSim.Framework.Console">
<HintPath>OpenSim.Framework.Console.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.GenericConfig.Xml" >
<Reference Include="OpenSim.GenericConfig.Xml">
<HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.Servers" >
<Reference Include="OpenSim.Servers">
<HintPath>OpenSim.Servers.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" >
<Reference Include="XMLRPC">
<HintPath>XMLRPC.dll</HintPath>
<Private>False</Private>
</Reference>
@ -108,7 +111,11 @@
<Name>OpenGrid.Framework.Data</Name>
<Project>{62CDF671-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\Common\OpenGrid.Framework.UserManager\OpenGrid.Framework.UserManagement.csproj">
<Project>{DA9A7391-0000-0000-0000-000000000000}</Project>
<Name>OpenGrid.Framework.UserManagement</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -129,4 +136,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>