SQLite support added to grid manager. (Win!)
parent
fe87117e5e
commit
f2373d71f2
|
@ -0,0 +1,108 @@
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectType>Local</ProjectType>
|
||||||
|
<ProductVersion>8.0.50727</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.SQLite</RootNamespace>
|
||||||
|
<StartupObject></StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||||
|
<DocumentationFile></DocumentationFile>
|
||||||
|
<DebugSymbols>True</DebugSymbols>
|
||||||
|
<FileAlignment>4096</FileAlignment>
|
||||||
|
<Optimize>False</Optimize>
|
||||||
|
<OutputPath>..\bin\</OutputPath>
|
||||||
|
<RegisterForComInterop>False</RegisterForComInterop>
|
||||||
|
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||||
|
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<NoWarn></NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<DocumentationFile></DocumentationFile>
|
||||||
|
<DebugSymbols>False</DebugSymbols>
|
||||||
|
<FileAlignment>4096</FileAlignment>
|
||||||
|
<Optimize>True</Optimize>
|
||||||
|
<OutputPath>..\bin\</OutputPath>
|
||||||
|
<RegisterForComInterop>False</RegisterForComInterop>
|
||||||
|
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||||
|
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<NoWarn></NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" >
|
||||||
|
<HintPath>System.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.SQLite.dll" >
|
||||||
|
<HintPath>..\bin\System.Data.SQLite.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
|
||||||
|
<Name>OpenGrid.Framework.Data</Name>
|
||||||
|
<Project>{62CDF671-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="SQLiteGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SQLiteManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,35 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("OpenGrid.Framework.Data.SQLite")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("OpenGrid.Framework.Data.SQLite")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2007")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("6113d5ce-4547-49f4-9236-0dcc503457b1")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,131 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenGrid.Framework.Data;
|
||||||
|
|
||||||
|
namespace OpenGrid.Framework.Data.SQLite
|
||||||
|
{
|
||||||
|
public class SQLiteGridData : IGridData
|
||||||
|
{
|
||||||
|
private SQLiteManager database;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises the Grid Interface
|
||||||
|
/// </summary>
|
||||||
|
public void Initialise()
|
||||||
|
{
|
||||||
|
database = new SQLiteManager("localhost", "db", "user", "password", "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the grid interface
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
database.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "SQLite OpenGridData";
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from it's location
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="handle">Region location handle</param>
|
||||||
|
/// <returns>Sim profile</returns>
|
||||||
|
public SimProfileData GetProfileByHandle(ulong handle)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
param["handle"] = handle.ToString();
|
||||||
|
|
||||||
|
System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
|
||||||
|
System.Data.IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
SimProfileData row = database.getRow(reader);
|
||||||
|
reader.Close();
|
||||||
|
result.Dispose();
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from it's UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The region UUID</param>
|
||||||
|
/// <returns>The sim profile</returns>
|
||||||
|
public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
param["uuid"] = uuid.ToStringHyphenated();
|
||||||
|
|
||||||
|
System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
|
||||||
|
System.Data.IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
SimProfileData row = database.getRow(reader);
|
||||||
|
reader.Close();
|
||||||
|
result.Dispose();
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataResponse AddProfile(SimProfileData profile)
|
||||||
|
{
|
||||||
|
if (database.insertRow(profile))
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The UUID of the challenger</param>
|
||||||
|
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
||||||
|
/// <param name="authkey">The secret</param>
|
||||||
|
/// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
|
||||||
|
public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
|
||||||
|
{
|
||||||
|
bool throwHissyFit = false; // Should be true by 1.0
|
||||||
|
|
||||||
|
if (throwHissyFit)
|
||||||
|
throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
|
||||||
|
|
||||||
|
SimProfileData data = GetProfileByLLUUID(uuid);
|
||||||
|
|
||||||
|
return (handle == data.regionHandle && authkey == data.regionSecret);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>This requires a security audit.</remarks>
|
||||||
|
/// <param name="uuid"></param>
|
||||||
|
/// <param name="handle"></param>
|
||||||
|
/// <param name="authhash"></param>
|
||||||
|
/// <param name="challenge"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge)
|
||||||
|
{
|
||||||
|
System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed();
|
||||||
|
System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding();
|
||||||
|
|
||||||
|
byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
|
||||||
|
byte[] hash = HashProvider.ComputeHash(stream);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,172 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
using System.Data.SQLite;
|
||||||
|
|
||||||
|
using OpenGrid.Framework.Data;
|
||||||
|
|
||||||
|
namespace OpenGrid.Framework.Data.SQLite
|
||||||
|
{
|
||||||
|
class SQLiteManager
|
||||||
|
{
|
||||||
|
IDbConnection dbcon;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises and creates a new SQLite connection and maintains it.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="hostname">The SQLite server being connected to</param>
|
||||||
|
/// <param name="database">The name of the SQLite database being used</param>
|
||||||
|
/// <param name="username">The username logging into the database</param>
|
||||||
|
/// <param name="password">The password for the user logging in</param>
|
||||||
|
/// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
|
||||||
|
public SQLiteManager(string hostname, string database, string username, string password, string cpooling)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string connectionString = "URI=file:GridServerSqlite.db;";
|
||||||
|
dbcon = new SQLiteConnection(connectionString);
|
||||||
|
|
||||||
|
dbcon.Open();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
throw new Exception("Error initialising SQLite Database: " + e.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the database connection
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
dbcon.Close();
|
||||||
|
dbcon = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Runs a query with protection against SQL Injection by using parameterised input.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
|
||||||
|
/// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
|
||||||
|
/// <returns>A SQLite DB Command</returns>
|
||||||
|
public IDbCommand Query(string sql, Dictionary<string, string> parameters)
|
||||||
|
{
|
||||||
|
SQLiteCommand dbcommand = (SQLiteCommand)dbcon.CreateCommand();
|
||||||
|
dbcommand.CommandText = sql;
|
||||||
|
foreach (KeyValuePair<string, string> param in parameters)
|
||||||
|
{
|
||||||
|
SQLiteParameter paramx = new SQLiteParameter(param.Key,param.Value);
|
||||||
|
dbcommand.Parameters.Add(paramx);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (IDbCommand)dbcommand;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimProfileData getRow(IDataReader reader)
|
||||||
|
{
|
||||||
|
SimProfileData retval = new SimProfileData();
|
||||||
|
|
||||||
|
if (reader.Read())
|
||||||
|
{
|
||||||
|
// Region Main
|
||||||
|
retval.regionHandle = (ulong)reader["regionHandle"];
|
||||||
|
retval.regionName = (string)reader["regionName"];
|
||||||
|
retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]);
|
||||||
|
|
||||||
|
// Secrets
|
||||||
|
retval.regionRecvKey = (string)reader["regionRecvKey"];
|
||||||
|
retval.regionSecret = (string)reader["regionSecret"];
|
||||||
|
retval.regionSendKey = (string)reader["regionSendKey"];
|
||||||
|
|
||||||
|
// Region Server
|
||||||
|
retval.regionDataURI = (string)reader["regionDataURI"];
|
||||||
|
retval.regionOnline = false; // Needs to be pinged before this can be set.
|
||||||
|
retval.serverIP = (string)reader["serverIP"];
|
||||||
|
retval.serverPort = (uint)reader["serverPort"];
|
||||||
|
retval.serverURI = (string)reader["serverURI"];
|
||||||
|
|
||||||
|
// Location
|
||||||
|
retval.regionLocX = (uint)((int)reader["locX"]);
|
||||||
|
retval.regionLocY = (uint)((int)reader["locY"]);
|
||||||
|
retval.regionLocZ = (uint)((int)reader["locZ"]);
|
||||||
|
|
||||||
|
// Neighbours - 0 = No Override
|
||||||
|
retval.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"];
|
||||||
|
retval.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"];
|
||||||
|
retval.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"];
|
||||||
|
retval.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"];
|
||||||
|
|
||||||
|
// Assets
|
||||||
|
retval.regionAssetURI = (string)reader["regionAssetURI"];
|
||||||
|
retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
|
||||||
|
retval.regionAssetSendKey = (string)reader["regionAssetSendKey"];
|
||||||
|
|
||||||
|
// Userserver
|
||||||
|
retval.regionUserURI = (string)reader["regionUserURI"];
|
||||||
|
retval.regionUserRecvKey = (string)reader["regionUserRecvKey"];
|
||||||
|
retval.regionUserSendKey = (string)reader["regionUserSendKey"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception("No rows to return");
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool insertRow(SimProfileData profile)
|
||||||
|
{
|
||||||
|
string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
|
||||||
|
sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
|
||||||
|
sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES ";
|
||||||
|
|
||||||
|
sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
|
||||||
|
sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
|
||||||
|
sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);";
|
||||||
|
|
||||||
|
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
parameters["regionHandle"] = profile.regionHandle.ToString();
|
||||||
|
parameters["regionName"] = profile.regionName;
|
||||||
|
parameters["uuid"] = profile.UUID.ToString();
|
||||||
|
parameters["regionRecvKey"] = profile.regionRecvKey;
|
||||||
|
parameters["regionSendKey"] = profile.regionSendKey;
|
||||||
|
parameters["regionDataURI"] = profile.regionDataURI;
|
||||||
|
parameters["serverIP"] = profile.serverIP;
|
||||||
|
parameters["serverPort"] = profile.serverPort.ToString();
|
||||||
|
parameters["serverURI"] = profile.serverURI;
|
||||||
|
parameters["locX"] = profile.regionLocX.ToString();
|
||||||
|
parameters["locY"] = profile.regionLocY.ToString();
|
||||||
|
parameters["locZ"] = profile.regionLocZ.ToString();
|
||||||
|
parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString();
|
||||||
|
parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString();
|
||||||
|
parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString();
|
||||||
|
parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString();
|
||||||
|
parameters["regionAssetURI"] = profile.regionAssetURI;
|
||||||
|
parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey;
|
||||||
|
parameters["regionAssetSendKey"] = profile.regionAssetSendKey;
|
||||||
|
parameters["regionUserURI"] = profile.regionUserURI;
|
||||||
|
parameters["regionUserRecvKey"] = profile.regionUserRecvKey;
|
||||||
|
parameters["regionUserSendKey"] = profile.regionUserSendKey;
|
||||||
|
|
||||||
|
bool returnval = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
IDbCommand result = Query(sql, parameters);
|
||||||
|
|
||||||
|
if (result.ExecuteNonQuery() == 1)
|
||||||
|
returnval = true;
|
||||||
|
|
||||||
|
result.Dispose();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnval;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
63
OpenSim.sln
63
OpenSim.sln
|
@ -48,6 +48,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Scripting.EmbeddedJ
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.SQLite", "OpenGrid.Framework.Data.SQLite\OpenGrid.Framework.Data.SQLite.csproj", "{1E3F341A-0000-0000-0000-000000000000}"
|
||||||
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GridInterfaces.Local", "OpenSim.GridInterfaces\Local\OpenSim.GridInterfaces.Local.csproj", "{546099CD-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GridInterfaces.Local", "OpenSim.GridInterfaces\Local\OpenSim.GridInterfaces.Local.csproj", "{546099CD-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.AssetServer", "OpenGridServices.AssetServer\OpenGridServices.AssetServer.csproj", "{0021261B-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.AssetServer", "OpenGridServices.AssetServer\OpenGridServices.AssetServer.csproj", "{0021261B-0000-0000-0000-000000000000}"
|
||||||
|
@ -59,63 +61,6 @@ Global
|
||||||
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(ProjectDependencies) = postSolution
|
|
||||||
({EE9E5D96-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({EE9E5D96-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
|
|
||||||
({438A9556-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({438A9556-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({438A9556-0000-0000-0000-000000000000}).7 = ({8BE16150-0000-0000-0000-000000000000})
|
|
||||||
({438A9556-0000-0000-0000-000000000000}).8 = ({8BB20F0A-0000-0000-0000-000000000000})
|
|
||||||
({438A9556-0000-0000-0000-000000000000}).9 = ({632E1BFD-0000-0000-0000-000000000000})
|
|
||||||
({21BFC8E2-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({21BFC8E2-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({21BFC8E2-0000-0000-0000-000000000000}).5 = ({8BB20F0A-0000-0000-0000-000000000000})
|
|
||||||
({21BFC8E2-0000-0000-0000-000000000000}).6 = ({62CDF671-0000-0000-0000-000000000000})
|
|
||||||
({21BFC8E2-0000-0000-0000-000000000000}).9 = ({8E81D43C-0000-0000-0000-000000000000})
|
|
||||||
({8BE16150-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({8BE16150-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({0F3C3AC1-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
|
|
||||||
({E88EF749-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({66591469-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({66591469-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({66591469-0000-0000-0000-000000000000}).5 = ({8BB20F0A-0000-0000-0000-000000000000})
|
|
||||||
({66591469-0000-0000-0000-000000000000}).8 = ({8E81D43C-0000-0000-0000-000000000000})
|
|
||||||
({4F874463-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
|
|
||||||
({8BB20F0A-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({8BB20F0A-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({8BB20F0A-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
|
|
||||||
({B0027747-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({B0027747-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({988F0AC4-0000-0000-0000-000000000000}).3 = ({8BE16150-0000-0000-0000-000000000000})
|
|
||||||
({0A563AC1-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
|
|
||||||
({8ACA2445-0000-0000-0000-000000000000}).4 = ({8E81D43C-0000-0000-0000-000000000000})
|
|
||||||
({B55C0B5D-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({B55C0B5D-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({B55C0B5D-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
|
|
||||||
({632E1BFD-0000-0000-0000-000000000000}).5 = ({2270B8FE-0000-0000-0000-000000000000})
|
|
||||||
({632E1BFD-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({632E1BFD-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({632E1BFD-0000-0000-0000-000000000000}).8 = ({E88EF749-0000-0000-0000-000000000000})
|
|
||||||
({632E1BFD-0000-0000-0000-000000000000}).9 = ({8BE16150-0000-0000-0000-000000000000})
|
|
||||||
({632E1BFD-0000-0000-0000-000000000000}).10 = ({8BB20F0A-0000-0000-0000-000000000000})
|
|
||||||
({632E1BFD-0000-0000-0000-000000000000}).11 = ({8E81D43C-0000-0000-0000-000000000000})
|
|
||||||
({E1B79ECF-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({E1B79ECF-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({6B20B603-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({6B20B603-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({39BD9497-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
|
|
||||||
({97A82740-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({7E494328-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({7E494328-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({546099CD-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({546099CD-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({0021261B-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
|
||||||
({0021261B-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
|
||||||
({0021261B-0000-0000-0000-000000000000}).5 = ({546099CD-0000-0000-0000-000000000000})
|
|
||||||
({0021261B-0000-0000-0000-000000000000}).6 = ({8BB20F0A-0000-0000-0000-000000000000})
|
|
||||||
({0021261B-0000-0000-0000-000000000000}).9 = ({8E81D43C-0000-0000-0000-000000000000})
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
@ -213,6 +158,10 @@ Global
|
||||||
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = 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.ActiveCfg = Release|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{7E494328-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
|
||||||
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|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}.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.ActiveCfg = Release|Any CPU
|
||||||
|
|
24
prebuild.xml
24
prebuild.xml
|
@ -343,6 +343,30 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
<Project name="OpenGrid.Framework.Data.SQLite" path="OpenGrid.Framework.Data.SQLite" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../bin/</ReferencePath>
|
||||||
|
<Reference name="System" localCopy="false"/>
|
||||||
|
<Reference name="System.Xml"/>
|
||||||
|
<Reference name="System.Data"/>
|
||||||
|
<Reference name="System.Data.SQLite.dll"/>
|
||||||
|
<Reference name="OpenGrid.Framework.Data"/>
|
||||||
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
<!-- OGS projects -->
|
<!-- OGS projects -->
|
||||||
|
|
||||||
<Project name="OpenGridServices.GridServer" path="OpenGridServices.GridServer" type="Exe">
|
<Project name="OpenGridServices.GridServer" path="OpenGridServices.GridServer" type="Exe">
|
||||||
|
|
Loading…
Reference in New Issue