diff options
Diffstat (limited to 'OpenSim')
9 files changed, 63 insertions, 56 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 201bc70..89aa911 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
46 | /// Connects to the SimianGrid asset service | 46 | /// Connects to the SimianGrid asset service |
47 | /// </summary> | 47 | /// </summary> |
48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
49 | public class SimianAssetServiceConnector : IAssetService | 49 | public class SimianAssetServiceConnector : IAssetService, ISharedRegionModule |
50 | { | 50 | { |
51 | private static readonly ILog m_log = | 51 | private static readonly ILog m_log = |
52 | LogManager.GetLogger( | 52 | LogManager.GetLogger( |
@@ -73,9 +73,9 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
73 | 73 | ||
74 | public SimianAssetServiceConnector() { } | 74 | public SimianAssetServiceConnector() { } |
75 | public string Name { get { return "SimianAssetServiceConnector"; } } | 75 | public string Name { get { return "SimianAssetServiceConnector"; } } |
76 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IAssetService>(this); } | 76 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAssetService>(this); } } |
77 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IAssetService>(this); } | 77 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAssetService>(this); } } |
78 | 78 | ||
79 | #endregion ISharedRegionModule | 79 | #endregion ISharedRegionModule |
80 | 80 | ||
81 | public SimianAssetServiceConnector(IConfigSource source) | 81 | public SimianAssetServiceConnector(IConfigSource source) |
@@ -88,8 +88,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
88 | IConfig gridConfig = source.Configs["AssetService"]; | 88 | IConfig gridConfig = source.Configs["AssetService"]; |
89 | if (gridConfig == null) | 89 | if (gridConfig == null) |
90 | { | 90 | { |
91 | m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini"); | 91 | m_log.Info("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini, skipping SimianAssetServiceConnector"); |
92 | throw new Exception("Asset connector init error"); | 92 | return; |
93 | } | 93 | } |
94 | 94 | ||
95 | string serviceUrl = gridConfig.GetString("AssetServerURI"); | 95 | string serviceUrl = gridConfig.GetString("AssetServerURI"); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs index 25e04d7..55aca36 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
44 | /// Connects authentication/authorization to the SimianGrid backend | 44 | /// Connects authentication/authorization to the SimianGrid backend |
45 | /// </summary> | 45 | /// </summary> |
46 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 46 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
47 | public class SimianAuthenticationServiceConnector : IAuthenticationService | 47 | public class SimianAuthenticationServiceConnector : IAuthenticationService, ISharedRegionModule |
48 | { | 48 | { |
49 | private static readonly ILog m_log = | 49 | private static readonly ILog m_log = |
50 | LogManager.GetLogger( | 50 | LogManager.GetLogger( |
@@ -61,8 +61,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
61 | 61 | ||
62 | public SimianAuthenticationServiceConnector() { } | 62 | public SimianAuthenticationServiceConnector() { } |
63 | public string Name { get { return "SimianAuthenticationServiceConnector"; } } | 63 | public string Name { get { return "SimianAuthenticationServiceConnector"; } } |
64 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IAuthenticationService>(this); } | 64 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAuthenticationService>(this); } } |
65 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IAuthenticationService>(this); } | 65 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAuthenticationService>(this); } } |
66 | 66 | ||
67 | #endregion ISharedRegionModule | 67 | #endregion ISharedRegionModule |
68 | 68 | ||
@@ -76,8 +76,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
76 | IConfig assetConfig = source.Configs["AuthenticationService"]; | 76 | IConfig assetConfig = source.Configs["AuthenticationService"]; |
77 | if (assetConfig == null) | 77 | if (assetConfig == null) |
78 | { | 78 | { |
79 | m_log.Error("[AUTH CONNECTOR]: AuthenticationService missing from OpenSim.ini"); | 79 | m_log.Info("[AUTH CONNECTOR]: AuthenticationService missing from OpenSim.ini, skipping SimianAuthenticationServiceConnector"); |
80 | throw new Exception("Authentication connector init error"); | 80 | return; |
81 | } | 81 | } |
82 | 82 | ||
83 | string serviceURI = assetConfig.GetString("AuthenticationServerURI"); | 83 | string serviceURI = assetConfig.GetString("AuthenticationServerURI"); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index 08403b9..b5cef0c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
48 | /// Connects avatar appearance data to the SimianGrid backend | 48 | /// Connects avatar appearance data to the SimianGrid backend |
49 | /// </summary> | 49 | /// </summary> |
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
51 | public class SimianAvatarServiceConnector : IAvatarService | 51 | public class SimianAvatarServiceConnector : IAvatarService, ISharedRegionModule |
52 | { | 52 | { |
53 | private static readonly ILog m_log = | 53 | private static readonly ILog m_log = |
54 | LogManager.GetLogger( | 54 | LogManager.GetLogger( |
@@ -66,8 +66,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
66 | 66 | ||
67 | public SimianAvatarServiceConnector() { } | 67 | public SimianAvatarServiceConnector() { } |
68 | public string Name { get { return "SimianAvatarServiceConnector"; } } | 68 | public string Name { get { return "SimianAvatarServiceConnector"; } } |
69 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IAvatarService>(this); } | 69 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAvatarService>(this); } } |
70 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IAvatarService>(this); } | 70 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAvatarService>(this); } } |
71 | 71 | ||
72 | #endregion ISharedRegionModule | 72 | #endregion ISharedRegionModule |
73 | 73 | ||
@@ -81,8 +81,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
81 | IConfig gridConfig = source.Configs["AvatarService"]; | 81 | IConfig gridConfig = source.Configs["AvatarService"]; |
82 | if (gridConfig == null) | 82 | if (gridConfig == null) |
83 | { | 83 | { |
84 | m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini"); | 84 | m_log.Info("[AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini, skipping SimianAvatarServiceConnector"); |
85 | throw new Exception("Avatar connector init error"); | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
88 | string serviceUrl = gridConfig.GetString("AvatarServerURI"); | 88 | string serviceUrl = gridConfig.GetString("AvatarServerURI"); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs index 856381d..a569e91 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
47 | /// Stores and retrieves friend lists from the SimianGrid backend | 47 | /// Stores and retrieves friend lists from the SimianGrid backend |
48 | /// </summary> | 48 | /// </summary> |
49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
50 | public class SimianFriendsServiceConnector : IFriendsService | 50 | public class SimianFriendsServiceConnector : IFriendsService, ISharedRegionModule |
51 | { | 51 | { |
52 | private static readonly ILog m_log = | 52 | private static readonly ILog m_log = |
53 | LogManager.GetLogger( | 53 | LogManager.GetLogger( |
@@ -64,8 +64,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
64 | 64 | ||
65 | public SimianFriendsServiceConnector() { } | 65 | public SimianFriendsServiceConnector() { } |
66 | public string Name { get { return "SimianFriendsServiceConnector"; } } | 66 | public string Name { get { return "SimianFriendsServiceConnector"; } } |
67 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IFriendsService>(this); } | 67 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IFriendsService>(this); } } |
68 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IFriendsService>(this); } | 68 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IFriendsService>(this); } } |
69 | 69 | ||
70 | #endregion ISharedRegionModule | 70 | #endregion ISharedRegionModule |
71 | 71 | ||
@@ -79,8 +79,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
79 | IConfig assetConfig = source.Configs["FriendsService"]; | 79 | IConfig assetConfig = source.Configs["FriendsService"]; |
80 | if (assetConfig == null) | 80 | if (assetConfig == null) |
81 | { | 81 | { |
82 | m_log.Error("[FRIENDS CONNECTOR]: FriendsService missing from OpenSim.ini"); | 82 | m_log.Info("[FRIENDS CONNECTOR]: FriendsService missing from OpenSim.ini, skipping SimianFriendsServiceConnector"); |
83 | throw new Exception("Friends connector init error"); | 83 | return; |
84 | } | 84 | } |
85 | 85 | ||
86 | string serviceURI = assetConfig.GetString("FriendsServerURI"); | 86 | string serviceURI = assetConfig.GetString("FriendsServerURI"); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index c375076..2e600f0 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
51 | /// backend | 51 | /// backend |
52 | /// </summary> | 52 | /// </summary> |
53 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 53 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
54 | public class SimianGridServiceConnector : IGridService | 54 | public class SimianGridServiceConnector : IGridService, ISharedRegionModule |
55 | { | 55 | { |
56 | private static readonly ILog m_log = | 56 | private static readonly ILog m_log = |
57 | LogManager.GetLogger( | 57 | LogManager.GetLogger( |
@@ -68,8 +68,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
68 | 68 | ||
69 | public SimianGridServiceConnector() { } | 69 | public SimianGridServiceConnector() { } |
70 | public string Name { get { return "SimianGridServiceConnector"; } } | 70 | public string Name { get { return "SimianGridServiceConnector"; } } |
71 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IGridService>(this); } | 71 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IGridService>(this); } } |
72 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IGridService>(this); } | 72 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IGridService>(this); } } |
73 | 73 | ||
74 | #endregion ISharedRegionModule | 74 | #endregion ISharedRegionModule |
75 | 75 | ||
@@ -83,8 +83,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
83 | IConfig gridConfig = source.Configs["GridService"]; | 83 | IConfig gridConfig = source.Configs["GridService"]; |
84 | if (gridConfig == null) | 84 | if (gridConfig == null) |
85 | { | 85 | { |
86 | m_log.Error("[GRID CONNECTOR]: GridService missing from OpenSim.ini"); | 86 | m_log.Info("[GRID CONNECTOR]: GridService missing from OpenSim.ini, skipping SimianGridServiceConnector"); |
87 | throw new Exception("Grid connector init error"); | 87 | return; |
88 | } | 88 | } |
89 | 89 | ||
90 | string serviceUrl = gridConfig.GetString("GridServerURI"); | 90 | string serviceUrl = gridConfig.GetString("GridServerURI"); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 9879295..a50ecbc 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
61 | /// Connects avatar inventories to the SimianGrid backend | 61 | /// Connects avatar inventories to the SimianGrid backend |
62 | /// </summary> | 62 | /// </summary> |
63 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 63 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
64 | public class SimianInventoryServiceConnector : IInventoryService | 64 | public class SimianInventoryServiceConnector : IInventoryService, ISharedRegionModule |
65 | { | 65 | { |
66 | private static readonly ILog m_log = | 66 | private static readonly ILog m_log = |
67 | LogManager.GetLogger( | 67 | LogManager.GetLogger( |
@@ -80,8 +80,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
80 | 80 | ||
81 | public SimianInventoryServiceConnector() { } | 81 | public SimianInventoryServiceConnector() { } |
82 | public string Name { get { return "SimianInventoryServiceConnector"; } } | 82 | public string Name { get { return "SimianInventoryServiceConnector"; } } |
83 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IInventoryService>(this); } | 83 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IInventoryService>(this); } } |
84 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IInventoryService>(this); } | 84 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IInventoryService>(this); } } |
85 | 85 | ||
86 | #endregion ISharedRegionModule | 86 | #endregion ISharedRegionModule |
87 | 87 | ||
@@ -95,8 +95,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
95 | IConfig gridConfig = source.Configs["InventoryService"]; | 95 | IConfig gridConfig = source.Configs["InventoryService"]; |
96 | if (gridConfig == null) | 96 | if (gridConfig == null) |
97 | { | 97 | { |
98 | m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); | 98 | m_log.Info("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini, skipping SimianInventoryServiceConnector"); |
99 | throw new Exception("Inventory connector init error"); | 99 | return; |
100 | } | 100 | } |
101 | 101 | ||
102 | string serviceUrl = gridConfig.GetString("InventoryServerURI"); | 102 | string serviceUrl = gridConfig.GetString("InventoryServerURI"); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 45d1824..542093f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
51 | /// message routing) to the SimianGrid backend | 51 | /// message routing) to the SimianGrid backend |
52 | /// </summary> | 52 | /// </summary> |
53 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 53 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
54 | public class SimianPresenceServiceConnector : IPresenceService | 54 | public class SimianPresenceServiceConnector : IPresenceService, ISharedRegionModule |
55 | { | 55 | { |
56 | private static readonly ILog m_log = | 56 | private static readonly ILog m_log = |
57 | LogManager.GetLogger( | 57 | LogManager.GetLogger( |
@@ -70,23 +70,29 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
70 | public string Name { get { return "SimianPresenceServiceConnector"; } } | 70 | public string Name { get { return "SimianPresenceServiceConnector"; } } |
71 | public void AddRegion(Scene scene) | 71 | public void AddRegion(Scene scene) |
72 | { | 72 | { |
73 | scene.RegisterModuleInterface<IPresenceService>(this); | 73 | if (!String.IsNullOrEmpty(m_serverUrl)) |
74 | { | ||
75 | scene.RegisterModuleInterface<IPresenceService>(this); | ||
74 | 76 | ||
75 | scene.EventManager.OnMakeRootAgent += MakeRootAgentHandler; | 77 | scene.EventManager.OnMakeRootAgent += MakeRootAgentHandler; |
76 | scene.EventManager.OnNewClient += NewClientHandler; | 78 | scene.EventManager.OnNewClient += NewClientHandler; |
77 | scene.EventManager.OnSignificantClientMovement += SignificantClientMovementHandler; | 79 | scene.EventManager.OnSignificantClientMovement += SignificantClientMovementHandler; |
78 | 80 | ||
79 | LogoutRegionAgents(scene.RegionInfo.RegionID); | 81 | LogoutRegionAgents(scene.RegionInfo.RegionID); |
82 | } | ||
80 | } | 83 | } |
81 | public void RemoveRegion(Scene scene) | 84 | public void RemoveRegion(Scene scene) |
82 | { | 85 | { |
83 | scene.UnregisterModuleInterface<IPresenceService>(this); | 86 | if (!String.IsNullOrEmpty(m_serverUrl)) |
87 | { | ||
88 | scene.UnregisterModuleInterface<IPresenceService>(this); | ||
84 | 89 | ||
85 | scene.EventManager.OnMakeRootAgent -= MakeRootAgentHandler; | 90 | scene.EventManager.OnMakeRootAgent -= MakeRootAgentHandler; |
86 | scene.EventManager.OnNewClient -= NewClientHandler; | 91 | scene.EventManager.OnNewClient -= NewClientHandler; |
87 | scene.EventManager.OnSignificantClientMovement -= SignificantClientMovementHandler; | 92 | scene.EventManager.OnSignificantClientMovement -= SignificantClientMovementHandler; |
88 | 93 | ||
89 | LogoutRegionAgents(scene.RegionInfo.RegionID); | 94 | LogoutRegionAgents(scene.RegionInfo.RegionID); |
95 | } | ||
90 | } | 96 | } |
91 | 97 | ||
92 | #endregion ISharedRegionModule | 98 | #endregion ISharedRegionModule |
@@ -101,8 +107,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
101 | IConfig gridConfig = source.Configs["PresenceService"]; | 107 | IConfig gridConfig = source.Configs["PresenceService"]; |
102 | if (gridConfig == null) | 108 | if (gridConfig == null) |
103 | { | 109 | { |
104 | m_log.Error("[PRESENCE CONNECTOR]: PresenceService missing from OpenSim.ini"); | 110 | m_log.Info("[PRESENCE CONNECTOR]: PresenceService missing from OpenSim.ini, skipping SimianPresenceServiceConnector"); |
105 | throw new Exception("Presence connector init error"); | 111 | return; |
106 | } | 112 | } |
107 | 113 | ||
108 | string serviceUrl = gridConfig.GetString("PresenceServerURI"); | 114 | string serviceUrl = gridConfig.GetString("PresenceServerURI"); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index 32f17ae..b3b171c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
60 | /// backend | 60 | /// backend |
61 | /// </summary> | 61 | /// </summary> |
62 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 62 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
63 | public class SimianProfiles | 63 | public class SimianProfiles : INonSharedRegionModule |
64 | { | 64 | { |
65 | private static readonly ILog m_log = | 65 | private static readonly ILog m_log = |
66 | LogManager.GetLogger( | 66 | LogManager.GetLogger( |
@@ -69,15 +69,15 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
69 | private string m_serverUrl = String.Empty; | 69 | private string m_serverUrl = String.Empty; |
70 | 70 | ||
71 | #region INonSharedRegionModule | 71 | #region INonSharedRegionModule |
72 | 72 | ||
73 | public Type ReplaceableInterface { get { return null; } } | 73 | public Type ReplaceableInterface { get { return null; } } |
74 | public void RegionLoaded(Scene scene) { } | 74 | public void RegionLoaded(Scene scene) { } |
75 | public void Close() { } | 75 | public void Close() { } |
76 | 76 | ||
77 | public SimianProfiles() { } | 77 | public SimianProfiles() { } |
78 | public string Name { get { return "SimianProfiles"; } } | 78 | public string Name { get { return "SimianProfiles"; } } |
79 | public void AddRegion(Scene scene) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } | 79 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } } |
80 | public void RemoveRegion(Scene scene) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } | 80 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } } |
81 | 81 | ||
82 | #endregion INonSharedRegionModule | 82 | #endregion INonSharedRegionModule |
83 | 83 | ||
@@ -91,8 +91,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
91 | IConfig gridConfig = source.Configs["UserAccountService"]; | 91 | IConfig gridConfig = source.Configs["UserAccountService"]; |
92 | if (gridConfig == null) | 92 | if (gridConfig == null) |
93 | { | 93 | { |
94 | m_log.Error("[PROFILES]: UserAccountService missing from OpenSim.ini"); | 94 | m_log.Error("[PROFILES]: UserAccountService missing from OpenSim.ini, skipping SimianProfiles"); |
95 | throw new Exception("Profiles init error"); | 95 | return; |
96 | } | 96 | } |
97 | 97 | ||
98 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); | 98 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 708ced3..855b213 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | |||
@@ -47,14 +47,14 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
47 | /// users) to the SimianGrid backend | 47 | /// users) to the SimianGrid backend |
48 | /// </summary> | 48 | /// </summary> |
49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
50 | public class SimianUserAccountServiceConnector : IUserAccountService | 50 | public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule |
51 | { | 51 | { |
52 | private static readonly ILog m_log = | 52 | private static readonly ILog m_log = |
53 | LogManager.GetLogger( | 53 | LogManager.GetLogger( |
54 | MethodBase.GetCurrentMethod().DeclaringType); | 54 | MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | private string m_serverUrl = String.Empty; | 56 | private string m_serverUrl = String.Empty; |
57 | private ExpiringCache<UUID, UserAccount> m_accountCache = new ExpiringCache<UUID, UserAccount>(); | 57 | private ExpiringCache<UUID, UserAccount> m_accountCache; |
58 | 58 | ||
59 | #region ISharedRegionModule | 59 | #region ISharedRegionModule |
60 | 60 | ||
@@ -65,8 +65,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
65 | 65 | ||
66 | public SimianUserAccountServiceConnector() { } | 66 | public SimianUserAccountServiceConnector() { } |
67 | public string Name { get { return "SimianUserAccountServiceConnector"; } } | 67 | public string Name { get { return "SimianUserAccountServiceConnector"; } } |
68 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IUserAccountService>(this); } | 68 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IUserAccountService>(this); } } |
69 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IUserAccountService>(this); } | 69 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IUserAccountService>(this); } } |
70 | 70 | ||
71 | #endregion ISharedRegionModule | 71 | #endregion ISharedRegionModule |
72 | 72 | ||
@@ -80,8 +80,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
80 | IConfig assetConfig = source.Configs["UserAccountService"]; | 80 | IConfig assetConfig = source.Configs["UserAccountService"]; |
81 | if (assetConfig == null) | 81 | if (assetConfig == null) |
82 | { | 82 | { |
83 | m_log.Error("[ACCOUNT CONNECTOR]: UserAccountService missing from OpenSim.ini"); | 83 | m_log.Error("[ACCOUNT CONNECTOR]: UserAccountService missing from OpenSim.ini, skipping SimianUserAccountServiceConnector"); |
84 | throw new Exception("User account connector init error"); | 84 | return; |
85 | } | 85 | } |
86 | 86 | ||
87 | string serviceURI = assetConfig.GetString("UserAccountServerURI"); | 87 | string serviceURI = assetConfig.GetString("UserAccountServerURI"); |
@@ -91,6 +91,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
91 | throw new Exception("User account connector init error"); | 91 | throw new Exception("User account connector init error"); |
92 | } | 92 | } |
93 | 93 | ||
94 | m_accountCache = new ExpiringCache<UUID, UserAccount>(); | ||
94 | m_serverUrl = serviceURI; | 95 | m_serverUrl = serviceURI; |
95 | } | 96 | } |
96 | 97 | ||