Update svn properties, add copyright headers, minor formatting cleanup.

GenericGridServerConcept
Jeff Ames 2009-02-23 10:36:16 +00:00
parent d9cb81e8fe
commit f175cb7e8c
13 changed files with 1945 additions and 1758 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,31 @@
using System; /*
* Copyright (c) Contributors, http://opensimulator.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 OpenSimulator 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.Collections.Generic;
using System.Text; using System.Text;
using System.Timers; using System.Timers;
@ -40,12 +67,11 @@ namespace OpenSim.Client.MXP
{ {
IConfig con = config.Configs["MXP"]; IConfig con = config.Configs["MXP"];
if(!con.GetBoolean("Enabled",false)) if (!con.GetBoolean("Enabled", false))
return; return;
mxp_Port = con.GetInt("Port", mxp_Port); mxp_Port = con.GetInt("Port", mxp_Port);
server = new MXPPacketServer("http://null", mxp_Port, m_scenes); server = new MXPPacketServer("http://null", mxp_Port, m_scenes);
ticker.AutoReset = false; ticker.AutoReset = false;
@ -62,7 +88,7 @@ namespace OpenSim.Client.MXP
if (!shutdown) if (!shutdown)
ticker.Start(); ticker.Start();
if(++ticks % 100 == 0) if (++ticks % 100 == 0)
{ {
server.PrintDebugInformation(); server.PrintDebugInformation();
} }

View File

@ -1,4 +1,31 @@
using System; /*
* Copyright (c) Contributors, http://opensimulator.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 OpenSimulator 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.Collections.Generic;
using System.Text; using System.Text;
using OpenMetaverse; using OpenMetaverse;

View File

@ -1,4 +1,31 @@
/* This file borrows heavily from MXPServer.cs - the reference MXPServer /*
* Copyright (c) Contributors, http://opensimulator.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 OpenSimulator 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.
*/
/* This file borrows heavily from MXPServer.cs - the reference MXPServer
* See http://www.bubblecloud.org for a copy of the original file and * See http://www.bubblecloud.org for a copy of the original file and
* implementation details. */ * implementation details. */
using System; using System;
@ -415,6 +442,5 @@ namespace OpenSim.Client.MXP.PacketHandler
} }
#endregion #endregion
} }
} }

View File

@ -1,11 +1,38 @@
using System; /*
using OpenSim.Data; * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
namespace OpenSim.Grid.MessagingServer *
{ * Redistribution and use in source and binary forms, with or without
public interface IMessageRegionService * modification, are permitted provided that the following conditions are met:
{ * * Redistributions of source code must retain the above copyright
int ClearRegionCache(); * notice, this list of conditions and the following disclaimer.
RegionProfileData GetRegionInfo(ulong regionhandle); * * 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 OpenSimulator 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 OpenSim.Data;
namespace OpenSim.Grid.MessagingServer
{
public interface IMessageRegionService
{
int ClearRegionCache();
RegionProfileData GetRegionInfo(ulong regionhandle);
}
}

View File

@ -1,8 +1,35 @@
using System; /*
namespace OpenSim.Grid.MessagingServer * Copyright (c) Contributors, http://opensimulator.org/
{ * See CONTRIBUTORS.TXT for a full list of copyright holders.
public interface IMessageUserServerService *
{ * Redistribution and use in source and binary forms, with or without
bool SendToUserServer(System.Collections.Hashtable request, string method); * 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 OpenSimulator 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;
namespace OpenSim.Grid.MessagingServer
{
public interface IMessageUserServerService
{
bool SendToUserServer(System.Collections.Hashtable request, string method);
}
}

View File

@ -1,15 +1,42 @@
using System; /*
using System.Collections.Generic; * Copyright (c) Contributors, http://opensimulator.org/
using System.Text; * See CONTRIBUTORS.TXT for a full list of copyright holders.
using OpenSim.Framework.Servers; *
* Redistribution and use in source and binary forms, with or without
namespace OpenSim.Grid.MessagingServer * modification, are permitted provided that the following conditions are met:
{ * * Redistributions of source code must retain the above copyright
public interface IUGAIMCore * notice, this list of conditions and the following disclaimer.
{ * * Redistributions in binary form must reproduce the above copyright
T Get<T>(); * notice, this list of conditions and the following disclaimer in the
void RegisterInterface<T>(T iface); * documentation and/or other materials provided with the distribution.
bool TryGet<T>(out T iface); * * Neither the name of the OpenSimulator Project nor the
BaseHttpServer GetHttpServer(); * 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 OpenSim.Framework.Servers;
namespace OpenSim.Grid.MessagingServer
{
public interface IUGAIMCore
{
T Get<T>();
void RegisterInterface<T>(T iface);
bool TryGet<T>(out T iface);
BaseHttpServer GetHttpServer();
}
}

View File

@ -1,212 +1,212 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * 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 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using System.Timers; using System.Timers;
using log4net; using log4net;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Data; using OpenSim.Data;
using OpenSim.Framework; using OpenSim.Framework;
using Timer = System.Timers.Timer; using Timer = System.Timers.Timer;
namespace OpenSim.Grid.MessagingServer namespace OpenSim.Grid.MessagingServer
{ {
public class MessageRegionModule : IMessageRegionService public class MessageRegionModule : IMessageRegionService
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private MessageServerConfig m_cfg; private MessageServerConfig m_cfg;
private IMessageUserServerService m_userServerModule; private IMessageUserServerService m_userServerModule;
private IUGAIMCore m_messageCore; private IUGAIMCore m_messageCore;
// a dictionary of all current regions this server knows about // a dictionary of all current regions this server knows about
private Dictionary<ulong, RegionProfileData> m_regionInfoCache = new Dictionary<ulong, RegionProfileData>(); private Dictionary<ulong, RegionProfileData> m_regionInfoCache = new Dictionary<ulong, RegionProfileData>();
public MessageRegionModule(MessageServerConfig config, IUGAIMCore messageCore) public MessageRegionModule(MessageServerConfig config, IUGAIMCore messageCore)
{ {
m_cfg = config; m_cfg = config;
m_messageCore = messageCore; m_messageCore = messageCore;
} }
public void Initialise() public void Initialise()
{ {
m_messageCore.RegisterInterface<IMessageRegionService>(this); m_messageCore.RegisterInterface<IMessageRegionService>(this);
} }
public void PostInitialise() public void PostInitialise()
{ {
IMessageUserServerService messageUserServer; IMessageUserServerService messageUserServer;
if (m_messageCore.TryGet<IMessageUserServerService>(out messageUserServer)) if (m_messageCore.TryGet<IMessageUserServerService>(out messageUserServer))
{ {
m_userServerModule = messageUserServer; m_userServerModule = messageUserServer;
} }
} }
public void RegisterHandlers() public void RegisterHandlers()
{ {
//have these in separate method as some servers restart the http server and reregister all the handlers. //have these in separate method as some servers restart the http server and reregister all the handlers.
} }
/// <summary> /// <summary>
/// Gets and caches a RegionInfo object from the gridserver based on regionhandle /// Gets and caches a RegionInfo object from the gridserver based on regionhandle
/// if the regionhandle is already cached, use the cached values /// if the regionhandle is already cached, use the cached values
/// Gets called by lots of threads!!!!! /// Gets called by lots of threads!!!!!
/// </summary> /// </summary>
/// <param name="regionhandle">handle to the XY of the region we're looking for</param> /// <param name="regionhandle">handle to the XY of the region we're looking for</param>
/// <returns>A RegionInfo object to stick in the presence info</returns> /// <returns>A RegionInfo object to stick in the presence info</returns>
public RegionProfileData GetRegionInfo(ulong regionhandle) public RegionProfileData GetRegionInfo(ulong regionhandle)
{ {
RegionProfileData regionInfo = null; RegionProfileData regionInfo = null;
lock (m_regionInfoCache) lock (m_regionInfoCache)
{ {
m_regionInfoCache.TryGetValue(regionhandle, out regionInfo); m_regionInfoCache.TryGetValue(regionhandle, out regionInfo);
} }
if (regionInfo == null) // not found in cache if (regionInfo == null) // not found in cache
{ {
regionInfo = RequestRegionInfo(regionhandle); regionInfo = RequestRegionInfo(regionhandle);
if (regionInfo != null) // lookup was successful if (regionInfo != null) // lookup was successful
{ {
lock (m_regionInfoCache) lock (m_regionInfoCache)
{ {
m_regionInfoCache[regionhandle] = regionInfo; m_regionInfoCache[regionhandle] = regionInfo;
} }
} }
} }
return regionInfo; return regionInfo;
} }
public int ClearRegionCache() public int ClearRegionCache()
{ {
int cachecount = 0; int cachecount = 0;
lock (m_regionInfoCache) lock (m_regionInfoCache)
{ {
cachecount = m_regionInfoCache.Count; cachecount = m_regionInfoCache.Count;
m_regionInfoCache.Clear(); m_regionInfoCache.Clear();
} }
return cachecount; return cachecount;
} }
/// <summary> /// <summary>
/// Get RegionProfileData from the GridServer. /// Get RegionProfileData from the GridServer.
/// We'll cache this information in GetRegionInfo and use it for presence updates /// We'll cache this information in GetRegionInfo and use it for presence updates
/// </summary> /// </summary>
/// <param name="regionHandle"></param> /// <param name="regionHandle"></param>
/// <returns></returns> /// <returns></returns>
public RegionProfileData RequestRegionInfo(ulong regionHandle) public RegionProfileData RequestRegionInfo(ulong regionHandle)
{ {
RegionProfileData regionProfile = null; RegionProfileData regionProfile = null;
try try
{ {
Hashtable requestData = new Hashtable(); Hashtable requestData = new Hashtable();
requestData["region_handle"] = regionHandle.ToString(); requestData["region_handle"] = regionHandle.ToString();
requestData["authkey"] = m_cfg.GridSendKey; requestData["authkey"] = m_cfg.GridSendKey;
ArrayList SendParams = new ArrayList(); ArrayList SendParams = new ArrayList();
SendParams.Add(requestData); SendParams.Add(requestData);
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000); XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000);
Hashtable responseData = (Hashtable)GridResp.Value; Hashtable responseData = (Hashtable)GridResp.Value;
if (responseData.ContainsKey("error")) if (responseData.ContainsKey("error"))
{ {
m_log.Error("[GRID]: error received from grid server" + responseData["error"]); m_log.Error("[GRID]: error received from grid server" + responseData["error"]);
return null; return null;
} }
uint regX = Convert.ToUInt32((string)responseData["region_locx"]); uint regX = Convert.ToUInt32((string)responseData["region_locx"]);
uint regY = Convert.ToUInt32((string)responseData["region_locy"]); uint regY = Convert.ToUInt32((string)responseData["region_locy"]);
string internalIpStr = (string)responseData["sim_ip"]; string internalIpStr = (string)responseData["sim_ip"];
regionProfile = new RegionProfileData(); regionProfile = new RegionProfileData();
regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]); regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]);
regionProfile.httpServerURI = "http://" + internalIpStr + ":" + regionProfile.httpPort + "/"; regionProfile.httpServerURI = "http://" + internalIpStr + ":" + regionProfile.httpPort + "/";
regionProfile.regionHandle = Utils.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize)); regionProfile.regionHandle = Utils.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize));
regionProfile.regionLocX = regX; regionProfile.regionLocX = regX;
regionProfile.regionLocY = regY; regionProfile.regionLocY = regY;
regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
regionProfile.UUID = new UUID((string)responseData["region_UUID"]); regionProfile.UUID = new UUID((string)responseData["region_UUID"]);
regionProfile.regionName = (string)responseData["region_name"]; regionProfile.regionName = (string)responseData["region_name"];
} }
catch (WebException) catch (WebException)
{ {
m_log.Error("[GRID]: " + m_log.Error("[GRID]: " +
"Region lookup failed for: " + regionHandle.ToString() + "Region lookup failed for: " + regionHandle.ToString() +
" - Is the GridServer down?"); " - Is the GridServer down?");
} }
return regionProfile; return regionProfile;
} }
public XmlRpcResponse RegionStartup(XmlRpcRequest request) public XmlRpcResponse RegionStartup(XmlRpcRequest request)
{ {
Hashtable requestData = (Hashtable)request.Params[0]; Hashtable requestData = (Hashtable)request.Params[0];
Hashtable result = new Hashtable(); Hashtable result = new Hashtable();
result["success"] = "FALSE"; result["success"] = "FALSE";
if (m_userServerModule.SendToUserServer(requestData, "region_startup")) if (m_userServerModule.SendToUserServer(requestData, "region_startup"))
result["success"] = "TRUE"; result["success"] = "TRUE";
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
response.Value = result; response.Value = result;
return response; return response;
} }
public XmlRpcResponse RegionShutdown(XmlRpcRequest request) public XmlRpcResponse RegionShutdown(XmlRpcRequest request)
{ {
Hashtable requestData = (Hashtable)request.Params[0]; Hashtable requestData = (Hashtable)request.Params[0];
Hashtable result = new Hashtable(); Hashtable result = new Hashtable();
result["success"] = "FALSE"; result["success"] = "FALSE";
if (m_userServerModule.SendToUserServer(requestData, "region_shutdown")) if (m_userServerModule.SendToUserServer(requestData, "region_shutdown"))
result["success"] = "TRUE"; result["success"] = "TRUE";
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
response.Value = result; response.Value = result;
return response; return response;
} }
} }
} }

View File

@ -1,185 +1,185 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * 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 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using System.Timers; using System.Timers;
using log4net; using log4net;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Data; using OpenSim.Data;
using OpenSim.Framework; using OpenSim.Framework;
using Timer = System.Timers.Timer; using Timer = System.Timers.Timer;
namespace OpenSim.Grid.MessagingServer namespace OpenSim.Grid.MessagingServer
{ {
public class MessageUserServerModule : IMessageUserServerService public class MessageUserServerModule : IMessageUserServerService
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private MessageServerConfig m_cfg; private MessageServerConfig m_cfg;
private IUGAIMCore m_messageCore; private IUGAIMCore m_messageCore;
private Timer reconnectTimer = new Timer(300000); // 5 mins private Timer reconnectTimer = new Timer(300000); // 5 mins
public MessageUserServerModule(MessageServerConfig config, IUGAIMCore messageCore) public MessageUserServerModule(MessageServerConfig config, IUGAIMCore messageCore)
{ {
m_cfg = config; m_cfg = config;
m_messageCore = messageCore; m_messageCore = messageCore;
reconnectTimer.Elapsed += registerWithUserServer; reconnectTimer.Elapsed += registerWithUserServer;
reconnectTimer.Start(); reconnectTimer.Start();
} }
public void Initialise() public void Initialise()
{ {
m_messageCore.RegisterInterface<IMessageUserServerService>(this); m_messageCore.RegisterInterface<IMessageUserServerService>(this);
} }
public void PostInitialise() public void PostInitialise()
{ {
} }
public void RegisterHandlers() public void RegisterHandlers()
{ {
//have these in separate method as some servers restart the http server and reregister all the handlers. //have these in separate method as some servers restart the http server and reregister all the handlers.
} }
public void registerWithUserServer(object sender, ElapsedEventArgs e) public void registerWithUserServer(object sender, ElapsedEventArgs e)
{ {
registerWithUserServer(); registerWithUserServer();
} }
public bool registerWithUserServer() public bool registerWithUserServer()
{ {
Hashtable UserParams = new Hashtable(); Hashtable UserParams = new Hashtable();
// Login / Authentication // Login / Authentication
if (m_cfg.HttpSSL) if (m_cfg.HttpSSL)
{ {
UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
} }
else else
{ {
UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
} }
UserParams["recvkey"] = m_cfg.UserRecvKey; UserParams["recvkey"] = m_cfg.UserRecvKey;
UserParams["sendkey"] = m_cfg.UserRecvKey; UserParams["sendkey"] = m_cfg.UserRecvKey;
// Package into an XMLRPC Request // Package into an XMLRPC Request
ArrayList SendParams = new ArrayList(); ArrayList SendParams = new ArrayList();
SendParams.Add(UserParams); SendParams.Add(UserParams);
bool success = true; bool success = true;
string[] servers = m_cfg.UserServerURL.Split(' '); string[] servers = m_cfg.UserServerURL.Split(' ');
foreach (string srv in servers) foreach (string srv in servers)
{ {
// Send Request // Send Request
try try
{ {
XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams); XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams);
XmlRpcResponse UserResp = UserReq.Send(srv, 16000); XmlRpcResponse UserResp = UserReq.Send(srv, 16000);
// Process Response // Process Response
Hashtable GridRespData = (Hashtable)UserResp.Value; Hashtable GridRespData = (Hashtable)UserResp.Value;
// if we got a response, we were successful // if we got a response, we were successful
if (!GridRespData.ContainsKey("responsestring")) if (!GridRespData.ContainsKey("responsestring"))
success = false; success = false;
else else
m_log.InfoFormat("[SERVER] Registered with {0}", srv); m_log.InfoFormat("[SERVER] Registered with {0}", srv);
} }
catch catch
{ {
m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv); m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
success = false; success = false;
} }
} }
return success; return success;
} }
public bool deregisterWithUserServer() public bool deregisterWithUserServer()
{ {
Hashtable request = new Hashtable(); Hashtable request = new Hashtable();
return SendToUserServer(request, "deregister_messageserver"); return SendToUserServer(request, "deregister_messageserver");
} }
public bool SendToUserServer(Hashtable request, string method) public bool SendToUserServer(Hashtable request, string method)
{ {
// Login / Authentication // Login / Authentication
if (m_cfg.HttpSSL) if (m_cfg.HttpSSL)
{ {
request["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; request["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
} }
else else
{ {
request["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; request["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
} }
request["recvkey"] = m_cfg.UserRecvKey; request["recvkey"] = m_cfg.UserRecvKey;
request["sendkey"] = m_cfg.UserRecvKey; request["sendkey"] = m_cfg.UserRecvKey;
// Package into an XMLRPC Request // Package into an XMLRPC Request
ArrayList SendParams = new ArrayList(); ArrayList SendParams = new ArrayList();
SendParams.Add(request); SendParams.Add(request);
bool success = true; bool success = true;
string[] servers = m_cfg.UserServerURL.Split(' '); string[] servers = m_cfg.UserServerURL.Split(' ');
// Send Request // Send Request
foreach (string srv in servers) foreach (string srv in servers)
{ {
try try
{ {
XmlRpcRequest UserReq = new XmlRpcRequest(method, SendParams); XmlRpcRequest UserReq = new XmlRpcRequest(method, SendParams);
XmlRpcResponse UserResp = UserReq.Send(m_cfg.UserServerURL, 16000); XmlRpcResponse UserResp = UserReq.Send(m_cfg.UserServerURL, 16000);
// Process Response // Process Response
Hashtable UserRespData = (Hashtable)UserResp.Value; Hashtable UserRespData = (Hashtable)UserResp.Value;
// if we got a response, we were successful // if we got a response, we were successful
if (!UserRespData.ContainsKey("responsestring")) if (!UserRespData.ContainsKey("responsestring"))
success = false; success = false;
} }
catch catch
{ {
m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv); m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
success = false; success = false;
} }
} }
return success; return success;
} }
} }
} }

View File

@ -1,75 +1,75 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * 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 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
namespace OpenSim.Grid.MessagingServer namespace OpenSim.Grid.MessagingServer
{ {
public class UserDataBaseService : UserManagerBase public class UserDataBaseService : UserManagerBase
{ {
/// <summary> /// <summary>
/// Constructor. /// Constructor.
/// </summary> /// </summary>
/// Passing null to parent because we never use any function that requires an interservice inventory call. /// Passing null to parent because we never use any function that requires an interservice inventory call.
public UserDataBaseService() public UserDataBaseService()
: base(null) : base(null)
{ {
} }
public UserAgentData GetUserAgentData(UUID AgentID) public UserAgentData GetUserAgentData(UUID AgentID)
{ {
UserProfileData userProfile = GetUserProfile(AgentID); UserProfileData userProfile = GetUserProfile(AgentID);
if (userProfile != null) if (userProfile != null)
{ {
return userProfile.CurrentAgent; return userProfile.CurrentAgent;
} }
return null; return null;
} }
public override UserProfileData SetupMasterUser(string firstName, string lastName) public override UserProfileData SetupMasterUser(string firstName, string lastName)
{ {
//throw new Exception("The method or operation is not implemented."); //throw new Exception("The method or operation is not implemented.");
return null; return null;
} }
public override UserProfileData SetupMasterUser(string firstName, string lastName, string password) public override UserProfileData SetupMasterUser(string firstName, string lastName, string password)
{ {
//throw new Exception("The method or operation is not implemented."); //throw new Exception("The method or operation is not implemented.");
return null; return null;
} }
public override UserProfileData SetupMasterUser(UUID uuid) public override UserProfileData SetupMasterUser(UUID uuid)
{ {
//throw new Exception("The method or operation is not implemented."); //throw new Exception("The method or operation is not implemented.");
return null; return null;
} }
} }
} }

View File

@ -1,68 +1,68 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * 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 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using log4net; using log4net;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
namespace OpenSim.Grid.UserServer namespace OpenSim.Grid.UserServer
{ {
public class UserDataBaseService : UserManagerBase public class UserDataBaseService : UserManagerBase
{ {
public UserDataBaseService() public UserDataBaseService()
: base(null) : base(null)
{ {
} }
public UserDataBaseService(IInterServiceInventoryServices interServiceInventoryService) public UserDataBaseService(IInterServiceInventoryServices interServiceInventoryService)
: base(interServiceInventoryService) : base(interServiceInventoryService)
{ {
} }
public override UserProfileData SetupMasterUser(string firstName, string lastName) public override UserProfileData SetupMasterUser(string firstName, string lastName)
{ {
throw new Exception("The method or operation is not implemented."); throw new Exception("The method or operation is not implemented.");
} }
public override UserProfileData SetupMasterUser(string firstName, string lastName, string password) public override UserProfileData SetupMasterUser(string firstName, string lastName, string password)
{ {
throw new Exception("The method or operation is not implemented."); throw new Exception("The method or operation is not implemented.");
} }
public override UserProfileData SetupMasterUser(UUID uuid) public override UserProfileData SetupMasterUser(UUID uuid)
{ {
throw new Exception("The method or operation is not implemented."); throw new Exception("The method or operation is not implemented.");
} }
} }
} }

View File

@ -863,7 +863,7 @@ namespace OpenSim.Region.Framework.Scenes
ThreadTracker.Add(m_updateEntitiesThread); ThreadTracker.Add(m_updateEntitiesThread);
} }
if(m_updateEntitiesThread.ThreadState == ThreadState.Stopped) if (m_updateEntitiesThread.ThreadState == ThreadState.Stopped)
m_updateEntitiesThread.Start(); m_updateEntitiesThread.Start();
*/ */
m_sceneGraph.UpdateEntities(); m_sceneGraph.UpdateEntities();
@ -2131,7 +2131,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
if(aCircuit == null) if (aCircuit == null)
{ {
m_log.DebugFormat("[APPEARANCE] Client did not supply a circuit. Non-Linden? Creating default appearance."); m_log.DebugFormat("[APPEARANCE] Client did not supply a circuit. Non-Linden? Creating default appearance.");
appearance = new AvatarAppearance(client.AgentId); appearance = new AvatarAppearance(client.AgentId);

View File

@ -339,7 +339,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
compileScript = LSL_Converter.Convert(Script); compileScript = LSL_Converter.Convert(Script);
// copy converter warnings into our warnings. // copy converter warnings into our warnings.
foreach(string warning in LSL_Converter.GetWarnings()) foreach (string warning in LSL_Converter.GetWarnings())
{ {
AddWarning(warning); AddWarning(warning);
} }