Merge of ubitworkvarnew with opensim/master as of 20150905.
This integrates the OpenSim refactoring to make physics, etc into modules. AVN physics hasn't been moved to new location. Does not compile yet. Merge branch 'osmaster' into mbworknew1avinationmerge
commit
e5367d822b
|
@ -4,8 +4,7 @@ The following people have contributed to OpenSim (Thank you for your effort!)
|
||||||
These folks represent the current core team for OpenSim, and are the
|
These folks represent the current core team for OpenSim, and are the
|
||||||
people that make the day to day of OpenSim happen.
|
people that make the day to day of OpenSim happen.
|
||||||
|
|
||||||
* justincc (OSVW Consulting, justincc.org)
|
* justincc (OSVW Consulting, justincc.org)
|
||||||
* dahlia
|
|
||||||
* Melanie Thielker
|
* Melanie Thielker
|
||||||
* Diva (Crista Lopes, University of California, Irvine)
|
* Diva (Crista Lopes, University of California, Irvine)
|
||||||
* BlueWall (James Hughes)
|
* BlueWall (James Hughes)
|
||||||
|
@ -56,6 +55,7 @@ where we are today.
|
||||||
* nlin (3Di)
|
* nlin (3Di)
|
||||||
* John Hurliman
|
* John Hurliman
|
||||||
* chi11ken (Genkii)
|
* chi11ken (Genkii)
|
||||||
|
* dahlia
|
||||||
|
|
||||||
|
|
||||||
= Additional OpenSim Contributors =
|
= Additional OpenSim Contributors =
|
||||||
|
|
|
@ -26,8 +26,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
{
|
{
|
||||||
public interface IRegionLoader
|
public interface IRegionLoader
|
||||||
{
|
{
|
|
@ -32,8 +32,6 @@ using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.RegionLoader.Filesystem;
|
|
||||||
using OpenSim.Framework.RegionLoader.Web;
|
|
||||||
using OpenSim.Region.CoreModules.Agent.AssetTransaction;
|
using OpenSim.Region.CoreModules.Agent.AssetTransaction;
|
||||||
using OpenSim.Region.CoreModules.Avatar.InstantMessage;
|
using OpenSim.Region.CoreModules.Avatar.InstantMessage;
|
||||||
using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
|
using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
|
||||||
|
|
|
@ -31,8 +31,9 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Framework.RegionLoader.Filesystem
|
namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
{
|
{
|
||||||
public class RegionLoaderFileSystem : IRegionLoader
|
public class RegionLoaderFileSystem : IRegionLoader
|
||||||
{
|
{
|
|
@ -32,8 +32,9 @@ using System.Reflection;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Framework.RegionLoader.Web
|
namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
{
|
{
|
||||||
public class RegionLoaderWebServer : IRegionLoader
|
public class RegionLoaderWebServer : IRegionLoader
|
||||||
{
|
{
|
|
@ -42,7 +42,6 @@ using OpenMetaverse;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using OpenSim;
|
using OpenSim;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
|
|
|
@ -1,185 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Threading;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications
|
|
||||||
{
|
|
||||||
internal class SimpleAsyncResult : IAsyncResult
|
|
||||||
{
|
|
||||||
private readonly AsyncCallback m_callback;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Is process completed?
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Should really be boolean, but VolatileRead has no boolean method</remarks>
|
|
||||||
private byte m_completed;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Did process complete synchronously?
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>I have a hard time imagining a scenario where this is the case, again, same issue about
|
|
||||||
/// booleans and VolatileRead as m_completed
|
|
||||||
/// </remarks>
|
|
||||||
private byte m_completedSynchronously;
|
|
||||||
|
|
||||||
private readonly object m_asyncState;
|
|
||||||
private ManualResetEvent m_waitHandle;
|
|
||||||
private Exception m_exception;
|
|
||||||
|
|
||||||
internal SimpleAsyncResult(AsyncCallback cb, object state)
|
|
||||||
{
|
|
||||||
m_callback = cb;
|
|
||||||
m_asyncState = state;
|
|
||||||
m_completed = 0;
|
|
||||||
m_completedSynchronously = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region IAsyncResult Members
|
|
||||||
|
|
||||||
public object AsyncState
|
|
||||||
{
|
|
||||||
get { return m_asyncState; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public WaitHandle AsyncWaitHandle
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (m_waitHandle == null)
|
|
||||||
{
|
|
||||||
bool done = IsCompleted;
|
|
||||||
ManualResetEvent mre = new ManualResetEvent(done);
|
|
||||||
if (Interlocked.CompareExchange(ref m_waitHandle, mre, null) != null)
|
|
||||||
{
|
|
||||||
mre.Close();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!done && IsCompleted)
|
|
||||||
{
|
|
||||||
m_waitHandle.Set();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_waitHandle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public bool CompletedSynchronously
|
|
||||||
{
|
|
||||||
get { return Thread.VolatileRead(ref m_completedSynchronously) == 1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public bool IsCompleted
|
|
||||||
{
|
|
||||||
get { return Thread.VolatileRead(ref m_completed) == 1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region class Methods
|
|
||||||
|
|
||||||
internal void SetAsCompleted(bool completedSynchronously)
|
|
||||||
{
|
|
||||||
m_completed = 1;
|
|
||||||
if (completedSynchronously)
|
|
||||||
m_completedSynchronously = 1;
|
|
||||||
else
|
|
||||||
m_completedSynchronously = 0;
|
|
||||||
|
|
||||||
SignalCompletion();
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void HandleException(Exception e, bool completedSynchronously)
|
|
||||||
{
|
|
||||||
m_completed = 1;
|
|
||||||
if (completedSynchronously)
|
|
||||||
m_completedSynchronously = 1;
|
|
||||||
else
|
|
||||||
m_completedSynchronously = 0;
|
|
||||||
m_exception = e;
|
|
||||||
|
|
||||||
SignalCompletion();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SignalCompletion()
|
|
||||||
{
|
|
||||||
if (m_waitHandle != null) m_waitHandle.Set();
|
|
||||||
|
|
||||||
if (m_callback != null) m_callback(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EndInvoke()
|
|
||||||
{
|
|
||||||
// This method assumes that only 1 thread calls EndInvoke
|
|
||||||
if (!IsCompleted)
|
|
||||||
{
|
|
||||||
// If the operation isn't done, wait for it
|
|
||||||
AsyncWaitHandle.WaitOne();
|
|
||||||
AsyncWaitHandle.Close();
|
|
||||||
m_waitHandle.Close();
|
|
||||||
m_waitHandle = null; // Allow early GC
|
|
||||||
}
|
|
||||||
|
|
||||||
// Operation is done: if an exception occured, throw it
|
|
||||||
if (m_exception != null) throw m_exception;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
internal class AsyncResult<T> : SimpleAsyncResult
|
|
||||||
{
|
|
||||||
private T m_result = default(T);
|
|
||||||
|
|
||||||
public AsyncResult(AsyncCallback asyncCallback, Object state) :
|
|
||||||
base(asyncCallback, state)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetAsCompleted(T result, bool completedSynchronously)
|
|
||||||
{
|
|
||||||
// Save the asynchronous operation's result
|
|
||||||
m_result = result;
|
|
||||||
|
|
||||||
// Tell the base class that the operation completed
|
|
||||||
// sucessfully (no exception)
|
|
||||||
base.SetAsCompleted(completedSynchronously);
|
|
||||||
}
|
|
||||||
|
|
||||||
public new T EndInvoke()
|
|
||||||
{
|
|
||||||
base.EndInvoke();
|
|
||||||
return m_result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,157 +0,0 @@
|
||||||
/*
|
|
||||||
* 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 OpenMetaverse;
|
|
||||||
using OpenSim.Services.Interfaces;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications
|
|
||||||
{
|
|
||||||
public interface IUserService
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Add a temporary user profile.
|
|
||||||
/// </summary>
|
|
||||||
/// A temporary user profile is one that should exist only for the lifetime of the process.
|
|
||||||
/// <param name="userProfile"></param>
|
|
||||||
void AddTemporaryUserProfile(UserProfileData userProfile);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Loads a user profile by name
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="firstName">First name</param>
|
|
||||||
/// <param name="lastName">Last name</param>
|
|
||||||
/// <returns>A user profile. Returns null if no profile is found</returns>
|
|
||||||
UserProfileData GetUserProfile(string firstName, string lastName);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Loads a user profile from a database by UUID
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userId">The target UUID</param>
|
|
||||||
/// <returns>A user profile. Returns null if no user profile is found.</returns>
|
|
||||||
UserProfileData GetUserProfile(UUID userId);
|
|
||||||
|
|
||||||
UserProfileData GetUserProfile(Uri uri);
|
|
||||||
|
|
||||||
Uri GetUserUri(UserProfileData userProfile);
|
|
||||||
|
|
||||||
UserAgentData GetAgentByUUID(UUID userId);
|
|
||||||
|
|
||||||
void ClearUserAgent(UUID avatarID);
|
|
||||||
List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID QueryID, string Query);
|
|
||||||
|
|
||||||
UserProfileData SetupMasterUser(string firstName, string lastName);
|
|
||||||
UserProfileData SetupMasterUser(string firstName, string lastName, string password);
|
|
||||||
UserProfileData SetupMasterUser(UUID userId);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update the user's profile.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="data">UserProfileData object with updated data. Should be obtained
|
|
||||||
/// via a call to GetUserProfile().</param>
|
|
||||||
/// <returns>true if the update could be applied, false if it could not be applied.</returns>
|
|
||||||
bool UpdateUserProfile(UserProfileData data);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Adds a new friend to the database for XUser
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="friendlistowner">The agent that who's friends list is being added to</param>
|
|
||||||
/// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
|
|
||||||
/// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
|
|
||||||
void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Delete friend on friendlistowner's friendlist.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="friendlistowner">The agent that who's friends list is being updated</param>
|
|
||||||
/// <param name="friend">The Ex-friend agent</param>
|
|
||||||
void RemoveUserFriend(UUID friendlistowner, UUID friend);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update permissions for friend on friendlistowner's friendlist.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="friendlistowner">The agent that who's friends list is being updated</param>
|
|
||||||
/// <param name="friend">The agent that is getting or loosing permissions</param>
|
|
||||||
/// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
|
|
||||||
void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Logs off a user on the user server
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userid">UUID of the user</param>
|
|
||||||
/// <param name="regionid">UUID of the Region</param>
|
|
||||||
/// <param name="regionhandle">regionhandle</param>
|
|
||||||
/// <param name="position">final position</param>
|
|
||||||
/// <param name="lookat">final lookat</param>
|
|
||||||
void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Logs off a user on the user server (deprecated as of 2008-08-27)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userid">UUID of the user</param>
|
|
||||||
/// <param name="regionid">UUID of the Region</param>
|
|
||||||
/// <param name="regionhandle">regionhandle</param>
|
|
||||||
/// <param name="posx">final position x</param>
|
|
||||||
/// <param name="posy">final position y</param>
|
|
||||||
/// <param name="posz">final position z</param>
|
|
||||||
void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship
|
|
||||||
/// for UUID friendslistowner
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <param name="friendlistowner">The agent for whom we're retreiving the friends Data.</param>
|
|
||||||
/// <returns>
|
|
||||||
/// A List of FriendListItems that contains info about the user's friends.
|
|
||||||
/// Always returns a list even if the user has no friends
|
|
||||||
/// </returns>
|
|
||||||
List<FriendListItem> GetUserFriendList(UUID friendlistowner);
|
|
||||||
|
|
||||||
// This probably shouldn't be here, it belongs to IAuthentication
|
|
||||||
// But since Scenes only have IUserService references, I'm placing it here for now.
|
|
||||||
bool VerifySession(UUID userID, UUID sessionID);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Authenticate a user by their password.
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// This is used by callers outside the login process that want to
|
|
||||||
/// verify a user who has given their password.
|
|
||||||
///
|
|
||||||
/// This should probably also be in IAuthentication but is here for the same reasons as VerifySession() is
|
|
||||||
///
|
|
||||||
/// <param name="userID"></param>
|
|
||||||
/// <param name="password"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool AuthenticateUserByPassword(UUID userID, string password);
|
|
||||||
|
|
||||||
// Temporary Hack until we move everything to the new service model
|
|
||||||
void SetInventoryService(IInventoryService invService);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Limit
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for strategies that can limit requests from the client. Currently only used in the
|
|
||||||
/// texture modules to deal with repeated requests for certain textures. However, limiting strategies
|
|
||||||
/// could be used with other requests.
|
|
||||||
/// </summary>
|
|
||||||
public interface IRequestLimitStrategy<TId>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Should the request be allowed? If the id is not monitored, then the request is always allowed.
|
|
||||||
/// Otherwise, the strategy criteria will be applied.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool AllowRequest(TId id);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Has the request been refused just once?
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>False if the request has not yet been refused, or if the request has been refused more
|
|
||||||
/// than once.</returns>
|
|
||||||
bool IsFirstRefusal(TId id);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Start monitoring for future AllowRequest calls. If the id is already monitored, then monitoring
|
|
||||||
/// continues.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
void MonitorRequests(TId id);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Is the id being monitored?
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uuid"> </param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool IsMonitoringRequests(TId id);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Limit
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Strategy which polices no limits
|
|
||||||
/// </summary>
|
|
||||||
public class NullLimitStrategy<TId> : IRequestLimitStrategy<TId>
|
|
||||||
{
|
|
||||||
public bool AllowRequest(TId id) { return true; }
|
|
||||||
public bool IsFirstRefusal(TId id) { return false; }
|
|
||||||
public void MonitorRequests(TId id) { /* intentionally blank */ }
|
|
||||||
public bool IsMonitoringRequests(TId id) { return false; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,109 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Collections.Generic;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Limit
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Limit requests by discarding them after they've been repeated a certain number of times.
|
|
||||||
/// </summary>
|
|
||||||
public class RepeatLimitStrategy<TId> : IRequestLimitStrategy<TId>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Record each asset request that we're notified about.
|
|
||||||
/// </summary>
|
|
||||||
private readonly Dictionary<TId, int> requestCounts = new Dictionary<TId, int>();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The maximum number of requests that can be made before we drop subsequent requests.
|
|
||||||
/// </summary>
|
|
||||||
private readonly int m_maxRequests;
|
|
||||||
public int MaxRequests
|
|
||||||
{
|
|
||||||
get { return m_maxRequests; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary></summary>
|
|
||||||
/// <param name="maxRequests">The maximum number of requests that may be served before all further
|
|
||||||
/// requests are dropped.</param>
|
|
||||||
public RepeatLimitStrategy(int maxRequests)
|
|
||||||
{
|
|
||||||
m_maxRequests = maxRequests;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <see cref="IRequestLimitStrategy"/>
|
|
||||||
/// </summary>
|
|
||||||
public bool AllowRequest(TId id)
|
|
||||||
{
|
|
||||||
if (requestCounts.ContainsKey(id))
|
|
||||||
{
|
|
||||||
requestCounts[id] += 1;
|
|
||||||
|
|
||||||
if (requestCounts[id] > m_maxRequests)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <see cref="IRequestLimitStrategy"/>
|
|
||||||
/// </summary>
|
|
||||||
public bool IsFirstRefusal(TId id)
|
|
||||||
{
|
|
||||||
if (requestCounts.ContainsKey(id) && m_maxRequests + 1 == requestCounts[id])
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <see cref="IRequestLimitStrategy"/>
|
|
||||||
/// </summary>
|
|
||||||
public void MonitorRequests(TId id)
|
|
||||||
{
|
|
||||||
if (!IsMonitoringRequests(id))
|
|
||||||
{
|
|
||||||
requestCounts.Add(id, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <see cref="IRequestLimitStrategy"/>
|
|
||||||
/// </summary>
|
|
||||||
public bool IsMonitoringRequests(TId id)
|
|
||||||
{
|
|
||||||
return requestCounts.ContainsKey(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,140 +0,0 @@
|
||||||
/*
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Limit
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Limit requests by discarding repeat attempts that occur within a given time period
|
|
||||||
///
|
|
||||||
/// XXX Don't use this for limiting texture downloading, at least not until we better handle multiple requests
|
|
||||||
/// for the same texture at different resolutions.
|
|
||||||
/// </summary>
|
|
||||||
public class TimeLimitStrategy<TId> : IRequestLimitStrategy<TId>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Record the time at which an asset request occurs.
|
|
||||||
/// </summary>
|
|
||||||
private readonly Dictionary<TId, Request> requests = new Dictionary<TId, Request>();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The minimum time period between which requests for the same data will be serviced.
|
|
||||||
/// </summary>
|
|
||||||
private readonly TimeSpan m_repeatPeriod;
|
|
||||||
public TimeSpan RepeatPeriod
|
|
||||||
{
|
|
||||||
get { return m_repeatPeriod; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary></summary>
|
|
||||||
/// <param name="repeatPeriod"></param>
|
|
||||||
public TimeLimitStrategy(TimeSpan repeatPeriod)
|
|
||||||
{
|
|
||||||
m_repeatPeriod = repeatPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <see cref="IRequestLimitStrategy"/>
|
|
||||||
/// </summary>
|
|
||||||
public bool AllowRequest(TId id)
|
|
||||||
{
|
|
||||||
if (IsMonitoringRequests(id))
|
|
||||||
{
|
|
||||||
DateTime now = DateTime.Now;
|
|
||||||
TimeSpan elapsed = now - requests[id].Time;
|
|
||||||
|
|
||||||
if (elapsed < RepeatPeriod)
|
|
||||||
{
|
|
||||||
requests[id].Refusals += 1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
requests[id].Time = now;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <see cref="IRequestLimitStrategy"/>
|
|
||||||
/// </summary>
|
|
||||||
public bool IsFirstRefusal(TId id)
|
|
||||||
{
|
|
||||||
if (IsMonitoringRequests(id))
|
|
||||||
{
|
|
||||||
if (1 == requests[id].Refusals)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <see cref="IRequestLimitStrategy"/>
|
|
||||||
/// </summary>
|
|
||||||
public void MonitorRequests(TId id)
|
|
||||||
{
|
|
||||||
if (!IsMonitoringRequests(id))
|
|
||||||
{
|
|
||||||
requests.Add(id, new Request(DateTime.Now));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <see cref="IRequestLimitStrategy"/>
|
|
||||||
/// </summary>
|
|
||||||
public bool IsMonitoringRequests(TId id)
|
|
||||||
{
|
|
||||||
return requests.ContainsKey(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Private request details.
|
|
||||||
/// </summary>
|
|
||||||
class Request
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Time of last request
|
|
||||||
/// </summary>
|
|
||||||
public DateTime Time;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Number of refusals associated with this request
|
|
||||||
/// </summary>
|
|
||||||
public int Refusals;
|
|
||||||
|
|
||||||
public Request(DateTime time)
|
|
||||||
{
|
|
||||||
Time = time;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Reflection;
|
|
||||||
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("OpenSim.Framework.Communications")]
|
|
||||||
[assembly : AssemblyDescription("")]
|
|
||||||
[assembly : AssemblyConfiguration("")]
|
|
||||||
[assembly : AssemblyCompany("http://opensimulator.org")]
|
|
||||||
[assembly : AssemblyProduct("OpenSim")]
|
|
||||||
[assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers")]
|
|
||||||
[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("13e7c396-78a9-4a5c-baf2-6f980ea75d95")]
|
|
||||||
|
|
||||||
// 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("0.8.2.*")]
|
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Xml.Serialization;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.XMPP
|
|
||||||
{
|
|
||||||
[XmlRoot("error")]
|
|
||||||
public class XmppErrorStanza
|
|
||||||
{
|
|
||||||
public XmppErrorStanza()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Xml.Serialization;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.XMPP
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// An IQ needs to have one of the follow types set.
|
|
||||||
/// </summary>
|
|
||||||
public enum XmppIqType
|
|
||||||
{
|
|
||||||
[XmlEnum("set")] set,
|
|
||||||
[XmlEnum("get")] get,
|
|
||||||
[XmlEnum("result")] result,
|
|
||||||
[XmlEnum("error")] error,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// XmppIqStanza needs to be subclassed as the query content is
|
|
||||||
/// specific to the query type.
|
|
||||||
/// </summary>
|
|
||||||
[XmlRoot("iq")]
|
|
||||||
public abstract class XmppIqStanza: XmppStanza
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// IQ type: one of set, get, result, error
|
|
||||||
/// </summary>
|
|
||||||
[XmlAttribute("type")]
|
|
||||||
public XmppIqType Type;
|
|
||||||
|
|
||||||
public XmppIqStanza(): base()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,93 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Xml.Serialization;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.XMPP
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Message types.
|
|
||||||
/// </summary>
|
|
||||||
public enum XmppMessageType
|
|
||||||
{
|
|
||||||
[XmlEnum("chat")] chat,
|
|
||||||
[XmlEnum("error")] error,
|
|
||||||
[XmlEnum("groupchat")] groupchat,
|
|
||||||
[XmlEnum("headline")] headline,
|
|
||||||
[XmlEnum("normal")] normal,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Message body.
|
|
||||||
/// </summary>
|
|
||||||
public class XmppMessageBody
|
|
||||||
{
|
|
||||||
[XmlText]
|
|
||||||
public string Text;
|
|
||||||
|
|
||||||
public XmppMessageBody()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public XmppMessageBody(string message)
|
|
||||||
{
|
|
||||||
Text = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
new public string ToString()
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[XmlRoot("message")]
|
|
||||||
public class XmppMessageStanza: XmppStanza
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// IQ type: one of set, get, result, error
|
|
||||||
/// </summary>
|
|
||||||
[XmlAttribute("type")]
|
|
||||||
public XmppMessageType MessageType;
|
|
||||||
|
|
||||||
// [XmlAttribute("error")]
|
|
||||||
// public XmppError Error;
|
|
||||||
|
|
||||||
[XmlElement("body")]
|
|
||||||
public XmppMessageBody Body;
|
|
||||||
|
|
||||||
public XmppMessageStanza() : base()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public XmppMessageStanza(string fromJid, string toJid, XmppMessageType mType, string message) :
|
|
||||||
base(fromJid, toJid)
|
|
||||||
{
|
|
||||||
MessageType = mType;
|
|
||||||
Body = new XmppMessageBody(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Xml.Serialization;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.XMPP
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Message types.
|
|
||||||
/// </summary>
|
|
||||||
public enum XmppPresenceType
|
|
||||||
{
|
|
||||||
[XmlEnum("unavailable")] unavailable,
|
|
||||||
[XmlEnum("subscribe")] subscribe,
|
|
||||||
[XmlEnum("subscribed")] subscribed,
|
|
||||||
[XmlEnum("unsubscribe")] unsubscribe,
|
|
||||||
[XmlEnum("unsubscribed")] unsubscribed,
|
|
||||||
[XmlEnum("probe")] probe,
|
|
||||||
[XmlEnum("error")] error,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[XmlRoot("message")]
|
|
||||||
public class XmppPresenceStanza: XmppStanza
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// IQ type: one of set, get, result, error
|
|
||||||
/// </summary>
|
|
||||||
[XmlAttribute("type")]
|
|
||||||
public XmppPresenceType PresenceType;
|
|
||||||
|
|
||||||
// [XmlAttribute("error")]
|
|
||||||
// public XmppError Error;
|
|
||||||
|
|
||||||
public XmppPresenceStanza() : base()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public XmppPresenceStanza(string fromJid, string toJid, XmppPresenceType pType) :
|
|
||||||
base(fromJid, toJid)
|
|
||||||
{
|
|
||||||
PresenceType = pType;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Xml;
|
|
||||||
using System.Xml.Serialization;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.XMPP
|
|
||||||
{
|
|
||||||
public class XmppSerializer
|
|
||||||
{
|
|
||||||
// private static readonly ILog _log =
|
|
||||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
// need to do it this way, as XmlSerializer(type, extratypes)
|
|
||||||
// does not work on mono (at least).
|
|
||||||
private Dictionary<Type, XmlSerializer> _serializerForType = new Dictionary<Type, XmlSerializer>();
|
|
||||||
private Dictionary<string, XmlSerializer> _serializerForName = new Dictionary<string, XmlSerializer>();
|
|
||||||
private XmlSerializerNamespaces _xmlNs;
|
|
||||||
private string _defaultNS;
|
|
||||||
|
|
||||||
public XmppSerializer(bool server)
|
|
||||||
{
|
|
||||||
_xmlNs = new XmlSerializerNamespaces();
|
|
||||||
_xmlNs.Add(String.Empty, String.Empty);
|
|
||||||
if (server)
|
|
||||||
_defaultNS = "jabber:server";
|
|
||||||
else
|
|
||||||
_defaultNS = "jabber:client";
|
|
||||||
|
|
||||||
// TODO: do this via reflection
|
|
||||||
_serializerForType[typeof(XmppMessageStanza)] = _serializerForName["message"] =
|
|
||||||
new XmlSerializer(typeof(XmppMessageStanza), _defaultNS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Serialize(XmlWriter xw, object o)
|
|
||||||
{
|
|
||||||
if (!_serializerForType.ContainsKey(o.GetType()))
|
|
||||||
throw new ArgumentException(String.Format("no serializer available for type {0}", o.GetType()));
|
|
||||||
|
|
||||||
_serializerForType[o.GetType()].Serialize(xw, o, _xmlNs);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Deserialize(XmlReader xr)
|
|
||||||
{
|
|
||||||
// position on next element
|
|
||||||
xr.Read();
|
|
||||||
if (!_serializerForName.ContainsKey(xr.LocalName))
|
|
||||||
throw new ArgumentException(String.Format("no serializer available for name {0}", xr.LocalName));
|
|
||||||
|
|
||||||
return _serializerForName[xr.LocalName].Deserialize(xr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,70 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Xml.Serialization;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.XMPP
|
|
||||||
{
|
|
||||||
public abstract class XmppStanza
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// counter used for generating ID
|
|
||||||
/// </summary>
|
|
||||||
[XmlIgnore]
|
|
||||||
private static ulong _ctr = 0;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// recipient JID
|
|
||||||
/// </summary>
|
|
||||||
[XmlAttribute("to")]
|
|
||||||
public string ToJid;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// sender JID
|
|
||||||
/// </summary>
|
|
||||||
[XmlAttribute("from")]
|
|
||||||
public string FromJid;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// unique ID.
|
|
||||||
/// </summary>
|
|
||||||
[XmlAttribute("id")]
|
|
||||||
public string MessageId;
|
|
||||||
|
|
||||||
public XmppStanza()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public XmppStanza(string fromJid, string toJid)
|
|
||||||
{
|
|
||||||
ToJid = toJid;
|
|
||||||
FromJid = fromJid;
|
|
||||||
MessageId = String.Format("OpenSim_{0}{1}", DateTime.UtcNow.Ticks, _ctr++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.IO;
|
|
||||||
using System.Text;
|
|
||||||
using System.Xml;
|
|
||||||
using IOStream = System.IO.Stream;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.XMPP
|
|
||||||
{
|
|
||||||
public class XMPPWriter: XmlTextWriter
|
|
||||||
{
|
|
||||||
public XMPPWriter(TextWriter textWriter) : base(textWriter)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public XMPPWriter(IOStream stream) : this(stream, Util.UTF8)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public XMPPWriter(IOStream stream, Encoding enc) : base(stream, enc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void WriteStartDocument()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void WriteStartDocument(bool standalone)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
/*
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
|
||||||
{
|
|
||||||
public class ForeignUserProfileData : UserProfileData
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The address of the users home sim, used for foreigners.
|
|
||||||
/// </summary>
|
|
||||||
private string _userUserServerURI = String.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The address of the users home sim, used for foreigners.
|
|
||||||
/// </summary>
|
|
||||||
private string _userHomeAddress = String.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The port of the users home sim, used for foreigners.
|
|
||||||
/// </summary>
|
|
||||||
private string _userHomePort = String.Empty;
|
|
||||||
/// <summary>
|
|
||||||
/// The remoting port of the users home sim, used for foreigners.
|
|
||||||
/// </summary>
|
|
||||||
private string _userHomeRemotingPort = String.Empty;
|
|
||||||
|
|
||||||
public string UserServerURI
|
|
||||||
{
|
|
||||||
get { return _userUserServerURI; }
|
|
||||||
set { _userUserServerURI = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string UserHomeAddress
|
|
||||||
{
|
|
||||||
get { return _userHomeAddress; }
|
|
||||||
set { _userHomeAddress = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string UserHomePort
|
|
||||||
{
|
|
||||||
get { return _userHomePort; }
|
|
||||||
set { _userHomePort = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string UserHomeRemotingPort
|
|
||||||
{
|
|
||||||
get { return _userHomeRemotingPort; }
|
|
||||||
set { _userHomeRemotingPort = value; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -30,7 +30,7 @@ using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class for writing a high performance, high volume log file.
|
/// Class for writing a high performance, high volume log file.
|
|
@ -34,7 +34,7 @@ using log4net;
|
||||||
using LukeSkywalker.IPNetwork;
|
using LukeSkywalker.IPNetwork;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public class OutboundUrlFilter
|
public class OutboundUrlFilter
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="OpenSim.Framework.Communications.OutboundUrlFilter"/> class.
|
/// Initializes a new instance of the <see cref="OpenSim.Framework.OutboundUrlFilter"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">Name of the filter for logging purposes.</param>
|
/// <param name="name">Name of the filter for logging purposes.</param>
|
||||||
/// <param name="config">Filter configuration</param>
|
/// <param name="config">Filter configuration</param>
|
|
@ -1,33 +0,0 @@
|
||||||
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("OpenSim.Framework.RegionLoader.Filesystem")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
|
||||||
[assembly: AssemblyProduct("OpenSim")]
|
|
||||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
|
||||||
[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("4ab5c74b-e886-40a1-b67d-a04df285e706")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
[assembly: AssemblyVersion("0.8.2.*")]
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
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("OpenSim.Framework.RegionLoader.Web")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
|
||||||
[assembly: AssemblyProduct("OpenSim")]
|
|
||||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
|
||||||
[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("985afff8-e7ed-4056-acce-39abf7a43d33")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
[assembly: AssemblyVersion("0.8.2.*")]
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ using log4net;
|
||||||
|
|
||||||
using OpenSim.Framework.ServiceAuth;
|
using OpenSim.Framework.ServiceAuth;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implementation of a generic REST client
|
/// Implementation of a generic REST client
|
||||||
|
@ -524,4 +524,158 @@ namespace OpenSim.Framework.Communications
|
||||||
|
|
||||||
#endregion Async Invocation
|
#endregion Async Invocation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal class SimpleAsyncResult : IAsyncResult
|
||||||
|
{
|
||||||
|
private readonly AsyncCallback m_callback;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Is process completed?
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Should really be boolean, but VolatileRead has no boolean method</remarks>
|
||||||
|
private byte m_completed;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Did process complete synchronously?
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>I have a hard time imagining a scenario where this is the case, again, same issue about
|
||||||
|
/// booleans and VolatileRead as m_completed
|
||||||
|
/// </remarks>
|
||||||
|
private byte m_completedSynchronously;
|
||||||
|
|
||||||
|
private readonly object m_asyncState;
|
||||||
|
private ManualResetEvent m_waitHandle;
|
||||||
|
private Exception m_exception;
|
||||||
|
|
||||||
|
internal SimpleAsyncResult(AsyncCallback cb, object state)
|
||||||
|
{
|
||||||
|
m_callback = cb;
|
||||||
|
m_asyncState = state;
|
||||||
|
m_completed = 0;
|
||||||
|
m_completedSynchronously = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IAsyncResult Members
|
||||||
|
|
||||||
|
public object AsyncState
|
||||||
|
{
|
||||||
|
get { return m_asyncState; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public WaitHandle AsyncWaitHandle
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (m_waitHandle == null)
|
||||||
|
{
|
||||||
|
bool done = IsCompleted;
|
||||||
|
ManualResetEvent mre = new ManualResetEvent(done);
|
||||||
|
if (Interlocked.CompareExchange(ref m_waitHandle, mre, null) != null)
|
||||||
|
{
|
||||||
|
mre.Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!done && IsCompleted)
|
||||||
|
{
|
||||||
|
m_waitHandle.Set();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_waitHandle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool CompletedSynchronously
|
||||||
|
{
|
||||||
|
get { return Thread.VolatileRead(ref m_completedSynchronously) == 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsCompleted
|
||||||
|
{
|
||||||
|
get { return Thread.VolatileRead(ref m_completed) == 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region class Methods
|
||||||
|
|
||||||
|
internal void SetAsCompleted(bool completedSynchronously)
|
||||||
|
{
|
||||||
|
m_completed = 1;
|
||||||
|
if (completedSynchronously)
|
||||||
|
m_completedSynchronously = 1;
|
||||||
|
else
|
||||||
|
m_completedSynchronously = 0;
|
||||||
|
|
||||||
|
SignalCompletion();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void HandleException(Exception e, bool completedSynchronously)
|
||||||
|
{
|
||||||
|
m_completed = 1;
|
||||||
|
if (completedSynchronously)
|
||||||
|
m_completedSynchronously = 1;
|
||||||
|
else
|
||||||
|
m_completedSynchronously = 0;
|
||||||
|
m_exception = e;
|
||||||
|
|
||||||
|
SignalCompletion();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SignalCompletion()
|
||||||
|
{
|
||||||
|
if (m_waitHandle != null) m_waitHandle.Set();
|
||||||
|
|
||||||
|
if (m_callback != null) m_callback(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void EndInvoke()
|
||||||
|
{
|
||||||
|
// This method assumes that only 1 thread calls EndInvoke
|
||||||
|
if (!IsCompleted)
|
||||||
|
{
|
||||||
|
// If the operation isn't done, wait for it
|
||||||
|
AsyncWaitHandle.WaitOne();
|
||||||
|
AsyncWaitHandle.Close();
|
||||||
|
m_waitHandle.Close();
|
||||||
|
m_waitHandle = null; // Allow early GC
|
||||||
|
}
|
||||||
|
|
||||||
|
// Operation is done: if an exception occured, throw it
|
||||||
|
if (m_exception != null) throw m_exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class AsyncResult<T> : SimpleAsyncResult
|
||||||
|
{
|
||||||
|
private T m_result = default(T);
|
||||||
|
|
||||||
|
public AsyncResult(AsyncCallback asyncCallback, Object state) :
|
||||||
|
base(asyncCallback, state)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAsCompleted(T result, bool completedSynchronously)
|
||||||
|
{
|
||||||
|
// Save the asynchronous operation's result
|
||||||
|
m_result = result;
|
||||||
|
|
||||||
|
// Tell the base class that the operation completed
|
||||||
|
// sucessfully (no exception)
|
||||||
|
base.SetAsCompleted(completedSynchronously);
|
||||||
|
}
|
||||||
|
|
||||||
|
public new T EndInvoke()
|
||||||
|
{
|
||||||
|
base.EndInvoke();
|
||||||
|
return m_result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -55,7 +55,7 @@ namespace OpenSim
|
||||||
base.Startup();
|
base.Startup();
|
||||||
|
|
||||||
m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
|
m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
|
||||||
m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
|
SceneManager.Scenes.Count, SceneManager.Scenes.Count > 1 ? "s" : "");
|
||||||
|
|
||||||
WorldHasComeToAnEnd.WaitOne();
|
WorldHasComeToAnEnd.WaitOne();
|
||||||
WorldHasComeToAnEnd.Close();
|
WorldHasComeToAnEnd.Close();
|
||||||
|
|
|
@ -36,17 +36,15 @@ using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Framework.Monitoring;
|
using OpenSim.Framework.Monitoring;
|
||||||
using OpenSim.Region.ClientStack;
|
|
||||||
using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
|
||||||
using OpenSim.Region.Framework;
|
using OpenSim.Region.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Server.Base;
|
using OpenSim.Server.Base;
|
||||||
using OpenSim.Services.Base;
|
using OpenSim.Services.Base;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
@ -121,19 +119,12 @@ namespace OpenSim
|
||||||
/// </value>
|
/// </value>
|
||||||
public OpenSimConfigSource ConfigSource { get; private set; }
|
public OpenSimConfigSource ConfigSource { get; private set; }
|
||||||
|
|
||||||
public List<IClientNetworkServer> ClientServers
|
|
||||||
{
|
|
||||||
get { return m_clientServers; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected EnvConfigSource m_EnvConfigSource = new EnvConfigSource();
|
protected EnvConfigSource m_EnvConfigSource = new EnvConfigSource();
|
||||||
|
|
||||||
public EnvConfigSource envConfigSource
|
public EnvConfigSource envConfigSource
|
||||||
{
|
{
|
||||||
get { return m_EnvConfigSource; }
|
get { return m_EnvConfigSource; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>();
|
|
||||||
|
|
||||||
public uint HttpServerPort
|
public uint HttpServerPort
|
||||||
{
|
{
|
||||||
|
@ -371,9 +362,9 @@ namespace OpenSim
|
||||||
/// <param name="regionInfo"></param>
|
/// <param name="regionInfo"></param>
|
||||||
/// <param name="portadd_flag"></param>
|
/// <param name="portadd_flag"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, bool portadd_flag, out IScene scene)
|
public void CreateRegion(RegionInfo regionInfo, bool portadd_flag, out IScene scene)
|
||||||
{
|
{
|
||||||
return CreateRegion(regionInfo, portadd_flag, false, out scene);
|
CreateRegion(regionInfo, portadd_flag, false, out scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -381,9 +372,9 @@ namespace OpenSim
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="regionInfo"></param>
|
/// <param name="regionInfo"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, out IScene scene)
|
public void CreateRegion(RegionInfo regionInfo, out IScene scene)
|
||||||
{
|
{
|
||||||
return CreateRegion(regionInfo, false, true, out scene);
|
CreateRegion(regionInfo, false, true, out scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -393,7 +384,7 @@ namespace OpenSim
|
||||||
/// <param name="portadd_flag"></param>
|
/// <param name="portadd_flag"></param>
|
||||||
/// <param name="do_post_init"></param>
|
/// <param name="do_post_init"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<IClientNetworkServer> CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene)
|
public void CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene)
|
||||||
{
|
{
|
||||||
int port = regionInfo.InternalEndPoint.Port;
|
int port = regionInfo.InternalEndPoint.Port;
|
||||||
|
|
||||||
|
@ -418,8 +409,7 @@ namespace OpenSim
|
||||||
Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName);
|
Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<IClientNetworkServer> clientServers;
|
Scene scene = SetupScene(regionInfo, proxyOffset, Config);
|
||||||
Scene scene = SetupScene(regionInfo, proxyOffset, Config, out clientServers);
|
|
||||||
|
|
||||||
m_log.Info("[MODULES]: Loading Region's modules (old style)");
|
m_log.Info("[MODULES]: Loading Region's modules (old style)");
|
||||||
|
|
||||||
|
@ -511,14 +501,14 @@ namespace OpenSim
|
||||||
|
|
||||||
SceneManager.Add(scene);
|
SceneManager.Add(scene);
|
||||||
|
|
||||||
if (m_autoCreateClientStack)
|
//if (m_autoCreateClientStack)
|
||||||
{
|
//{
|
||||||
foreach (IClientNetworkServer clientserver in clientServers)
|
// foreach (IClientNetworkServer clientserver in clientServers)
|
||||||
{
|
// {
|
||||||
m_clientServers.Add(clientserver);
|
// m_clientServers.Add(clientserver);
|
||||||
clientserver.Start();
|
// clientserver.Start();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (scene.SnmpService != null)
|
if (scene.SnmpService != null)
|
||||||
{
|
{
|
||||||
|
@ -534,7 +524,7 @@ namespace OpenSim
|
||||||
scene.SnmpService.LinkUp(scene);
|
scene.SnmpService.LinkUp(scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
return clientServers;
|
//return clientServers;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -673,7 +663,7 @@ namespace OpenSim
|
||||||
|
|
||||||
scene.DeleteAllSceneObjects();
|
scene.DeleteAllSceneObjects();
|
||||||
SceneManager.CloseScene(scene);
|
SceneManager.CloseScene(scene);
|
||||||
ShutdownClientServer(scene.RegionInfo);
|
//ShutdownClientServer(scene.RegionInfo);
|
||||||
|
|
||||||
if (!cleanup)
|
if (!cleanup)
|
||||||
return;
|
return;
|
||||||
|
@ -734,7 +724,7 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneManager.CloseScene(scene);
|
SceneManager.CloseScene(scene);
|
||||||
ShutdownClientServer(scene.RegionInfo);
|
//ShutdownClientServer(scene.RegionInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -755,9 +745,9 @@ namespace OpenSim
|
||||||
/// <param name="regionInfo"></param>
|
/// <param name="regionInfo"></param>
|
||||||
/// <param name="clientServer"> </param>
|
/// <param name="clientServer"> </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected Scene SetupScene(RegionInfo regionInfo, out List<IClientNetworkServer> clientServer)
|
protected Scene SetupScene(RegionInfo regionInfo)
|
||||||
{
|
{
|
||||||
return SetupScene(regionInfo, 0, null, out clientServer);
|
return SetupScene(regionInfo, 0, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -768,55 +758,18 @@ namespace OpenSim
|
||||||
/// <param name="configSource"></param>
|
/// <param name="configSource"></param>
|
||||||
/// <param name="clientServer"> </param>
|
/// <param name="clientServer"> </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected Scene SetupScene(
|
protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, IConfigSource configSource)
|
||||||
RegionInfo regionInfo, int proxyOffset, IConfigSource configSource, out List<IClientNetworkServer> clientServer)
|
|
||||||
{
|
{
|
||||||
List<IClientNetworkServer> clientNetworkServers = null;
|
//List<IClientNetworkServer> clientNetworkServers = null;
|
||||||
|
|
||||||
AgentCircuitManager circuitManager = new AgentCircuitManager();
|
AgentCircuitManager circuitManager = new AgentCircuitManager();
|
||||||
IPAddress listenIP = regionInfo.InternalEndPoint.Address;
|
|
||||||
//if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP))
|
|
||||||
// listenIP = IPAddress.Parse("0.0.0.0");
|
|
||||||
|
|
||||||
uint port = (uint) regionInfo.InternalEndPoint.Port;
|
|
||||||
|
|
||||||
if (m_autoCreateClientStack)
|
|
||||||
{
|
|
||||||
clientNetworkServers = m_clientStackManager.CreateServers(
|
|
||||||
listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource,
|
|
||||||
circuitManager);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clientServer = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
regionInfo.InternalEndPoint.Port = (int) port;
|
|
||||||
|
|
||||||
Scene scene = CreateScene(regionInfo, m_simulationDataService, m_estateDataService, circuitManager);
|
Scene scene = CreateScene(regionInfo, m_simulationDataService, m_estateDataService, circuitManager);
|
||||||
|
|
||||||
if (m_autoCreateClientStack)
|
|
||||||
{
|
|
||||||
foreach (IClientNetworkServer clientnetserver in clientNetworkServers)
|
|
||||||
{
|
|
||||||
clientnetserver.AddScene(scene);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
clientServer = clientNetworkServers;
|
|
||||||
scene.LoadWorldMap();
|
scene.LoadWorldMap();
|
||||||
|
|
||||||
scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset;
|
|
||||||
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
|
|
||||||
scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
|
|
||||||
|
|
||||||
return scene;
|
return scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ClientStackManager CreateClientStackManager()
|
|
||||||
{
|
|
||||||
return new ClientStackManager(m_configSettings.ClientstackDll);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService,
|
protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService,
|
||||||
IEstateDataService estateDataService, AgentCircuitManager circuitManager)
|
IEstateDataService estateDataService, AgentCircuitManager circuitManager)
|
||||||
{
|
{
|
||||||
|
@ -825,42 +778,18 @@ namespace OpenSim
|
||||||
SceneCommunicationService sceneGridService = new SceneCommunicationService();
|
SceneCommunicationService sceneGridService = new SceneCommunicationService();
|
||||||
|
|
||||||
return new Scene(
|
return new Scene(
|
||||||
regionInfo, circuitManager, physicsScene, sceneGridService,
|
regionInfo, circuitManager,
|
||||||
simDataService, estateDataService,
|
simDataService, estateDataService,
|
||||||
Config, m_version);
|
Config, m_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ShutdownClientServer(RegionInfo whichRegion)
|
|
||||||
{
|
|
||||||
// Close and remove the clientserver for a region
|
|
||||||
bool foundClientServer = false;
|
|
||||||
int clientServerElement = 0;
|
|
||||||
Location location = new Location(whichRegion.RegionHandle);
|
|
||||||
|
|
||||||
for (int i = 0; i < m_clientServers.Count; i++)
|
|
||||||
{
|
|
||||||
if (m_clientServers[i].HandlesRegion(location))
|
|
||||||
{
|
|
||||||
clientServerElement = i;
|
|
||||||
foundClientServer = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (foundClientServer)
|
|
||||||
{
|
|
||||||
m_clientServers[clientServerElement].Stop();
|
|
||||||
m_clientServers.RemoveAt(clientServerElement);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual void HandleRestartRegion(RegionInfo whichRegion)
|
protected virtual void HandleRestartRegion(RegionInfo whichRegion)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
"[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
|
"[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
|
||||||
whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY);
|
whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY);
|
||||||
|
|
||||||
ShutdownClientServer(whichRegion);
|
//ShutdownClientServer(whichRegion);
|
||||||
IScene scene;
|
IScene scene;
|
||||||
CreateRegion(whichRegion, true, out scene);
|
CreateRegion(whichRegion, true, out scene);
|
||||||
scene.Start();
|
scene.Start();
|
||||||
|
@ -868,12 +797,6 @@ namespace OpenSim
|
||||||
|
|
||||||
# region Setup methods
|
# region Setup methods
|
||||||
|
|
||||||
protected override PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent)
|
|
||||||
{
|
|
||||||
return GetPhysicsScene(
|
|
||||||
m_configSettings.PhysicsEngine, m_configSettings.MeshEngineName, Config, osSceneIdentifier, regionExtent);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handler to supply the current status of this sim
|
/// Handler to supply the current status of this sim
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -32,16 +32,15 @@ using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.Framework;
|
using OpenSim.Region.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack
|
namespace OpenSim
|
||||||
{
|
{
|
||||||
public abstract class RegionApplicationBase : BaseOpenSimServer
|
public abstract class RegionApplicationBase : BaseOpenSimServer
|
||||||
{
|
{
|
||||||
|
@ -53,7 +52,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
protected uint m_httpServerPort;
|
protected uint m_httpServerPort;
|
||||||
protected ISimulationDataService m_simulationDataService;
|
protected ISimulationDataService m_simulationDataService;
|
||||||
protected IEstateDataService m_estateDataService;
|
protected IEstateDataService m_estateDataService;
|
||||||
protected ClientStackManager m_clientStackManager;
|
|
||||||
|
|
||||||
public SceneManager SceneManager { get; protected set; }
|
public SceneManager SceneManager { get; protected set; }
|
||||||
public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } }
|
public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } }
|
||||||
|
@ -62,23 +60,11 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
protected abstract void Initialize();
|
protected abstract void Initialize();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get a new physics scene.
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <param name="osSceneIdentifier">
|
|
||||||
/// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
|
|
||||||
/// </param>
|
|
||||||
/// <returns></returns>
|
|
||||||
protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent);
|
|
||||||
|
|
||||||
protected abstract ClientStackManager CreateClientStackManager();
|
|
||||||
protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);
|
protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);
|
||||||
|
|
||||||
protected override void StartupSpecific()
|
protected override void StartupSpecific()
|
||||||
{
|
{
|
||||||
SceneManager = SceneManager.Instance;
|
SceneManager = SceneManager.Instance;
|
||||||
m_clientStackManager = CreateClientStackManager();
|
|
||||||
|
|
||||||
Initialize();
|
Initialize();
|
||||||
|
|
||||||
|
@ -125,23 +111,5 @@ namespace OpenSim.Region.ClientStack
|
||||||
base.StartupSpecific();
|
base.StartupSpecific();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get a new physics scene.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="engine">The name of the physics engine to use</param>
|
|
||||||
/// <param name="meshEngine">The name of the mesh engine to use</param>
|
|
||||||
/// <param name="config">The configuration data to pass to the physics and mesh engines</param>
|
|
||||||
/// <param name="osSceneIdentifier">
|
|
||||||
/// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
|
|
||||||
/// </param>
|
|
||||||
/// <returns></returns>
|
|
||||||
protected PhysicsScene GetPhysicsScene(
|
|
||||||
string engine, string meshEngine, IConfigSource config, string osSceneIdentifier, Vector3 regionExtent)
|
|
||||||
{
|
|
||||||
PhysicsPluginManager physicsPluginManager;
|
|
||||||
physicsPluginManager = new PhysicsPluginManager();
|
|
||||||
physicsPluginManager.LoadPluginsFromAssemblies("Physics");
|
|
||||||
return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier, regionExtent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,147 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Net;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using Nini.Config;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack
|
|
||||||
{
|
|
||||||
public class ClientStackManager
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private List<Type> plugin = new List<Type>();
|
|
||||||
private List<Assembly> pluginAssembly = new List<Assembly>();
|
|
||||||
|
|
||||||
public ClientStackManager(string pDllName)
|
|
||||||
{
|
|
||||||
List<string> clientstacks = new List<string>();
|
|
||||||
if (pDllName.Contains(","))
|
|
||||||
{
|
|
||||||
clientstacks = new List<string>(pDllName.Split(','));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clientstacks.Add(pDllName);
|
|
||||||
}
|
|
||||||
foreach (string dllName in clientstacks)
|
|
||||||
{
|
|
||||||
m_log.Info("[CLIENTSTACK]: Attempting to load " + dllName);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//plugin = null;
|
|
||||||
Assembly itemAssembly = Assembly.LoadFrom(dllName);
|
|
||||||
pluginAssembly.Add(itemAssembly);
|
|
||||||
|
|
||||||
foreach (Type pluginType in itemAssembly.GetTypes())
|
|
||||||
{
|
|
||||||
if (pluginType.IsPublic)
|
|
||||||
{
|
|
||||||
Type typeInterface = pluginType.GetInterface("IClientNetworkServer");
|
|
||||||
|
|
||||||
if (typeInterface != null)
|
|
||||||
{
|
|
||||||
m_log.Info("[CLIENTSTACK]: Added IClientNetworkServer Interface");
|
|
||||||
plugin.Add(pluginType);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (ReflectionTypeLoadException e)
|
|
||||||
{
|
|
||||||
foreach (Exception e2 in e.LoaderExceptions)
|
|
||||||
{
|
|
||||||
m_log.Error(e2.ToString());
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Create a server that can set up sessions for virtual world client <-> server communications
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="_listenIP"></param>
|
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="proxyPortOffset"></param>
|
|
||||||
/// <param name="allow_alternate_port"></param>
|
|
||||||
/// <param name="assetCache"></param>
|
|
||||||
/// <param name="authenticateClass"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public List<IClientNetworkServer> CreateServers(
|
|
||||||
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port,
|
|
||||||
AgentCircuitManager authenticateClass)
|
|
||||||
{
|
|
||||||
return CreateServers(
|
|
||||||
_listenIP, ref port, proxyPortOffset, allow_alternate_port, null, authenticateClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Create a server that can set up sessions for virtual world client <-> server communications
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="_listenIP"></param>
|
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="proxyPortOffset"></param>
|
|
||||||
/// <param name="allow_alternate_port"></param>
|
|
||||||
/// <param name="configSource">
|
|
||||||
/// Can be null, in which case default values are used
|
|
||||||
/// </param>
|
|
||||||
/// <param name="assetCache"></param>
|
|
||||||
/// <param name="authenticateClass"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public List<IClientNetworkServer> CreateServers(
|
|
||||||
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource,
|
|
||||||
AgentCircuitManager authenticateClass)
|
|
||||||
{
|
|
||||||
List<IClientNetworkServer> servers = new List<IClientNetworkServer>();
|
|
||||||
if (plugin != null)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < plugin.Count; i++)
|
|
||||||
{
|
|
||||||
IClientNetworkServer server =
|
|
||||||
(IClientNetworkServer) Activator.CreateInstance(pluginAssembly[i].GetType(plugin[i].ToString()));
|
|
||||||
|
|
||||||
server.Initialise(
|
|
||||||
_listenIP, ref port, proxyPortOffset, allow_alternate_port,
|
|
||||||
configSource, authenticateClass);
|
|
||||||
servers.Add(server);
|
|
||||||
}
|
|
||||||
return servers;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_log.Error("[CLIENTSTACK]: Couldn't initialize a new server");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using Nini.Config;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack
|
|
||||||
{
|
|
||||||
public interface IClientNetworkServer
|
|
||||||
{
|
|
||||||
void Initialise(
|
|
||||||
IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource,
|
|
||||||
AgentCircuitManager authenticateClass);
|
|
||||||
|
|
||||||
bool HandlesRegion(Location x);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Add the given scene to be handled by this IClientNetworkServer.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name='scene'></param>
|
|
||||||
void AddScene(IScene scene);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Start sending and receiving data.
|
|
||||||
/// </summary>
|
|
||||||
void Start();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Stop sending and receiving data.
|
|
||||||
/// </summary>
|
|
||||||
void Stop();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -40,8 +40,9 @@ using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Monitoring;
|
using OpenSim.Framework.Monitoring;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
using Mono.Addins;
|
||||||
using TokenBucket = OpenSim.Region.ClientStack.LindenUDP.TokenBucket;
|
using TokenBucket = OpenSim.Region.ClientStack.LindenUDP.TokenBucket;
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
@ -49,14 +50,55 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A shim around LLUDPServer that implements the IClientNetworkServer interface
|
/// A shim around LLUDPServer that implements the IClientNetworkServer interface
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class LLUDPServerShim : IClientNetworkServer
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LLUDPServerShim")]
|
||||||
|
public sealed class LLUDPServerShim : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
|
private bool m_Enabled = true;
|
||||||
|
private IConfigSource m_Config;
|
||||||
LLUDPServer m_udpServer;
|
LLUDPServer m_udpServer;
|
||||||
|
|
||||||
public LLUDPServerShim()
|
#region INonSharedRegionModule
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get { return "LLUDPServerShim"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
m_Config = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
uint port = (uint)scene.RegionInfo.InternalEndPoint.Port;
|
||||||
|
|
||||||
|
IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address;
|
||||||
|
Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, scene.RegionInfo.m_allow_alternate_ports, m_Config, scene.AuthenticateHandler);
|
||||||
|
scene.RegionInfo.InternalEndPoint.Port = (int)port;
|
||||||
|
|
||||||
|
AddScene(scene);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
Start();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager)
|
public void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager)
|
||||||
{
|
{
|
||||||
m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager);
|
m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager);
|
||||||
|
@ -200,6 +242,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
m_udpServer.Stop();
|
m_udpServer.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using Mono.Addins;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
@ -31,3 +32,5 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("0.8.2.*")]
|
[assembly: AssemblyVersion("0.8.2.*")]
|
||||||
|
|
||||||
|
[assembly: Addin("LindenUDP", OpenSim.VersionInfo.VersionNumber)]
|
||||||
|
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
|
||||||
|
|
|
@ -37,7 +37,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.CoreModules.Avatar.Attachments;
|
using OpenSim.Region.CoreModules.Avatar.Attachments;
|
||||||
|
|
|
@ -38,7 +38,6 @@ using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.ServiceAuth;
|
using OpenSim.Framework.ServiceAuth;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
|
@ -38,7 +38,6 @@ using OpenMetaverse;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
|
@ -32,7 +32,6 @@ using Nini.Config;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Client;
|
using OpenSim.Framework.Client;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
|
|
@ -32,7 +32,6 @@ using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Client;
|
using OpenSim.Framework.Client;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
|
|
@ -34,7 +34,6 @@ using NDesk.Options;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
|
@ -36,7 +36,6 @@ using OpenSim.Data;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Serialization;
|
using OpenSim.Framework.Serialization;
|
||||||
using OpenSim.Framework.Serialization.External;
|
using OpenSim.Framework.Serialization.External;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
|
@ -36,7 +36,6 @@ using OpenSim.Data;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Serialization;
|
using OpenSim.Framework.Serialization;
|
||||||
using OpenSim.Framework.Serialization.External;
|
using OpenSim.Framework.Serialization.External;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
|
@ -36,7 +36,6 @@ using OpenSim.Data;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Serialization;
|
using OpenSim.Framework.Serialization;
|
||||||
using OpenSim.Framework.Serialization.External;
|
using OpenSim.Framework.Serialization.External;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
|
@ -36,7 +36,6 @@ using OpenSim.Data;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Serialization;
|
using OpenSim.Framework.Serialization;
|
||||||
using OpenSim.Framework.Serialization.External;
|
using OpenSim.Framework.Serialization.External;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
|
@ -36,7 +36,7 @@ using OpenSim.Framework.Client;
|
||||||
using OpenSim.Framework.Monitoring;
|
using OpenSim.Framework.Monitoring;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
|
@ -38,7 +38,7 @@ using OpenSim.Framework.Capabilities;
|
||||||
using OpenSim.Framework.Client;
|
using OpenSim.Framework.Client;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ using OpenSim.Data;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Serialization;
|
using OpenSim.Framework.Serialization;
|
||||||
using OpenSim.Framework.Serialization.External;
|
using OpenSim.Framework.Serialization.External;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||||
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
|
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
|
@ -30,7 +30,6 @@ using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
|
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||||
using OpenSim.Region.Framework;
|
using OpenSim.Region.Framework;
|
||||||
|
@ -159,7 +158,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionInfo regInfo = new RegionInfo();
|
RegionInfo regInfo = new RegionInfo();
|
||||||
Scene m_MockScene = new Scene(regInfo, null);
|
Scene m_MockScene = new Scene(regInfo);
|
||||||
LocalInventoryService invService = new LocalInventoryService(lib);
|
LocalInventoryService invService = new LocalInventoryService(lib);
|
||||||
m_MockScene.RegisterModuleInterface<IInventoryService>(invService);
|
m_MockScene.RegisterModuleInterface<IInventoryService>(invService);
|
||||||
m_MockScene.RegisterModuleInterface<IAssetService>(m_Scene.AssetService);
|
m_MockScene.RegisterModuleInterface<IAssetService>(m_Scene.AssetService);
|
||||||
|
|
|
@ -37,7 +37,6 @@ using System.Security.Cryptography.X509Certificates;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
|
|
@ -32,7 +32,7 @@ using System.Net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Imaging;
|
using OpenMetaverse.Imaging;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
|
using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
|
||||||
r1.ExternalHostName = "127.0.0.1";
|
r1.ExternalHostName = "127.0.0.1";
|
||||||
r1.HttpPort = 9001;
|
r1.HttpPort = 9001;
|
||||||
r1.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
|
r1.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
|
||||||
Scene s = new Scene(new RegionInfo(), null);
|
Scene s = new Scene(new RegionInfo());
|
||||||
s.RegionInfo.RegionID = r1.RegionID;
|
s.RegionInfo.RegionID = r1.RegionID;
|
||||||
m_LocalConnector.AddRegion(s);
|
m_LocalConnector.AddRegion(s);
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
|
||||||
r2.ExternalHostName = "127.0.0.1";
|
r2.ExternalHostName = "127.0.0.1";
|
||||||
r2.HttpPort = 9002;
|
r2.HttpPort = 9002;
|
||||||
r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
|
r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
|
||||||
s = new Scene(new RegionInfo(), null);
|
s = new Scene(new RegionInfo());
|
||||||
s.RegionInfo.RegionID = r2.RegionID;
|
s.RegionInfo.RegionID = r2.RegionID;
|
||||||
m_LocalConnector.AddRegion(s);
|
m_LocalConnector.AddRegion(s);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
|
||||||
r3.ExternalHostName = "127.0.0.1";
|
r3.ExternalHostName = "127.0.0.1";
|
||||||
r3.HttpPort = 9003;
|
r3.HttpPort = 9003;
|
||||||
r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
|
r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
|
||||||
s = new Scene(new RegionInfo(), null);
|
s = new Scene(new RegionInfo());
|
||||||
s.RegionInfo.RegionID = r3.RegionID;
|
s.RegionInfo.RegionID = r3.RegionID;
|
||||||
m_LocalConnector.AddRegion(s);
|
m_LocalConnector.AddRegion(s);
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
|
||||||
r4.ExternalHostName = "127.0.0.1";
|
r4.ExternalHostName = "127.0.0.1";
|
||||||
r4.HttpPort = 9004;
|
r4.HttpPort = 9004;
|
||||||
r4.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
|
r4.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
|
||||||
s = new Scene(new RegionInfo(), null);
|
s = new Scene(new RegionInfo());
|
||||||
s.RegionInfo.RegionID = r4.RegionID;
|
s.RegionInfo.RegionID = r4.RegionID;
|
||||||
m_LocalConnector.AddRegion(s);
|
m_LocalConnector.AddRegion(s);
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Scenes.Serialization;
|
using OpenSim.Region.Framework.Scenes.Serialization;
|
||||||
|
|
|
@ -34,7 +34,6 @@ using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
|
@ -45,7 +45,7 @@ using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
|
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
|
@ -44,7 +44,7 @@ using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
|
@ -41,7 +41,7 @@ using Mono.Addins;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
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("OpenSim.Region.DataSnapshot")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
|
||||||
[assembly: AssemblyProduct("OpenSim")]
|
|
||||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
|
||||||
[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("06c36944-a28d-470e-912c-654c3edaba6b")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
[assembly: AssemblyVersion("0.8.2.*")]
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes.Animation
|
namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
{
|
{
|
||||||
|
|
|
@ -635,8 +635,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Triggered by <see cref="TriggerScriptCollidingStart"/>
|
/// Triggered by <see cref="TriggerScriptCollidingStart"/>
|
||||||
/// in <see cref="SceneObjectPart.SendCollisionEvent"/>
|
/// in <see cref="SceneObjectPart.SendCollisionEvent"/>
|
||||||
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.OnCollisionUpdate"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.SendCollisionUpdate"/>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public event ScriptColliding OnScriptColliderStart;
|
public event ScriptColliding OnScriptColliderStart;
|
||||||
|
|
||||||
|
@ -649,8 +649,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Triggered by <see cref="TriggerScriptColliding"/>
|
/// Triggered by <see cref="TriggerScriptColliding"/>
|
||||||
/// in <see cref="SceneObjectPart.SendCollisionEvent"/>
|
/// in <see cref="SceneObjectPart.SendCollisionEvent"/>
|
||||||
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.OnCollisionUpdate"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.SendCollisionUpdate"/>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public event ScriptColliding OnScriptColliding;
|
public event ScriptColliding OnScriptColliding;
|
||||||
|
|
||||||
|
@ -662,8 +662,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Triggered by <see cref="TriggerScriptCollidingEnd"/>
|
/// Triggered by <see cref="TriggerScriptCollidingEnd"/>
|
||||||
/// in <see cref="SceneObjectPart.SendCollisionEvent"/>
|
/// in <see cref="SceneObjectPart.SendCollisionEvent"/>
|
||||||
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.OnCollisionUpdate"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.SendCollisionUpdate"/>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public event ScriptColliding OnScriptCollidingEnd;
|
public event ScriptColliding OnScriptCollidingEnd;
|
||||||
|
|
||||||
|
@ -675,8 +675,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Triggered by <see cref="TriggerScriptLandCollidingStart"/>
|
/// Triggered by <see cref="TriggerScriptLandCollidingStart"/>
|
||||||
/// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
|
/// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
|
||||||
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.OnCollisionUpdate"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.SendCollisionUpdate"/>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public event ScriptColliding OnScriptLandColliderStart;
|
public event ScriptColliding OnScriptLandColliderStart;
|
||||||
|
|
||||||
|
@ -688,8 +688,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Triggered by <see cref="TriggerScriptLandColliding"/>
|
/// Triggered by <see cref="TriggerScriptLandColliding"/>
|
||||||
/// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
|
/// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
|
||||||
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.OnCollisionUpdate"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.SendCollisionUpdate"/>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public event ScriptColliding OnScriptLandColliding;
|
public event ScriptColliding OnScriptLandColliding;
|
||||||
|
|
||||||
|
@ -701,8 +701,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Triggered by <see cref="TriggerScriptLandCollidingEnd"/>
|
/// Triggered by <see cref="TriggerScriptLandCollidingEnd"/>
|
||||||
/// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
|
/// in <see cref="SceneObjectPart.SendLandCollisionEvent"/>
|
||||||
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
/// via <see cref="SceneObjectPart.PhysicsCollision"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.OnCollisionUpdate"/>
|
||||||
/// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/>
|
/// via <see cref="OpenSim.Region.PhysicsModule.SharedBase.PhysicsActor.SendCollisionUpdate"/>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public event ScriptColliding OnScriptLandColliderEnd;
|
public event ScriptColliding OnScriptLandColliderEnd;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ using System.Threading;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Region.Framework.Scenes.Serialization;
|
using OpenSim.Region.Framework.Scenes.Serialization;
|
||||||
using System.Runtime.Serialization.Formatters.Binary;
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
|
@ -31,7 +31,7 @@ using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Steps to add a new prioritization policy:
|
* Steps to add a new prioritization policy:
|
||||||
|
|
|
@ -35,7 +35,6 @@ using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
|
|
|
@ -31,7 +31,6 @@ using System.Threading;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Packets;
|
using OpenMetaverse.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes
|
namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
|
@ -42,12 +42,11 @@ using OpenMetaverse.Imaging;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Monitoring;
|
using OpenSim.Framework.Monitoring;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes.Scripting;
|
using OpenSim.Region.Framework.Scenes.Scripting;
|
||||||
using OpenSim.Region.Framework.Scenes.Serialization;
|
using OpenSim.Region.Framework.Scenes.Serialization;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
using TPFlags = OpenSim.Framework.Constants.TeleportFlags;
|
using TPFlags = OpenSim.Framework.Constants.TeleportFlags;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
@ -855,11 +854,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
public Scene(RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
|
public Scene(RegionInfo regInfo, AgentCircuitManager authen,
|
||||||
SceneCommunicationService sceneGridService,
|
|
||||||
ISimulationDataService simDataService, IEstateDataService estateDataService,
|
ISimulationDataService simDataService, IEstateDataService estateDataService,
|
||||||
IConfigSource config, string simulatorVersion)
|
IConfigSource config, string simulatorVersion)
|
||||||
: this(regInfo, physicsScene)
|
: this(regInfo)
|
||||||
{
|
{
|
||||||
m_config = config;
|
m_config = config;
|
||||||
MinFrameTime = 0.089f;
|
MinFrameTime = 0.089f;
|
||||||
|
@ -870,7 +868,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue / 2)) + (uint)(uint.MaxValue / 4);
|
m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue / 2)) + (uint)(uint.MaxValue / 4);
|
||||||
m_authenticateHandler = authen;
|
m_authenticateHandler = authen;
|
||||||
m_sceneGridService = sceneGridService;
|
m_sceneGridService = new SceneCommunicationService();
|
||||||
m_SimulationDataService = simDataService;
|
m_SimulationDataService = simDataService;
|
||||||
m_EstateDataService = estateDataService;
|
m_EstateDataService = estateDataService;
|
||||||
|
|
||||||
|
@ -1088,11 +1086,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "Startup" };
|
string[] possibleAccessControlConfigSections = new string[] { "Startup", "AccessControl"};
|
||||||
|
|
||||||
string grant
|
string grant
|
||||||
= Util.GetConfigVarFromSections<string>(
|
= Util.GetConfigVarFromSections<string>(
|
||||||
config, "AllowedClients", possibleAccessControlConfigSections, "");
|
config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
|
||||||
|
|
||||||
if (grant.Length > 0)
|
if (grant.Length > 0)
|
||||||
{
|
{
|
||||||
|
@ -1104,7 +1102,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
grant
|
grant
|
||||||
= Util.GetConfigVarFromSections<string>(
|
= Util.GetConfigVarFromSections<string>(
|
||||||
config, "BannedClients", possibleAccessControlConfigSections, "");
|
config, "DeniedClients", possibleAccessControlConfigSections, String.Empty);
|
||||||
|
// Deal with the mess of someone having used a different word at some point
|
||||||
|
if (grant == String.Empty)
|
||||||
|
grant = Util.GetConfigVarFromSections<string>(
|
||||||
|
config, "BannedClients", possibleAccessControlConfigSections, String.Empty);
|
||||||
|
|
||||||
if (grant.Length > 0)
|
if (grant.Length > 0)
|
||||||
{
|
{
|
||||||
|
@ -1201,11 +1203,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
MainConsole.Instance.Commands.AddCommand("scene", false, "gc collect", "gc collect", "gc collect", "Cause the garbage collector to make a single pass", HandleGcCollect);
|
MainConsole.Instance.Commands.AddCommand("scene", false, "gc collect", "gc collect", "gc collect", "Cause the garbage collector to make a single pass", HandleGcCollect);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Scene(RegionInfo regInfo, PhysicsScene physicsScene)
|
public Scene(RegionInfo regInfo)
|
||||||
: base(regInfo)
|
: base(regInfo)
|
||||||
{
|
{
|
||||||
m_sceneGraph = new SceneGraph(this);
|
m_sceneGraph = new SceneGraph(this);
|
||||||
m_sceneGraph.PhysicsScene = physicsScene;
|
|
||||||
|
|
||||||
// If the scene graph has an Unrecoverable error, restart this sim.
|
// If the scene graph has an Unrecoverable error, restart this sim.
|
||||||
// Currently the only thing that causes it to happen is two kinds of specific
|
// Currently the only thing that causes it to happen is two kinds of specific
|
||||||
|
|
|
@ -35,7 +35,6 @@ using OpenMetaverse.StructuredData;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Client;
|
using OpenSim.Framework.Client;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Capabilities;
|
using OpenSim.Framework.Capabilities;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
|
@ -34,7 +34,7 @@ using OpenMetaverse.Packets;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Scenes.Types;
|
using OpenSim.Region.Framework.Scenes.Types;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes
|
namespace OpenSim.Region.Framework.Scenes
|
||||||
|
@ -121,7 +121,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public PhysicsScene PhysicsScene
|
public PhysicsScene PhysicsScene
|
||||||
{
|
{
|
||||||
get { return _PhyScene; }
|
get
|
||||||
|
{
|
||||||
|
if (_PhyScene == null)
|
||||||
|
_PhyScene = m_parentScene.RequestModuleInterface<PhysicsScene>();
|
||||||
|
return _PhyScene;
|
||||||
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// If we're not doing the initial set
|
// If we're not doing the initial set
|
||||||
|
@ -172,9 +177,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// PhysX does this (runs in the background).
|
// PhysX does this (runs in the background).
|
||||||
|
|
||||||
if (_PhyScene.IsThreaded)
|
if (PhysicsScene.IsThreaded)
|
||||||
{
|
{
|
||||||
_PhyScene.GetResults();
|
PhysicsScene.GetResults();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +219,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// position).
|
// position).
|
||||||
//
|
//
|
||||||
// Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate().
|
// Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate().
|
||||||
return _PhyScene.Simulate((float)elapsed);
|
return PhysicsScene.Simulate((float)elapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected internal void UpdateScenePresenceMovement()
|
protected internal void UpdateScenePresenceMovement()
|
||||||
|
|
|
@ -39,7 +39,7 @@ using OpenMetaverse;
|
||||||
using OpenMetaverse.Packets;
|
using OpenMetaverse.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Region.Framework.Scenes.Serialization;
|
using OpenSim.Region.Framework.Scenes.Serialization;
|
||||||
using PermissionMask = OpenSim.Framework.PermissionMask;
|
using PermissionMask = OpenSim.Framework.PermissionMask;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes.Scripting;
|
using OpenSim.Region.Framework.Scenes.Scripting;
|
||||||
using OpenSim.Region.Framework.Scenes.Serialization;
|
using OpenSim.Region.Framework.Scenes.Serialization;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using PermissionMask = OpenSim.Framework.PermissionMask;
|
using PermissionMask = OpenSim.Framework.PermissionMask;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes
|
namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
|
@ -41,7 +41,7 @@ using OpenSim.Framework.Monitoring;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes.Animation;
|
using OpenSim.Region.Framework.Scenes.Animation;
|
||||||
using OpenSim.Region.Framework.Scenes.Types;
|
using OpenSim.Region.Framework.Scenes.Types;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
|
using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
|
||||||
|
|
|
@ -34,7 +34,7 @@ using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes.Serialization
|
namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ using System.Text;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ using System.Threading;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
|
@ -33,7 +33,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
|
@ -32,7 +32,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.CoreModules.Framework.EntityTransfer;
|
using OpenSim.Region.CoreModules.Framework.EntityTransfer;
|
||||||
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
|
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
|
||||||
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
|
||||||
|
|
|
@ -32,7 +32,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.CoreModules.Framework.EntityTransfer;
|
using OpenSim.Region.CoreModules.Framework.EntityTransfer;
|
||||||
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
|
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
|
||||||
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
|
||||||
|
|
|
@ -31,7 +31,6 @@ using System.Reflection;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
|
@ -30,7 +30,6 @@ using System.Reflection;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ using System.Reflection;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
|
@ -36,7 +36,6 @@ using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Serialization.External;
|
using OpenSim.Framework.Serialization.External;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Scenes.Serialization;
|
using OpenSim.Region.Framework.Scenes.Serialization;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
|
@ -31,7 +31,6 @@ using System.Threading;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ using System.Reflection;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ using System.Reflection;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.CoreModules.Avatar.InstantMessage;
|
using OpenSim.Region.CoreModules.Avatar.InstantMessage;
|
||||||
using OpenSim.Region.CoreModules.World.Permissions;
|
using OpenSim.Region.CoreModules.World.Permissions;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
|
|
@ -36,7 +36,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.ClientStack.Linden;
|
using OpenSim.Region.ClientStack.Linden;
|
||||||
|
|
|
@ -35,13 +35,12 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.CoreModules.Framework.EntityTransfer;
|
using OpenSim.Region.CoreModules.Framework.EntityTransfer;
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||||
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes.Tests
|
namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
|
|
|
@ -33,7 +33,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
|
@ -36,7 +36,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.ClientStack.Linden;
|
using OpenSim.Region.ClientStack.Linden;
|
||||||
|
|
|
@ -32,7 +32,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.CoreModules.Framework;
|
using OpenSim.Region.CoreModules.Framework;
|
||||||
|
|
|
@ -32,7 +32,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
|
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
|
||||||
|
|
|
@ -35,7 +35,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.CoreModules.Framework;
|
using OpenSim.Region.CoreModules.Framework;
|
||||||
|
|
|
@ -31,7 +31,6 @@ using System.Reflection;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@ using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||||
|
|
|
@ -37,7 +37,6 @@ using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Assets;
|
using OpenMetaverse.Assets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||||
|
|
|
@ -37,7 +37,6 @@ using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Assets;
|
using OpenMetaverse.Assets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||||
|
|
|
@ -35,7 +35,6 @@ using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
|
@ -42,7 +42,6 @@ using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ using OpenMetaverse.Messages.Linden;
|
||||||
using OpenMetaverse.Packets;
|
using OpenMetaverse.Packets;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.ClientStack.Linden;
|
using OpenSim.Region.ClientStack.Linden;
|
||||||
|
|
|
@ -41,7 +41,6 @@ using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
|
|
|
@ -39,14 +39,10 @@ using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.DataSnapshot.Interfaces;
|
using OpenSim.Region.DataSnapshot.Interfaces;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
[assembly: Addin("DataSnapshot", OpenSim.VersionInfo.VersionNumber)]
|
|
||||||
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
|
|
||||||
|
|
||||||
namespace OpenSim.Region.DataSnapshot
|
namespace OpenSim.Region.DataSnapshot
|
||||||
{
|
{
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DataSnapshotManager")]
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DataSnapshotManager")]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue