fix merge

This commit is contained in:
UbitUmarov
2017-01-05 19:32:57 +00:00
960 changed files with 23754 additions and 23741 deletions

View File

@@ -41,117 +41,117 @@ namespace OpenSim.Server.Base
{
/// <summary>
/// Command manager -
/// Wrapper for OpenSim.Framework.PluginManager to allow
/// Wrapper for OpenSim.Framework.PluginManager to allow
/// us to add commands to the console to perform operations
/// on our repos and plugins
/// </summary>
public class CommandManager
{
public AddinRegistry PluginRegistry;
protected PluginManager PluginManager;
public class CommandManager
{
public AddinRegistry PluginRegistry;
protected PluginManager PluginManager;
public CommandManager(AddinRegistry registry)
public CommandManager(AddinRegistry registry)
{
PluginRegistry = registry;
PluginManager = new PluginManager(PluginRegistry);
AddManagementCommands();
}
PluginRegistry = registry;
PluginManager = new PluginManager(PluginRegistry);
AddManagementCommands();
}
private void AddManagementCommands()
{
// add plugin
MainConsole.Instance.Commands.AddCommand("Plugin", true,
private void AddManagementCommands()
{
// add plugin
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin add", "plugin add \"plugin index\"",
"Install plugin from repository.",
"Install plugin from repository.",
HandleConsoleInstallPlugin);
// remove plugin
// remove plugin
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin remove", "plugin remove \"plugin index\"",
"Remove plugin from repository",
"Remove plugin from repository",
HandleConsoleUnInstallPlugin);
// list installed plugins
// list installed plugins
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin list installed",
"plugin list installed","List install plugins",
"plugin list installed",
"plugin list installed","List install plugins",
HandleConsoleListInstalledPlugin);
// list plugins available from registered repositories
// list plugins available from registered repositories
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin list available",
"plugin list available","List available plugins",
"plugin list available","List available plugins",
HandleConsoleListAvailablePlugin);
// List available updates
// List available updates
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin updates", "plugin updates","List availble updates",
HandleConsoleListUpdates);
// Update plugin
// Update plugin
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin update", "plugin update \"plugin index\"","Update the plugin",
HandleConsoleUpdatePlugin);
// Add repository
// Add repository
MainConsole.Instance.Commands.AddCommand("Repository", true,
"repo add", "repo add \"url\"","Add repository",
HandleConsoleAddRepo);
// Refresh repo
// Refresh repo
MainConsole.Instance.Commands.AddCommand("Repository", true,
"repo refresh", "repo refresh \"url\"", "Sync with a registered repository",
HandleConsoleGetRepo);
// Remove repository from registry
// Remove repository from registry
MainConsole.Instance.Commands.AddCommand("Repository", true,
"repo remove",
"repo remove \"[url | index]\"",
"Remove repository from registry",
"repo remove \"[url | index]\"",
"Remove repository from registry",
HandleConsoleRemoveRepo);
// Enable repo
// Enable repo
MainConsole.Instance.Commands.AddCommand("Repository", true,
"repo enable", "repo enable \"[url | index]\"",
"Enable registered repository",
"Enable registered repository",
HandleConsoleEnableRepo);
// Disable repo
// Disable repo
MainConsole.Instance.Commands.AddCommand("Repository", true,
"repo disable", "repo disable\"[url | index]\"",
"Disable registered repository",
"Disable registered repository",
HandleConsoleDisableRepo);
// List registered repositories
// List registered repositories
MainConsole.Instance.Commands.AddCommand("Repository", true,
"repo list", "repo list",
"List registered repositories",
"List registered repositories",
HandleConsoleListRepos);
// *
// *
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin info", "plugin info \"plugin index\"","Show detailed information for plugin",
HandleConsoleShowAddinInfo);
// Plugin disable
// Plugin disable
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin disable", "plugin disable \"plugin index\"",
"Disable a plugin",
"Disable a plugin",
HandleConsoleDisablePlugin);
// Enable plugin
// Enable plugin
MainConsole.Instance.Commands.AddCommand("Plugin", true,
"plugin enable", "plugin enable \"plugin index\"",
"Enable the selected plugin plugin",
"Enable the selected plugin plugin",
HandleConsoleEnablePlugin);
}
#region console handlers
// Handle our console commands
//
// Install plugin from registered repository
/// <summary>
/// Handles the console install plugin command. Attempts to install the selected plugin
/// and
/// and
/// </summary>
/// <param name='module'>
/// Module.
@@ -323,7 +323,7 @@ namespace OpenSim.Server.Base
{
if (cmd.Length >= 3)
{
Dictionary<string, object> result = new Dictionary<string, object>();
int ndx = Convert.ToInt16(cmd[2]);
@@ -355,5 +355,5 @@ namespace OpenSim.Server.Base
return;
}
#endregion
}
}
}

View File

@@ -112,7 +112,7 @@ namespace OpenSim.Server.Base
MainServer.Instance = httpServer;
// If https_listener = true, then add an ssl listener on the https_port...
if (ssl_listener == true)
if (ssl_listener == true)
{
uint https_port = (uint)networkConfig.GetInt("https_port", 0);

View File

@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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
// associated with an assembly.
[assembly: AssemblyTitle("OpenSim.Server.Base")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
[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
// 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)]
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//

View File

@@ -31,20 +31,20 @@ namespace OpenSim.Server.Base
{
/// <value>
/// This is the external protocol versions. It is separate from the OpenSimulator project version.
///
///
/// These version numbers should be increased by 1 every time a code
/// change in the Service.Connectors and Server.Handlers, espectively,
/// change in the Service.Connectors and Server.Handlers, espectively,
/// makes the previous OpenSimulator revision incompatible
/// with the new revision.
///
/// with the new revision.
///
/// Changes which are compatible with an older revision (e.g. older revisions experience degraded functionality
/// but not outright failure) do not need a version number increment.
///
///
/// Having this version number allows the grid service to reject connections from regions running a version
/// of the code that is too old.
/// of the code that is too old.
///
/// </value>
// The range of acceptable servers for client-side connectors
public readonly static int ClientProtocolVersionMin = 1;
public readonly static int ClientProtocolVersionMax = 1;

View File

@@ -104,7 +104,7 @@ namespace OpenSim.Server.Base
// libomv, which has a hard-coded path to "." for pinvoke
// to load the openjpeg dll
//
// Will look for a way to fix, but for now this keeps the
// Will look for a way to fix, but for now this keeps the
// confusion to a minimum. this was copied from our region
// plugin loader, we have been doing this in there for a long time.
//
@@ -183,7 +183,7 @@ namespace OpenSim.Server.Base
if(port != 0)
server = MainServer.GetHttpServer(port);
else
else
server = MainServer.Instance;
return server;
@@ -222,19 +222,19 @@ namespace OpenSim.Server.Base
// This is good to debug configuration problems
//if (dllName == string.Empty)
// Util.PrintCallStack();
string className = String.Empty;
// The path for a dynamic plugin will contain ":" on Windows
string[] parts = dllName.Split (new char[] {':'});
if (parts [0].Length > 1)
if (parts [0].Length > 1)
{
dllName = parts [0];
if (parts.Length > 1)
className = parts[1];
}
else
}
else
{
// This is Windows - we must replace the ":" in the path
dllName = String.Format ("{0}:{1}", parts [0], parts [1]);
@@ -242,17 +242,17 @@ namespace OpenSim.Server.Base
className = parts[2];
}
// Handle extra string arguments in a more generic way
if (dllName.Contains("@"))
{
string[] dllNameParts = dllName.Split(new char[] {'@'});
dllName = dllNameParts[dllNameParts.Length - 1];
List<Object> argList = new List<Object>(args);
for (int i = 0 ; i < dllNameParts.Length - 1 ; ++i)
argList.Add(dllNameParts[i]);
// Handle extra string arguments in a more generic way
if (dllName.Contains("@"))
{
string[] dllNameParts = dllName.Split(new char[] {'@'});
dllName = dllNameParts[dllNameParts.Length - 1];
List<Object> argList = new List<Object>(args);
for (int i = 0 ; i < dllNameParts.Length - 1 ; ++i)
argList.Add(dllNameParts[i]);
args = argList.ToArray();
}
args = argList.ToArray();
}
return LoadPlugin<T>(dllName, className, args);
}
@@ -276,10 +276,10 @@ namespace OpenSim.Server.Base
{
if (pluginType.IsPublic)
{
if (className != String.Empty
if (className != String.Empty
&& pluginType.ToString() != pluginType.Namespace + "." + className)
continue;
Type typeInterface = pluginType.GetInterface(interfaceName);
if (typeInterface != null)
@@ -295,8 +295,8 @@ namespace OpenSim.Server.Base
if (!(e is System.MissingMethodException))
{
m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}",
interfaceName,
dllName,
interfaceName,
dllName,
e.InnerException == null ? e.Message : e.InnerException.Message),
e);
}
@@ -479,7 +479,7 @@ namespace OpenSim.Server.Base
XmlDocument doc = new XmlDocument();
doc.LoadXml(data);
XmlNodeList rootL = doc.GetElementsByTagName("ServerResponse");
if (rootL.Count != 1)

View File

@@ -92,7 +92,7 @@ namespace OpenSim.Server.Base
// Check if a prompt was given on the command line
prompt = startupConfig.GetString("prompt", prompt);
// Check for a Log4Net config file on the command line
logConfig =startupConfig.GetString("logconfig", logConfig);
}
@@ -116,7 +116,7 @@ namespace OpenSim.Server.Base
// Merge OpSys env vars
Console.WriteLine("[CONFIG]: Loading environment variables for Config");
Util.MergeEnvironmentToConfig(Config);
// Merge the configuration from the command line into the loaded file
Config.Merge(argvConfig);

View File

@@ -151,27 +151,27 @@ namespace OpenSim.Server.Handlers.Asset
MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
return;
}
AssetBase asset = m_AssetService.Get(assetId.ToString());
if (asset == null)
{
{
MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
return;
return;
}
string fileName = rawAssetId;
if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName))
return;
using (FileStream fs = new FileStream(fileName, FileMode.CreateNew))
{
using (BinaryWriter bw = new BinaryWriter(fs))
{
bw.Write(asset.Data);
}
}
}
MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName);
}

View File

@@ -53,7 +53,7 @@ namespace OpenSim.Server.Handlers.Asset
public AssetServerGetHandler(IAssetService service) :
base("GET", "/assets")
{
m_AssetService = service;
m_AssetService = service;
}
public AssetServerGetHandler(IAssetService service, IServiceAuth auth, string redirectURL) :
@@ -155,7 +155,7 @@ namespace OpenSim.Server.Handlers.Asset
httpResponse.ContentType = "text/plain";
result = new byte[0];
}
if (httpResponse.StatusCode == (int)HttpStatusCode.NotFound && !string.IsNullOrEmpty(m_RedirectURL) && !string.IsNullOrEmpty(id))
{
httpResponse.StatusCode = (int)HttpStatusCode.Redirect;

View File

@@ -52,8 +52,8 @@ namespace OpenSim.Server.Handlers.Asset.Test
UUID assetId = TestHelpers.ParseTail(0x1);
IConfigSource config = new IniConfigSource();
config.AddConfig("AssetService");
IConfigSource config = new IniConfigSource();
config.AddConfig("AssetService");
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
AssetService assetService = new AssetService(config);
@@ -72,7 +72,7 @@ namespace OpenSim.Server.Handlers.Asset.Test
XmlSerializer serializer = new XmlSerializer(typeof(AssetBase));
serializer.Serialize(writer, asset);
writer.Flush();
}
}
buffer.Position = 0;
asph.Handle(null, buffer, null, null);
@@ -87,13 +87,13 @@ namespace OpenSim.Server.Handlers.Asset.Test
{
TestHelpers.InMethod();
IConfigSource config = new IniConfigSource();
config.AddConfig("AssetService");
IConfigSource config = new IniConfigSource();
config.AddConfig("AssetService");
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
AssetService assetService = new AssetService(config);
AssetServerPostHandler asph = new AssetServerPostHandler(assetService);
AssetServerPostHandler asph = new AssetServerPostHandler(assetService);
MemoryStream buffer = new MemoryStream();
byte[] badData = new byte[] { 0x48, 0x65, 0x6c, 0x6c, 0x6f };

View File

@@ -132,41 +132,41 @@ namespace OpenSim.Server.Handlers.Authentication
case "authenticate":
if (!request.ContainsKey("PASSWORD"))
return FailureResult();
token = m_AuthenticationService.Authenticate(principalID, request["PASSWORD"].ToString(), lifetime);
if (token != String.Empty)
return SuccessResult(token);
return FailureResult();
case "setpassword":
if (!m_AllowSetPassword)
return FailureResult();
if (!request.ContainsKey("PASSWORD"))
return FailureResult();
if (m_AuthenticationService.SetPassword(principalID, request["PASSWORD"].ToString()))
return SuccessResult();
else
return FailureResult();
case "verify":
if (!request.ContainsKey("TOKEN"))
return FailureResult();
if (m_AuthenticationService.Verify(principalID, request["TOKEN"].ToString(), lifetime))
return SuccessResult();
return FailureResult();
case "release":
if (!request.ContainsKey("TOKEN"))
return FailureResult();
if (m_AuthenticationService.Release(principalID, request["TOKEN"].ToString()))
return SuccessResult();
return FailureResult();
case "getauthinfo":

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Server.Handlers.Authentication
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
private IAuthenticationService m_AuthenticationService;
private IUserAccountService m_UserAccountService;
private string m_ConfigName = "OpenIdService";

View File

@@ -178,14 +178,14 @@ namespace OpenSim.Server.Handlers.Authentication
";
/// <summary>Page shown for an invalid OpenID identity</summary>
const string INVALID_OPENID_PAGE =
const string INVALID_OPENID_PAGE =
@"<html><head><title>Identity not found</title></head>
<body>Invalid OpenID identity</body></html>";
/// <summary>Page shown if the OpenID endpoint is requested directly</summary>
const string ENDPOINT_PAGE =
@"<html><head><title>OpenID Endpoint</title></head><body>
This is an OpenID server endpoint, not a human-readable resource.
This is an OpenID server endpoint, not a human-readable resource.
For more information, see <a href='http://openid.net/'>http://openid.net/</a>.
</body></html>";
@@ -241,7 +241,7 @@ For more information, see <a href='http://openid.net/'>http://openid.net/</a>.
// Check for form POST data
if (passwordValues != null && passwordValues.Length == 1)
{
if (account != null &&
if (account != null &&
(m_authenticationService.Authenticate(account.PrincipalID,Util.Md5Hash(passwordValues[0]), 30) != string.Empty))
authRequest.IsAuthenticated = true;
else

View File

@@ -67,7 +67,7 @@ namespace OpenSim.Server.Handlers.Authorization
xs = new XmlSerializer(typeof(AuthorizationResponse));
return ServerUtils.SerializeResult(xs, result);
}
}
}

View File

@@ -175,7 +175,7 @@ namespace OpenSim.Server.Handlers.Avatar
request.Remove("METHOD");
request.Remove("UserID");
}
byte[] SetItems(Dictionary<string, object> request)
{
UUID user = UUID.Zero;
@@ -196,7 +196,7 @@ namespace OpenSim.Server.Handlers.Avatar
names = _names.ToArray();
List<string> _values = (List<string>)request["Values"];
values = _values.ToArray();
if (m_AvatarService.SetItems(user, names, values))
return SuccessResult();
@@ -227,7 +227,7 @@ namespace OpenSim.Server.Handlers.Avatar
}
private byte[] SuccessResult()
{
XmlDocument doc = new XmlDocument();

View File

@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.BakedTextures
ServerUtils.LoadPlugin<IBakedTextureService>(assetService, args);
IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);
server.AddStreamHandler(new BakesServerGetHandler(m_BakesService, auth));
server.AddStreamHandler(new BakesServerPostHandler(m_BakesService, auth));
}

View File

@@ -72,7 +72,7 @@ namespace OpenSim.Server.Handlers.Base
// We call this from our plugin module to get our configuration
public IConfig GetConfig()
{
{
IConfig config = null;
config = ServerUtils.GetConfig(ConfigFile, ConfigName);
@@ -96,12 +96,12 @@ namespace OpenSim.Server.Handlers.Base
// We get our remote initial configuration for bootstrapping in case
// we have no configuration in our main file or in an existing
// modular config file. This is the last resort to bootstrap the
// modular config file. This is the last resort to bootstrap the
// configuration, likely a new plugin loading for the first time.
private IConfigSource GetConfigSource()
{
IConfigSource source = null;
source = ServerUtils.LoadInitialConfig(ConfigURL);
if (source == null)

View File

@@ -83,10 +83,10 @@ namespace OpenSim.Server.Handlers.Grid
{
_info["login"]
= String.Format(
"http://127.0.0.1:{0}/",
"http://127.0.0.1:{0}/",
netCfg.GetString(
"http_listener_port", ConfigSettings.DefaultRegionHttpPort.ToString()));
IssueWarning();
}
else
@@ -99,7 +99,7 @@ namespace OpenSim.Server.Handlers.Grid
{
_log.Warn("[GRID INFO SERVICE]: Cannot get grid info from config source, using minimal defaults");
}
_log.DebugFormat("[GRID INFO SERVICE]: Grid info service initialized with {0} keys", _info.Count);
}
@@ -107,7 +107,7 @@ namespace OpenSim.Server.Handlers.Grid
{
_log.Warn("[GRID INFO SERVICE]: found no [GridInfo] section in your configuration files");
_log.Warn("[GRID INFO SERVICE]: trying to guess sensible defaults, you might want to provide better ones:");
foreach (string k in _info.Keys)
{
_log.WarnFormat("[GRID INFO SERVICE]: {0}: {1}", k, _info[k]);
@@ -181,7 +181,7 @@ namespace OpenSim.Server.Handlers.Grid
new string[] { "Startup", "Hypergrid" }, String.Empty);
if (!String.IsNullOrEmpty(HomeURI))
map["home"] = OSD.FromString(HomeURI);
map["home"] = OSD.FromString(HomeURI);
else // Legacy. Remove soon!
{
IConfig cfg = m_Config.Configs["LoginService"];

View File

@@ -126,7 +126,7 @@ namespace OpenSim.Server.Handlers.Grid
case "get_grid_extra_features":
return GetGridExtraFeatures(request);
}
m_log.DebugFormat("[GRID HANDLER]: unknown method request {0}", method);
}
catch (Exception e)
@@ -590,22 +590,22 @@ namespace OpenSim.Server.Handlers.Grid
int flags = m_GridService.GetRegionFlags(scopeID, regionID);
// m_log.DebugFormat("[GRID HANDLER]: flags for region {0}: {1}", regionID, flags);
Dictionary<string, object> result = new Dictionary<string, object>();
Dictionary<string, object> result = new Dictionary<string, object>();
result["result"] = flags.ToString();
string xmlString = ServerUtils.BuildXmlResponse(result);
//m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
return Util.UTF8NoBomEncoding.GetBytes(xmlString);
}
byte[] GetGridExtraFeatures(Dictionary<string, object> request)
{
Dictionary<string, object> result = new Dictionary<string, object> ();
Dictionary<string, object> extraFeatures = m_GridService.GetExtraFeatures ();
foreach (string key in extraFeatures.Keys)
foreach (string key in extraFeatures.Keys)
{
result [key] = extraFeatures [key];
}

View File

@@ -52,7 +52,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentPostHandler
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IGatekeeperService m_GatekeeperService;
public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) : base("/foreignagent")

View File

@@ -48,7 +48,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
}
// Called from standalone configurations
public HGFriendsServerConnector(IConfigSource config, IHttpServer server, string configName, IFriendsSimConnector localConn)
public HGFriendsServerConnector(IConfigSource config, IHttpServer server, string configName, IFriendsSimConnector localConn)
: base(config, server, configName)
{
if (configName != string.Empty)

View File

@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
m_UserAgentService = uas;
m_FriendsLocalSimConnector = friendsConn;
m_log.DebugFormat("[HGFRIENDS HANDLER]: HGFriendsServerPostHandler is On ({0})",
m_log.DebugFormat("[HGFRIENDS HANDLER]: HGFriendsServerPostHandler is On ({0})",
(m_FriendsLocalSimConnector == null ? "robust" : "standalone"));
if (m_TheService == null)
@@ -105,24 +105,24 @@ namespace OpenSim.Server.Handlers.Hypergrid
case "validate_friendship_offered":
return ValidateFriendshipOffered(request);
case "statusnotification":
return StatusNotification(request);
/*
case "friendship_approved":
return FriendshipApproved(request);
case "friendship_denied":
return FriendshipDenied(request);
case "friendship_terminated":
return FriendshipTerminated(request);
case "grant_rights":
return GrantRights(request);
*/
}
m_log.DebugFormat("[HGFRIENDS HANDLER]: unknown method {0}", method);
}
catch (Exception e)

View File

@@ -55,7 +55,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
public InstantMessageServerConnector(IConfigSource config, IHttpServer server) :
this(config, server, (IInstantMessageSimConnector)null)
{
{
}
public InstantMessageServerConnector(IConfigSource config, IHttpServer server, string configName) :

View File

@@ -63,14 +63,14 @@ namespace OpenSim.Server.Handlers.Hypergrid
public UserAgentServerConnector(IConfigSource config, IHttpServer server) :
this(config, server, (IFriendsSimConnector)null)
{
{
}
public UserAgentServerConnector(IConfigSource config, IHttpServer server, string configName) :
this(config, server)
{
}
public UserAgentServerConnector(IConfigSource config, IHttpServer server, IFriendsSimConnector friendsConnector) :
base(config, server, String.Empty)
{

View File

@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.Inventory
{
if (configName != string.Empty)
m_ConfigName = configName;
IConfig serverConfig = config.Configs[m_ConfigName];
if (serverConfig == null)
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
@@ -92,7 +92,7 @@ namespace OpenSim.Server.Handlers.Inventory
m_httpServer.AddStreamHandler(
new RestDeserialiseSecureHandler<Guid, InventoryCollection>(
"POST", "/GetFolderContent/", GetFolderContent, CheckAuthSession));
m_httpServer.AddStreamHandler(
new RestDeserialiseSecureHandler<InventoryFolderBase, bool>(
"POST", "/UpdateFolder/", m_InventoryService.UpdateFolder, CheckAuthSession));
@@ -151,7 +151,7 @@ namespace OpenSim.Server.Handlers.Inventory
m_httpServer.AddStreamHandler(new InventoryServerMoveItemsHandler(m_InventoryService));
// for persistent active gestures
m_httpServer.AddStreamHandler(
new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>>

View File

@@ -293,7 +293,7 @@ namespace OpenSim.Server.Handlers.Inventory
result["FID"] = icoll.FolderID.ToString();
result["VERSION"] = icoll.Version.ToString();
Dictionary<string, object> folders = new Dictionary<string, object>();
int i = 0;
int i = 0;
if (icoll.Folders != null)
{
foreach (InventoryFolderBase f in icoll.Folders)
@@ -407,7 +407,7 @@ namespace OpenSim.Server.Handlers.Inventory
}
}
result["ITEMS"] = sitems;
string xmlString = ServerUtils.BuildXmlResponse(result);
//m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);

View File

@@ -54,7 +54,7 @@ namespace OpenSim.Server.Handlers.Land
m_log.Error("[LAND IN CONNECTOR]: Land service was not provided");
return;
}
//bool authentication = neighbourConfig.GetBoolean("RequireAuthentication", false);
//if (authentication)
// m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>();

View File

@@ -53,7 +53,7 @@ namespace OpenSim.Server.Handlers.Login
private ILoginService m_LocalService;
private bool m_Proxy;
public LLLoginHandlers(ILoginService service, bool hasProxy)
{
@@ -136,7 +136,7 @@ namespace OpenSim.Server.Handlers.Login
bool LibOMVclient = false;
if (request.Params.Count > 4 && (string)request.Params[4] == "gridproxy")
LibOMVclient = true;
LoginResponse reply = null;
reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, clientVersion, channel, mac, id0, remoteClient, LibOMVclient);
@@ -279,11 +279,11 @@ namespace OpenSim.Server.Handlers.Login
sock.Close("success");
}
};
sock.HandshakeAndUpgrade();
}
private XmlRpcResponse FailedXMLRPCResponse()
{

View File

@@ -98,7 +98,7 @@ namespace OpenSim.Server.Handlers.Login
m_DosProtectionOptions.ForgetTimeSpan =
TimeSpan.FromMilliseconds(serverConfig.GetInt("DOSForgiveClientAfterMS", 120000));
m_DosProtectionOptions.ReportingName = "LOGINDOSPROTECTION";
return loginService;
}
@@ -106,7 +106,7 @@ namespace OpenSim.Server.Handlers.Login
private void InitializeHandlers(IHttpServer server)
{
LLLoginHandlers loginHandlers = new LLLoginHandlers(m_LoginService, m_Proxy);
server.AddXmlRPCHandler("login_to_simulator",
server.AddXmlRPCHandler("login_to_simulator",
new XmlRpcBasicDOSProtector(loginHandlers.HandleXMLRPCLogin,loginHandlers.HandleXMLRPCLoginBlocked,
m_DosProtectionOptions).Process, false);
server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false);

View File

@@ -148,7 +148,7 @@ namespace OpenSim.Server.Handlers.MapImage
}
else
{
m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}",
m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}",
ipAddr, x, y);
return FailureResult("Region not found at given coordinates");
}

View File

@@ -141,7 +141,7 @@ namespace OpenSim.Server.Handlers.MapImage
}
else
{
m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}",
m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}",
ipAddr, x, y);
return FailureResult("Region not found at given coordinates");
}

View File

@@ -150,7 +150,7 @@ namespace OpenSim.Server.Handlers.Neighbour
// Finally!
GridRegion thisRegion = m_NeighbourService.HelloNeighbour(regionhandle, aRegion);
OSDMap resp = new OSDMap(1);
if (thisRegion != null)

View File

@@ -55,7 +55,7 @@ namespace OpenSim.Server.Handlers.Neighbour
m_log.Error("[NEIGHBOUR IN CONNECTOR]: neighbour service was not provided");
return;
}
//bool authentication = neighbourConfig.GetBoolean("RequireAuthentication", false);
//if (authentication)
// m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>();

View File

@@ -158,7 +158,7 @@ namespace OpenSim.Server.Handlers.Presence
return FailureResult();
}
byte[] Report(Dictionary<string, object> request)
{
UUID session = UUID.Zero;
@@ -241,7 +241,7 @@ namespace OpenSim.Server.Handlers.Presence
}
string xmlString = ServerUtils.BuildXmlResponse(result);
//m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
return Util.UTF8NoBomEncoding.GetBytes(xmlString);
}

View File

@@ -39,8 +39,8 @@ namespace OpenSim.Server.Handlers.Profiles
{
public class UserProfilesConnector: ServiceConnector
{
// static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// Our Local Module
public IUserProfilesService ServiceModule
{
@@ -83,7 +83,7 @@ namespace OpenSim.Server.Handlers.Profiles
Object[] args = new Object[] { config, ConfigName };
ServiceModule = ServerUtils.LoadPlugin<IUserProfilesService>(service, args);
JsonRpcProfileHandlers handler = new JsonRpcProfileHandlers(ServiceModule);
Server.AddJsonRPCHandler("avatarclassifiedsrequest", handler.AvatarClassifiedsRequest);

View File

@@ -48,17 +48,17 @@ namespace OpenSim.Server.Handlers
static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
public IUserProfilesService Service
{
get; private set;
}
public JsonRpcProfileHandlers(IUserProfilesService service)
{
Service = service;
}
#region Classifieds
/// <summary>
/// Request avatar's classified ads.
@@ -80,17 +80,17 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Classified Request");
return false;
}
OSDMap request = (OSDMap)json["params"];
UUID creatorId = new UUID(request["creatorId"].AsString());
OSDArray data = (OSDArray) Service.AvatarClassifiedsRequest(creatorId);
response.Result = data;
return true;
}
public bool ClassifiedUpdate(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -100,7 +100,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Classified Update Request");
return false;
}
string result = string.Empty;
UserClassifiedAdd ad = new UserClassifiedAdd();
object Ad = (object)ad;
@@ -110,12 +110,12 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(ad);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
return false;
}
public bool ClassifiedDelete(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -124,10 +124,10 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Classified Delete Request");
return false;
}
OSDMap request = (OSDMap)json["params"];
UUID classifiedId = new UUID(request["classifiedId"].AsString());
if (Service.ClassifiedDelete(classifiedId))
return true;
@@ -135,7 +135,7 @@ namespace OpenSim.Server.Handlers
response.Error.Message = "data error removing record";
return false;
}
public bool ClassifiedInfoRequest(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -145,7 +145,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Classified Info Request");
return false;
}
string result = string.Empty;
UserClassifiedAdd ad = new UserClassifiedAdd();
object Ad = (object)ad;
@@ -155,13 +155,13 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(ad);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
return false;
}
#endregion Classifieds
#region Picks
public bool AvatarPicksRequest(OSDMap json, ref JsonRpcResponse response)
{
@@ -171,17 +171,17 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Picks Request");
return false;
}
OSDMap request = (OSDMap)json["params"];
UUID creatorId = new UUID(request["creatorId"].AsString());
OSDArray data = (OSDArray) Service.AvatarPicksRequest(creatorId);
response.Result = data;
return true;
}
public bool PickInfoRequest(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -191,7 +191,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Picks Info Request");
return false;
}
string result = string.Empty;
UserProfilePick pick = new UserProfilePick();
object Pick = (object)pick;
@@ -201,12 +201,12 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(pick);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
return false;
}
public bool PicksUpdate(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -216,7 +216,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Picks Update Request");
return false;
}
string result = string.Empty;
UserProfilePick pick = new UserProfilePick();
object Pick = (object)pick;
@@ -226,13 +226,13 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(pick);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = "unable to update pick";
return false;
}
public bool PicksDelete(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -241,18 +241,18 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Picks Delete Request");
return false;
}
OSDMap request = (OSDMap)json["params"];
UUID pickId = new UUID(request["pickId"].AsString());
if(Service.PicksDelete(pickId))
return true;
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = "data error removing record";
return false;
}
#endregion Picks
#region Notes
public bool AvatarNotesRequest(OSDMap json, ref JsonRpcResponse response)
{
@@ -277,7 +277,7 @@ namespace OpenSim.Server.Handlers
response.Error.Message = "Error reading notes";
return false;
}
public bool NotesUpdate(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -287,7 +287,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Notes Update Request");
return false;
}
string result = string.Empty;
UserProfileNotes note = new UserProfileNotes();
object Notes = (object) note;
@@ -300,7 +300,7 @@ namespace OpenSim.Server.Handlers
return true;
}
#endregion Notes
#region Profile Properties
public bool AvatarPropertiesRequest(OSDMap json, ref JsonRpcResponse response)
{
@@ -311,7 +311,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Properties Request");
return false;
}
string result = string.Empty;
UserProfileProperties props = new UserProfileProperties();
object Props = (object)props;
@@ -321,12 +321,12 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(props);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
return false;
}
public bool AvatarPropertiesUpdate(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -336,7 +336,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Properties Update Request");
return false;
}
string result = string.Empty;
UserProfileProperties props = new UserProfileProperties();
object Props = (object)props;
@@ -346,13 +346,13 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(props);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
return false;
}
#endregion Profile Properties
#region Interests
public bool AvatarInterestsUpdate(OSDMap json, ref JsonRpcResponse response)
{
@@ -363,7 +363,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Interests Update Request");
return false;
}
string result = string.Empty;
UserProfileProperties props = new UserProfileProperties();
object Props = (object)props;
@@ -373,7 +373,7 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(props);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
return false;
@@ -399,7 +399,7 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(prefs);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
// m_log.InfoFormat("[PROFILES]: User preferences request error - {0}", response.Error.Message);
@@ -415,7 +415,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("User Preferences Update Request");
return false;
}
string result = string.Empty;
UserPreferences prefs = new UserPreferences();
object Prefs = (object)prefs;
@@ -425,7 +425,7 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(prefs);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
m_log.InfoFormat("[PROFILES]: User preferences update error - {0}", response.Error.Message);
@@ -443,13 +443,13 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("Avatar Image Assets Request");
return false;
}
OSDMap request = (OSDMap)json["params"];
UUID avatarId = new UUID(request["avatarId"].AsString());
OSDArray data = (OSDArray) Service.AvatarImageAssetsRequest(avatarId);
response.Result = data;
return true;
}
#endregion Utiltiy
@@ -464,7 +464,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("User Application Service URL Request: No Parameters!");
return false;
}
string result = string.Empty;
UserAppData props = new UserAppData();
object Props = (object)props;
@@ -475,15 +475,15 @@ namespace OpenSim.Server.Handlers
res["result"] = OSD.FromString("success");
res["token"] = OSD.FromString (result);
response.Result = res;
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
return false;
}
public bool UpdateUserAppData(OSDMap json, ref JsonRpcResponse response)
{
if(!json.ContainsKey("params"))
@@ -493,7 +493,7 @@ namespace OpenSim.Server.Handlers
m_log.DebugFormat ("User App Data Update Request");
return false;
}
string result = string.Empty;
UserAppData props = new UserAppData();
object Props = (object)props;
@@ -503,7 +503,7 @@ namespace OpenSim.Server.Handlers
response.Result = OSD.SerializeMembers(props);
return true;
}
response.Error.Code = ErrorCode.InternalError;
response.Error.Message = string.Format("{0}", result);
return false;

View File

@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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
// associated with an assembly.
[assembly: AssemblyTitle("OpenSim.Server.Handlers")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
[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
// 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)]
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//

View File

@@ -190,7 +190,7 @@ namespace OpenSim.Server.Handlers.Simulation
{
// If there is no version in the packet at all we're looking at 0.6 or
// even more ancient. Refuse it.
if(theirVersion == 0f)
if(theirVersion == 0f)
{
resp["success"] = OSD.FromBoolean(false);
resp["reason"] = OSD.FromString("Your region is running a old version of opensim no longer supported. Consider updating it");
@@ -199,8 +199,8 @@ namespace OpenSim.Server.Handlers.Simulation
}
version = theirVersion;
if (version < VersionInfo.SimulationServiceVersionAcceptedMin ||
if (version < VersionInfo.SimulationServiceVersionAcceptedMin ||
version > VersionInfo.SimulationServiceVersionAcceptedMax )
{
resp["success"] = OSD.FromBoolean(false);
@@ -274,7 +274,7 @@ namespace OpenSim.Server.Handlers.Simulation
OSDArray featuresWanted = new OSDArray();
foreach (UUID feature in features)
featuresWanted.Add(OSD.FromString(feature.ToString()));
resp["features"] = featuresWanted;
// We must preserve defaults here, otherwise a false "success" will not be put into the JSON map!
@@ -460,7 +460,7 @@ namespace OpenSim.Server.Handlers.Simulation
source.RegionLocY = Int32.Parse(args["source_y"].AsString());
source.RegionName = args["source_name"].AsString();
source.RegionID = UUID.Parse(args["source_uuid"].AsString());
if (args.ContainsKey("source_server_uri"))
source.RawServerURI = args["source_server_uri"].AsString();
else

View File

@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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
// associated with an assembly.
[assembly: AssemblyTitle("Robust")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
[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
// 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)]
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//

View File

@@ -82,7 +82,7 @@ namespace OpenSim.Server
ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
m_Server = new HttpServerBase("R.O.B.U.S.T.", args);
string registryLocation;
IConfig serverConfig = m_Server.Config.Configs["Startup"];
@@ -97,7 +97,7 @@ namespace OpenSim.Server
string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
registryLocation = serverConfig.GetString("RegistryLocation",".");
IConfig servicesConfig = m_Server.Config.Configs["ServiceList"];