From bf4d701cd5ae74dfc0d52feddee1614b93f5a569 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Fri, 27 Mar 2009 12:49:27 +0000 Subject: From: Alan Webb Fixed problem with REST services caused by changes to the OpenSim core code base - the comms manager had been 'modularized'. Also added additional debugging to RemoteAdmin interface. --- OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs | 38 ++++++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index 8ab9fd2..62e18c4 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs @@ -69,11 +69,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory internal static IRestHandler Plugin = null; internal static OpenSimBase main = null; - internal static CommunicationsManager Comms = null; - internal static IInventoryServices InventoryServices = null; - internal static IUserService UserServices = null; - internal static IAvatarService AvatarServices = null; - internal static IAssetCache AssetServices = null; internal static string Prefix = null; internal static IConfig Config = null; internal static string GodKey = null; @@ -88,6 +83,39 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory internal static int DumpLineSize = 32; // Should be a multiple of 16 or (possibly) 4 /// + /// These are all dependent upon the Comms manager + /// being initialized. So they have to be properties + /// because the comms manager is now a module and is + /// not guaranteed to be there when the rest handler + /// initializes. + /// + + internal static CommunicationsManager Comms + { + get { return main.CommunicationsManager; } + } + + internal static IInventoryServices InventoryServices + { + get { return Comms.InventoryService; } + } + + internal static IUserService UserServices + { + get { return Comms.UserService; } + } + + internal static IAvatarService AvatarServices + { + get { return Comms.AvatarService; } + } + + internal static IAssetCache AssetServices + { + get { return Comms.AssetCache; } + } + + /// /// HTTP requires that status information be generated for PUT /// and POST opertaions. This is in support of that. The /// operation verb gets substituted into the first string, -- cgit v1.1