diff options
author | Melanie | 2010-09-05 19:15:49 +0100 |
---|---|---|
committer | Melanie | 2010-09-05 19:15:49 +0100 |
commit | b9c20fbaa7067e38fe15b8fabb728a0548c273cf (patch) | |
tree | e29dc3c0476ea71eeac7e6baa13c949ac87dcd59 /OpenSim/Services | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | Fix a handful of copypaste errors (diff) | |
download | opensim-SC_OLD-b9c20fbaa7067e38fe15b8fabb728a0548c273cf.zip opensim-SC_OLD-b9c20fbaa7067e38fe15b8fabb728a0548c273cf.tar.gz opensim-SC_OLD-b9c20fbaa7067e38fe15b8fabb728a0548c273cf.tar.bz2 opensim-SC_OLD-b9c20fbaa7067e38fe15b8fabb728a0548c273cf.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services')
9 files changed, 180 insertions, 110 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 3a4f84f..99e6983 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -55,6 +55,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
55 | 55 | ||
56 | private string m_serverUrl = String.Empty; | 56 | private string m_serverUrl = String.Empty; |
57 | private IImprovedAssetCache m_cache; | 57 | private IImprovedAssetCache m_cache; |
58 | private bool m_Enabled = false; | ||
58 | 59 | ||
59 | #region ISharedRegionModule | 60 | #region ISharedRegionModule |
60 | 61 | ||
@@ -73,8 +74,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
73 | 74 | ||
74 | public SimianAssetServiceConnector() { } | 75 | public SimianAssetServiceConnector() { } |
75 | public string Name { get { return "SimianAssetServiceConnector"; } } | 76 | public string Name { get { return "SimianAssetServiceConnector"; } } |
76 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAssetService>(this); } } | 77 | public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAssetService>(this); } } |
77 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAssetService>(this); } } | 78 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAssetService>(this); } } |
78 | 79 | ||
79 | #endregion ISharedRegionModule | 80 | #endregion ISharedRegionModule |
80 | 81 | ||
@@ -85,20 +86,30 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
85 | 86 | ||
86 | public void Initialise(IConfigSource source) | 87 | public void Initialise(IConfigSource source) |
87 | { | 88 | { |
88 | IConfig gridConfig = source.Configs["AssetService"]; | 89 | IConfig moduleConfig = source.Configs["Modules"]; |
89 | if (gridConfig != null) | 90 | if (moduleConfig != null) |
90 | { | 91 | { |
91 | string serviceUrl = gridConfig.GetString("AssetServerURI"); | 92 | string name = moduleConfig.GetString("AssetServices", ""); |
92 | if (!String.IsNullOrEmpty(serviceUrl)) | 93 | if (name == Name) |
93 | { | 94 | { |
94 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 95 | IConfig gridConfig = source.Configs["AssetService"]; |
95 | serviceUrl = serviceUrl + '/'; | 96 | if (gridConfig != null) |
96 | m_serverUrl = serviceUrl; | 97 | { |
98 | string serviceUrl = gridConfig.GetString("AssetServerURI"); | ||
99 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
100 | { | ||
101 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
102 | serviceUrl = serviceUrl + '/'; | ||
103 | m_serverUrl = serviceUrl; | ||
104 | } | ||
105 | } | ||
106 | |||
107 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
108 | m_log.Info("[SIMIAN ASSET CONNECTOR]: No AssetServerURI specified, disabling connector"); | ||
109 | else | ||
110 | m_Enabled = true; | ||
97 | } | 111 | } |
98 | } | 112 | } |
99 | |||
100 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
101 | m_log.Info("[SIMIAN ASSET CONNECTOR]: No AssetServerURI specified, disabling connector"); | ||
102 | } | 113 | } |
103 | 114 | ||
104 | #region IAssetService | 115 | #region IAssetService |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs index f1c2575..68f73ee 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs | |||
@@ -51,6 +51,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
51 | MethodBase.GetCurrentMethod().DeclaringType); | 51 | MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | private string m_serverUrl = String.Empty; | 53 | private string m_serverUrl = String.Empty; |
54 | private bool m_Enabled = false; | ||
54 | 55 | ||
55 | #region ISharedRegionModule | 56 | #region ISharedRegionModule |
56 | 57 | ||
@@ -61,8 +62,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
61 | 62 | ||
62 | public SimianAuthenticationServiceConnector() { } | 63 | public SimianAuthenticationServiceConnector() { } |
63 | public string Name { get { return "SimianAuthenticationServiceConnector"; } } | 64 | public string Name { get { return "SimianAuthenticationServiceConnector"; } } |
64 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAuthenticationService>(this); } } | 65 | public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAuthenticationService>(this); } } |
65 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAuthenticationService>(this); } } | 66 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAuthenticationService>(this); } } |
66 | 67 | ||
67 | #endregion ISharedRegionModule | 68 | #endregion ISharedRegionModule |
68 | 69 | ||
@@ -73,20 +74,29 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
73 | 74 | ||
74 | public void Initialise(IConfigSource source) | 75 | public void Initialise(IConfigSource source) |
75 | { | 76 | { |
76 | IConfig gridConfig = source.Configs["AuthenticationService"]; | 77 | IConfig moduleConfig = source.Configs["Modules"]; |
77 | if (gridConfig != null) | 78 | if (moduleConfig != null) |
78 | { | 79 | { |
79 | string serviceUrl = gridConfig.GetString("AuthenticationServerURI"); | 80 | string name = moduleConfig.GetString("AuthenticationServices", ""); |
80 | if (!String.IsNullOrEmpty(serviceUrl)) | 81 | if (name == Name) |
81 | { | 82 | { |
82 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 83 | IConfig gridConfig = source.Configs["AuthenticationService"]; |
83 | serviceUrl = serviceUrl + '/'; | 84 | if (gridConfig != null) |
84 | m_serverUrl = serviceUrl; | 85 | { |
86 | string serviceUrl = gridConfig.GetString("AuthenticationServerURI"); | ||
87 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
88 | { | ||
89 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
90 | serviceUrl = serviceUrl + '/'; | ||
91 | m_serverUrl = serviceUrl; | ||
92 | m_Enabled = true; | ||
93 | } | ||
94 | } | ||
95 | |||
96 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
97 | m_log.Info("[SIMIAN AUTH CONNECTOR]: No AuthenticationServerURI specified, disabling connector"); | ||
85 | } | 98 | } |
86 | } | 99 | } |
87 | |||
88 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
89 | m_log.Info("[SIMIAN AUTH CONNECTOR]: No AuthenticationServerURI specified, disabling connector"); | ||
90 | } | 100 | } |
91 | 101 | ||
92 | public string Authenticate(UUID principalID, string password, int lifetime) | 102 | public string Authenticate(UUID principalID, string password, int lifetime) |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index c2e20a3..7e56bd1 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
56 | // private static string ZeroID = UUID.Zero.ToString(); | 56 | // private static string ZeroID = UUID.Zero.ToString(); |
57 | 57 | ||
58 | private string m_serverUrl = String.Empty; | 58 | private string m_serverUrl = String.Empty; |
59 | private bool m_Enabled = false; | ||
59 | 60 | ||
60 | #region ISharedRegionModule | 61 | #region ISharedRegionModule |
61 | 62 | ||
@@ -66,8 +67,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
66 | 67 | ||
67 | public SimianAvatarServiceConnector() { } | 68 | public SimianAvatarServiceConnector() { } |
68 | public string Name { get { return "SimianAvatarServiceConnector"; } } | 69 | public string Name { get { return "SimianAvatarServiceConnector"; } } |
69 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAvatarService>(this); } } | 70 | public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAvatarService>(this); } } |
70 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAvatarService>(this); } } | 71 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAvatarService>(this); } } |
71 | 72 | ||
72 | #endregion ISharedRegionModule | 73 | #endregion ISharedRegionModule |
73 | 74 | ||
@@ -78,20 +79,29 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
78 | 79 | ||
79 | public void Initialise(IConfigSource source) | 80 | public void Initialise(IConfigSource source) |
80 | { | 81 | { |
81 | IConfig gridConfig = source.Configs["AvatarService"]; | 82 | IConfig moduleConfig = source.Configs["Modules"]; |
82 | if (gridConfig != null) | 83 | if (moduleConfig != null) |
83 | { | 84 | { |
84 | string serviceUrl = gridConfig.GetString("AvatarServerURI"); | 85 | string name = moduleConfig.GetString("AvatarServices", ""); |
85 | if (!String.IsNullOrEmpty(serviceUrl)) | 86 | if (name == Name) |
86 | { | 87 | { |
87 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 88 | IConfig gridConfig = source.Configs["AvatarService"]; |
88 | serviceUrl = serviceUrl + '/'; | 89 | if (gridConfig != null) |
89 | m_serverUrl = serviceUrl; | 90 | { |
91 | string serviceUrl = gridConfig.GetString("AvatarServerURI"); | ||
92 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
93 | { | ||
94 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
95 | serviceUrl = serviceUrl + '/'; | ||
96 | m_serverUrl = serviceUrl; | ||
97 | m_Enabled = true; | ||
98 | } | ||
99 | } | ||
100 | |||
101 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
102 | m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector"); | ||
90 | } | 103 | } |
91 | } | 104 | } |
92 | |||
93 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
94 | m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector"); | ||
95 | } | 105 | } |
96 | 106 | ||
97 | #region IAvatarService | 107 | #region IAvatarService |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs index 1afb1e1..5b18aef 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs | |||
@@ -46,8 +46,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
46 | /// <summary> | 46 | /// <summary> |
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 | public class SimianFriendsServiceConnector : IFriendsService |
50 | public class SimianFriendsServiceConnector : IFriendsService, ISharedRegionModule | ||
51 | { | 50 | { |
52 | private static readonly ILog m_log = | 51 | private static readonly ILog m_log = |
53 | LogManager.GetLogger( | 52 | LogManager.GetLogger( |
@@ -55,20 +54,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
55 | 54 | ||
56 | private string m_serverUrl = String.Empty; | 55 | private string m_serverUrl = String.Empty; |
57 | 56 | ||
58 | #region ISharedRegionModule | ||
59 | |||
60 | public Type ReplaceableInterface { get { return null; } } | ||
61 | public void RegionLoaded(Scene scene) { } | ||
62 | public void PostInitialise() { } | ||
63 | public void Close() { } | ||
64 | |||
65 | public SimianFriendsServiceConnector() { } | ||
66 | public string Name { get { return "SimianFriendsServiceConnector"; } } | ||
67 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IFriendsService>(this); } } | ||
68 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IFriendsService>(this); } } | ||
69 | |||
70 | #endregion ISharedRegionModule | ||
71 | |||
72 | public SimianFriendsServiceConnector(IConfigSource source) | 57 | public SimianFriendsServiceConnector(IConfigSource source) |
73 | { | 58 | { |
74 | Initialise(source); | 59 | Initialise(source); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 204dbe5..4fceef6 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -60,6 +60,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
60 | 60 | ||
61 | private string m_serverUrl = String.Empty; | 61 | private string m_serverUrl = String.Empty; |
62 | private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); | 62 | private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); |
63 | private bool m_Enabled = false; | ||
63 | 64 | ||
64 | #region ISharedRegionModule | 65 | #region ISharedRegionModule |
65 | 66 | ||
@@ -72,21 +73,25 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
72 | public string Name { get { return "SimianGridServiceConnector"; } } | 73 | public string Name { get { return "SimianGridServiceConnector"; } } |
73 | public void AddRegion(Scene scene) | 74 | public void AddRegion(Scene scene) |
74 | { | 75 | { |
76 | if (!m_Enabled) | ||
77 | return; | ||
78 | |||
75 | // Every shared region module has to maintain an indepedent list of | 79 | // Every shared region module has to maintain an indepedent list of |
76 | // currently running regions | 80 | // currently running regions |
77 | lock (m_scenes) | 81 | lock (m_scenes) |
78 | m_scenes[scene.RegionInfo.RegionID] = scene; | 82 | m_scenes[scene.RegionInfo.RegionID] = scene; |
79 | 83 | ||
80 | if (!String.IsNullOrEmpty(m_serverUrl)) | 84 | scene.RegisterModuleInterface<IGridService>(this); |
81 | scene.RegisterModuleInterface<IGridService>(this); | ||
82 | } | 85 | } |
83 | public void RemoveRegion(Scene scene) | 86 | public void RemoveRegion(Scene scene) |
84 | { | 87 | { |
88 | if (!m_Enabled) | ||
89 | return; | ||
90 | |||
85 | lock (m_scenes) | 91 | lock (m_scenes) |
86 | m_scenes.Remove(scene.RegionInfo.RegionID); | 92 | m_scenes.Remove(scene.RegionInfo.RegionID); |
87 | 93 | ||
88 | if (!String.IsNullOrEmpty(m_serverUrl)) | 94 | scene.UnregisterModuleInterface<IGridService>(this); |
89 | scene.UnregisterModuleInterface<IGridService>(this); | ||
90 | } | 95 | } |
91 | 96 | ||
92 | #endregion ISharedRegionModule | 97 | #endregion ISharedRegionModule |
@@ -98,20 +103,29 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
98 | 103 | ||
99 | public void Initialise(IConfigSource source) | 104 | public void Initialise(IConfigSource source) |
100 | { | 105 | { |
101 | IConfig gridConfig = source.Configs["GridService"]; | 106 | IConfig moduleConfig = source.Configs["Modules"]; |
102 | if (gridConfig != null) | 107 | if (moduleConfig != null) |
103 | { | 108 | { |
104 | string serviceUrl = gridConfig.GetString("GridServerURI"); | 109 | string name = moduleConfig.GetString("GridServices", ""); |
105 | if (!String.IsNullOrEmpty(serviceUrl)) | 110 | if (name == Name) |
106 | { | 111 | { |
107 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 112 | IConfig gridConfig = source.Configs["GridService"]; |
108 | serviceUrl = serviceUrl + '/'; | 113 | if (gridConfig != null) |
109 | m_serverUrl = serviceUrl; | 114 | { |
115 | string serviceUrl = gridConfig.GetString("GridServerURI"); | ||
116 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
117 | { | ||
118 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
119 | serviceUrl = serviceUrl + '/'; | ||
120 | m_serverUrl = serviceUrl; | ||
121 | m_Enabled = true; | ||
122 | } | ||
123 | } | ||
124 | |||
125 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
126 | m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector"); | ||
110 | } | 127 | } |
111 | } | 128 | } |
112 | |||
113 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
114 | m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector"); | ||
115 | } | 129 | } |
116 | 130 | ||
117 | #region IGridService | 131 | #region IGridService |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 63aaad7..eb118ae 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -70,6 +70,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
70 | private string m_serverUrl = String.Empty; | 70 | private string m_serverUrl = String.Empty; |
71 | private string m_userServerUrl = String.Empty; | 71 | private string m_userServerUrl = String.Empty; |
72 | // private object m_gestureSyncRoot = new object(); | 72 | // private object m_gestureSyncRoot = new object(); |
73 | private bool m_Enabled = false; | ||
73 | 74 | ||
74 | #region ISharedRegionModule | 75 | #region ISharedRegionModule |
75 | 76 | ||
@@ -80,8 +81,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
80 | 81 | ||
81 | public SimianInventoryServiceConnector() { } | 82 | public SimianInventoryServiceConnector() { } |
82 | public string Name { get { return "SimianInventoryServiceConnector"; } } | 83 | public string Name { get { return "SimianInventoryServiceConnector"; } } |
83 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IInventoryService>(this); } } | 84 | public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IInventoryService>(this); } } |
84 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IInventoryService>(this); } } | 85 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IInventoryService>(this); } } |
85 | 86 | ||
86 | #endregion ISharedRegionModule | 87 | #endregion ISharedRegionModule |
87 | 88 | ||
@@ -92,30 +93,41 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
92 | 93 | ||
93 | public void Initialise(IConfigSource source) | 94 | public void Initialise(IConfigSource source) |
94 | { | 95 | { |
95 | IConfig gridConfig = source.Configs["InventoryService"]; | 96 | IConfig moduleConfig = source.Configs["Modules"]; |
96 | if (gridConfig != null) | 97 | if (moduleConfig != null) |
97 | { | 98 | { |
98 | string serviceUrl = gridConfig.GetString("InventoryServerURI"); | 99 | string name = moduleConfig.GetString("InventoryServices", ""); |
99 | if (!String.IsNullOrEmpty(serviceUrl)) | 100 | if (name == Name) |
100 | { | 101 | { |
101 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 102 | IConfig gridConfig = source.Configs["InventoryService"]; |
102 | serviceUrl = serviceUrl + '/'; | ||
103 | m_serverUrl = serviceUrl; | ||
104 | |||
105 | gridConfig = source.Configs["UserAccountService"]; | ||
106 | if (gridConfig != null) | 103 | if (gridConfig != null) |
107 | { | 104 | { |
108 | serviceUrl = gridConfig.GetString("UserAccountServerURI"); | 105 | string serviceUrl = gridConfig.GetString("InventoryServerURI"); |
109 | if (!String.IsNullOrEmpty(serviceUrl)) | 106 | if (!String.IsNullOrEmpty(serviceUrl)) |
110 | m_userServerUrl = serviceUrl; | 107 | { |
108 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
109 | serviceUrl = serviceUrl + '/'; | ||
110 | m_serverUrl = serviceUrl; | ||
111 | |||
112 | gridConfig = source.Configs["UserAccountService"]; | ||
113 | if (gridConfig != null) | ||
114 | { | ||
115 | serviceUrl = gridConfig.GetString("UserAccountServerURI"); | ||
116 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
117 | { | ||
118 | m_userServerUrl = serviceUrl; | ||
119 | m_Enabled = true; | ||
120 | } | ||
121 | } | ||
122 | } | ||
111 | } | 123 | } |
124 | |||
125 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
126 | m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No InventoryServerURI specified, disabling connector"); | ||
127 | else if (String.IsNullOrEmpty(m_userServerUrl)) | ||
128 | m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No UserAccountServerURI specified, disabling connector"); | ||
112 | } | 129 | } |
113 | } | 130 | } |
114 | |||
115 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
116 | m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No InventoryServerURI specified, disabling connector"); | ||
117 | else if (String.IsNullOrEmpty(m_userServerUrl)) | ||
118 | m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No UserAccountServerURI specified, disabling connector"); | ||
119 | } | 131 | } |
120 | 132 | ||
121 | /// <summary> | 133 | /// <summary> |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 778f3f4..074c80f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
59 | 59 | ||
60 | private string m_serverUrl = String.Empty; | 60 | private string m_serverUrl = String.Empty; |
61 | private SimianActivityDetector m_activityDetector; | 61 | private SimianActivityDetector m_activityDetector; |
62 | private bool m_Enabled = false; | ||
62 | 63 | ||
63 | #region ISharedRegionModule | 64 | #region ISharedRegionModule |
64 | 65 | ||
@@ -71,7 +72,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
71 | public string Name { get { return "SimianPresenceServiceConnector"; } } | 72 | public string Name { get { return "SimianPresenceServiceConnector"; } } |
72 | public void AddRegion(Scene scene) | 73 | public void AddRegion(Scene scene) |
73 | { | 74 | { |
74 | if (!String.IsNullOrEmpty(m_serverUrl)) | 75 | if (m_Enabled) |
75 | { | 76 | { |
76 | scene.RegisterModuleInterface<IPresenceService>(this); | 77 | scene.RegisterModuleInterface<IPresenceService>(this); |
77 | scene.RegisterModuleInterface<IGridUserService>(this); | 78 | scene.RegisterModuleInterface<IGridUserService>(this); |
@@ -83,7 +84,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
83 | } | 84 | } |
84 | public void RemoveRegion(Scene scene) | 85 | public void RemoveRegion(Scene scene) |
85 | { | 86 | { |
86 | if (!String.IsNullOrEmpty(m_serverUrl)) | 87 | if (m_Enabled) |
87 | { | 88 | { |
88 | scene.UnregisterModuleInterface<IPresenceService>(this); | 89 | scene.UnregisterModuleInterface<IPresenceService>(this); |
89 | scene.UnregisterModuleInterface<IGridUserService>(this); | 90 | scene.UnregisterModuleInterface<IGridUserService>(this); |
@@ -103,20 +104,29 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
103 | 104 | ||
104 | public void Initialise(IConfigSource source) | 105 | public void Initialise(IConfigSource source) |
105 | { | 106 | { |
106 | IConfig gridConfig = source.Configs["PresenceService"]; | 107 | IConfig moduleConfig = source.Configs["Modules"]; |
107 | if (gridConfig != null) | 108 | if (moduleConfig != null) |
108 | { | 109 | { |
109 | string serviceUrl = gridConfig.GetString("PresenceServerURI"); | 110 | string name = moduleConfig.GetString("PresenceServices", ""); |
110 | if (!String.IsNullOrEmpty(serviceUrl)) | 111 | if (name == Name) |
111 | { | 112 | { |
112 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 113 | IConfig gridConfig = source.Configs["PresenceService"]; |
113 | serviceUrl = serviceUrl + '/'; | 114 | if (gridConfig != null) |
114 | m_serverUrl = serviceUrl; | 115 | { |
116 | string serviceUrl = gridConfig.GetString("PresenceServerURI"); | ||
117 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
118 | { | ||
119 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
120 | serviceUrl = serviceUrl + '/'; | ||
121 | m_serverUrl = serviceUrl; | ||
122 | m_Enabled = true; | ||
123 | } | ||
124 | } | ||
125 | |||
126 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
127 | m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector"); | ||
115 | } | 128 | } |
116 | } | 129 | } |
117 | |||
118 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
119 | m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector"); | ||
120 | } | 130 | } |
121 | 131 | ||
122 | #region IPresenceService | 132 | #region IPresenceService |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index a817d7c..0ef4974 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | |||
@@ -67,6 +67,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
67 | MethodBase.GetCurrentMethod().DeclaringType); | 67 | MethodBase.GetCurrentMethod().DeclaringType); |
68 | 68 | ||
69 | private string m_serverUrl = String.Empty; | 69 | private string m_serverUrl = String.Empty; |
70 | private bool m_Enabled = false; | ||
70 | 71 | ||
71 | #region INonSharedRegionModule | 72 | #region INonSharedRegionModule |
72 | 73 | ||
@@ -76,8 +77,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
76 | 77 | ||
77 | public SimianProfiles() { } | 78 | public SimianProfiles() { } |
78 | public string Name { get { return "SimianProfiles"; } } | 79 | public string Name { get { return "SimianProfiles"; } } |
79 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } } | 80 | public void AddRegion(Scene scene) { if (m_Enabled) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } } |
80 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } } | 81 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } } |
81 | 82 | ||
82 | #endregion INonSharedRegionModule | 83 | #endregion INonSharedRegionModule |
83 | 84 | ||
@@ -88,6 +89,13 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
88 | 89 | ||
89 | public void Initialise(IConfigSource source) | 90 | public void Initialise(IConfigSource source) |
90 | { | 91 | { |
92 | IConfig profileConfig = source.Configs["Profile"]; | ||
93 | if (profileConfig == null) | ||
94 | return; | ||
95 | |||
96 | if (profileConfig.GetString("Module", String.Empty) != Name) | ||
97 | return; | ||
98 | |||
91 | IConfig gridConfig = source.Configs["UserAccountService"]; | 99 | IConfig gridConfig = source.Configs["UserAccountService"]; |
92 | if (gridConfig != null) | 100 | if (gridConfig != null) |
93 | { | 101 | { |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 4c8662f..deb8695 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | |||
@@ -55,6 +55,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
55 | 55 | ||
56 | private string m_serverUrl = String.Empty; | 56 | private string m_serverUrl = String.Empty; |
57 | private ExpiringCache<UUID, UserAccount> m_accountCache; | 57 | private ExpiringCache<UUID, UserAccount> m_accountCache; |
58 | private bool m_Enabled = false; | ||
58 | 59 | ||
59 | #region ISharedRegionModule | 60 | #region ISharedRegionModule |
60 | 61 | ||
@@ -65,8 +66,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
65 | 66 | ||
66 | public SimianUserAccountServiceConnector() { } | 67 | public SimianUserAccountServiceConnector() { } |
67 | public string Name { get { return "SimianUserAccountServiceConnector"; } } | 68 | public string Name { get { return "SimianUserAccountServiceConnector"; } } |
68 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IUserAccountService>(this); } } | 69 | public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IUserAccountService>(this); } } |
69 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IUserAccountService>(this); } } | 70 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IUserAccountService>(this); } } |
70 | 71 | ||
71 | #endregion ISharedRegionModule | 72 | #endregion ISharedRegionModule |
72 | 73 | ||
@@ -77,20 +78,29 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
77 | 78 | ||
78 | public void Initialise(IConfigSource source) | 79 | public void Initialise(IConfigSource source) |
79 | { | 80 | { |
80 | IConfig gridConfig = source.Configs["UserAccountService"]; | 81 | IConfig moduleConfig = source.Configs["Modules"]; |
81 | if (gridConfig != null) | 82 | if (moduleConfig != null) |
82 | { | 83 | { |
83 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); | 84 | string name = moduleConfig.GetString("UserAccountServices", ""); |
84 | if (!String.IsNullOrEmpty(serviceUrl)) | 85 | if (name == Name) |
85 | { | 86 | { |
86 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 87 | IConfig gridConfig = source.Configs["UserAccountService"]; |
87 | serviceUrl = serviceUrl + '/'; | 88 | if (gridConfig != null) |
88 | m_serverUrl = serviceUrl; | 89 | { |
90 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); | ||
91 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
92 | { | ||
93 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
94 | serviceUrl = serviceUrl + '/'; | ||
95 | m_serverUrl = serviceUrl; | ||
96 | m_Enabled = true; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
101 | m_log.Info("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI specified, disabling connector"); | ||
89 | } | 102 | } |
90 | } | 103 | } |
91 | |||
92 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
93 | m_log.Info("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI specified, disabling connector"); | ||
94 | } | 104 | } |
95 | 105 | ||
96 | public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) | 106 | public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) |