diff options
Diffstat (limited to 'OpenSim/Services')
38 files changed, 403 insertions, 206 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index f1bffa4..90c30c8 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -123,46 +123,32 @@ namespace OpenSim.Services.AssetService | |||
123 | public virtual AssetMetadata GetMetadata(string id) | 123 | public virtual AssetMetadata GetMetadata(string id) |
124 | { | 124 | { |
125 | // m_log.DebugFormat("[ASSET SERVICE]: Get asset metadata for {0}", id); | 125 | // m_log.DebugFormat("[ASSET SERVICE]: Get asset metadata for {0}", id); |
126 | |||
127 | UUID assetID; | ||
128 | 126 | ||
129 | if (!UUID.TryParse(id, out assetID)) | 127 | AssetBase asset = Get(id); |
130 | return null; | ||
131 | 128 | ||
132 | AssetBase asset = m_Database.GetAsset(assetID); | ||
133 | if (asset != null) | 129 | if (asset != null) |
134 | return asset.Metadata; | 130 | return asset.Metadata; |
135 | 131 | else | |
136 | return null; | 132 | return null; |
137 | } | 133 | } |
138 | 134 | ||
139 | public virtual byte[] GetData(string id) | 135 | public virtual byte[] GetData(string id) |
140 | { | 136 | { |
141 | // m_log.DebugFormat("[ASSET SERVICE]: Get asset data for {0}", id); | 137 | // m_log.DebugFormat("[ASSET SERVICE]: Get asset data for {0}", id); |
142 | |||
143 | UUID assetID; | ||
144 | 138 | ||
145 | if (!UUID.TryParse(id, out assetID)) | 139 | AssetBase asset = Get(id); |
146 | return null; | ||
147 | 140 | ||
148 | AssetBase asset = m_Database.GetAsset(assetID); | 141 | if (asset != null) |
149 | return asset.Data; | 142 | return asset.Data; |
143 | else | ||
144 | return null; | ||
150 | } | 145 | } |
151 | 146 | ||
152 | public virtual bool Get(string id, Object sender, AssetRetrieved handler) | 147 | public virtual bool Get(string id, Object sender, AssetRetrieved handler) |
153 | { | 148 | { |
154 | //m_log.DebugFormat("[AssetService]: Get asset async {0}", id); | 149 | //m_log.DebugFormat("[AssetService]: Get asset async {0}", id); |
155 | |||
156 | UUID assetID; | ||
157 | 150 | ||
158 | if (!UUID.TryParse(id, out assetID)) | 151 | handler(id, sender, Get(id)); |
159 | return false; | ||
160 | |||
161 | AssetBase asset = m_Database.GetAsset(assetID); | ||
162 | |||
163 | //m_log.DebugFormat("[AssetService]: Got asset {0}", asset); | ||
164 | |||
165 | handler(id, sender, asset); | ||
166 | 152 | ||
167 | return true; | 153 | return true; |
168 | } | 154 | } |
diff --git a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs index 1509400..50ee033 100644 --- a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs index a1d10ed..8a2ca7c 100644 --- a/OpenSim/Services/AssetService/XAssetService.cs +++ b/OpenSim/Services/AssetService/XAssetService.cs | |||
@@ -39,8 +39,7 @@ using OpenMetaverse; | |||
39 | namespace OpenSim.Services.AssetService | 39 | namespace OpenSim.Services.AssetService |
40 | { | 40 | { |
41 | /// <summary> | 41 | /// <summary> |
42 | /// This will be developed into a de-duplicating asset service. | 42 | /// A de-duplicating asset service. |
43 | /// XXX: Currently it's a just a copy of the existing AssetService. so please don't attempt to use it. | ||
44 | /// </summary> | 43 | /// </summary> |
45 | public class XAssetService : XAssetServiceBase, IAssetService | 44 | public class XAssetService : XAssetServiceBase, IAssetService |
46 | { | 45 | { |
@@ -48,7 +47,9 @@ namespace OpenSim.Services.AssetService | |||
48 | 47 | ||
49 | protected static XAssetService m_RootInstance; | 48 | protected static XAssetService m_RootInstance; |
50 | 49 | ||
51 | public XAssetService(IConfigSource config) : base(config) | 50 | public XAssetService(IConfigSource config) : this(config, "AssetService") {} |
51 | |||
52 | public XAssetService(IConfigSource config, string configName) : base(config, configName) | ||
52 | { | 53 | { |
53 | if (m_RootInstance == null) | 54 | if (m_RootInstance == null) |
54 | { | 55 | { |
@@ -56,22 +57,21 @@ namespace OpenSim.Services.AssetService | |||
56 | 57 | ||
57 | if (m_AssetLoader != null) | 58 | if (m_AssetLoader != null) |
58 | { | 59 | { |
59 | IConfig assetConfig = config.Configs["AssetService"]; | 60 | IConfig assetConfig = config.Configs[configName]; |
60 | if (assetConfig == null) | 61 | if (assetConfig == null) |
61 | throw new Exception("No AssetService configuration"); | 62 | throw new Exception("No AssetService configuration"); |
62 | 63 | ||
63 | string loaderArgs = assetConfig.GetString("AssetLoaderArgs", | 64 | string loaderArgs = assetConfig.GetString("AssetLoaderArgs", String.Empty); |
64 | String.Empty); | ||
65 | 65 | ||
66 | bool assetLoaderEnabled = assetConfig.GetBoolean("AssetLoaderEnabled", true); | 66 | bool assetLoaderEnabled = assetConfig.GetBoolean("AssetLoaderEnabled", true); |
67 | 67 | ||
68 | if (assetLoaderEnabled) | 68 | if (assetLoaderEnabled && !HasChainedAssetService) |
69 | { | 69 | { |
70 | m_log.DebugFormat("[XASSET SERVICE]: Loading default asset set from {0}", loaderArgs); | 70 | m_log.DebugFormat("[XASSET SERVICE]: Loading default asset set from {0}", loaderArgs); |
71 | 71 | ||
72 | m_AssetLoader.ForEachDefaultXmlAsset( | 72 | m_AssetLoader.ForEachDefaultXmlAsset( |
73 | loaderArgs, | 73 | loaderArgs, |
74 | delegate(AssetBase a) | 74 | a => |
75 | { | 75 | { |
76 | AssetBase existingAsset = Get(a.ID); | 76 | AssetBase existingAsset = Get(a.ID); |
77 | // AssetMetadata existingMetadata = GetMetadata(a.ID); | 77 | // AssetMetadata existingMetadata = GetMetadata(a.ID); |
@@ -103,7 +103,23 @@ namespace OpenSim.Services.AssetService | |||
103 | 103 | ||
104 | try | 104 | try |
105 | { | 105 | { |
106 | return m_Database.GetAsset(assetID); | 106 | AssetBase asset = m_Database.GetAsset(assetID); |
107 | |||
108 | if (asset != null) | ||
109 | { | ||
110 | return asset; | ||
111 | } | ||
112 | else if (HasChainedAssetService) | ||
113 | { | ||
114 | asset = m_ChainedAssetService.Get(id); | ||
115 | |||
116 | if (asset != null) | ||
117 | MigrateFromChainedService(asset); | ||
118 | |||
119 | return asset; | ||
120 | } | ||
121 | |||
122 | return null; | ||
107 | } | 123 | } |
108 | catch (Exception e) | 124 | catch (Exception e) |
109 | { | 125 | { |
@@ -120,30 +136,25 @@ namespace OpenSim.Services.AssetService | |||
120 | public virtual AssetMetadata GetMetadata(string id) | 136 | public virtual AssetMetadata GetMetadata(string id) |
121 | { | 137 | { |
122 | // m_log.DebugFormat("[XASSET SERVICE]: Get asset metadata for {0}", id); | 138 | // m_log.DebugFormat("[XASSET SERVICE]: Get asset metadata for {0}", id); |
123 | |||
124 | UUID assetID; | ||
125 | 139 | ||
126 | if (!UUID.TryParse(id, out assetID)) | 140 | AssetBase asset = Get(id); |
127 | return null; | ||
128 | 141 | ||
129 | AssetBase asset = m_Database.GetAsset(assetID); | ||
130 | if (asset != null) | 142 | if (asset != null) |
131 | return asset.Metadata; | 143 | return asset.Metadata; |
132 | 144 | else | |
133 | return null; | 145 | return null; |
134 | } | 146 | } |
135 | 147 | ||
136 | public virtual byte[] GetData(string id) | 148 | public virtual byte[] GetData(string id) |
137 | { | 149 | { |
138 | // m_log.DebugFormat("[XASSET SERVICE]: Get asset data for {0}", id); | 150 | // m_log.DebugFormat("[XASSET SERVICE]: Get asset data for {0}", id); |
139 | 151 | ||
140 | UUID assetID; | 152 | AssetBase asset = Get(id); |
141 | 153 | ||
142 | if (!UUID.TryParse(id, out assetID)) | 154 | if (asset != null) |
155 | return asset.Data; | ||
156 | else | ||
143 | return null; | 157 | return null; |
144 | |||
145 | AssetBase asset = m_Database.GetAsset(assetID); | ||
146 | return asset.Data; | ||
147 | } | 158 | } |
148 | 159 | ||
149 | public virtual bool Get(string id, Object sender, AssetRetrieved handler) | 160 | public virtual bool Get(string id, Object sender, AssetRetrieved handler) |
@@ -155,7 +166,7 @@ namespace OpenSim.Services.AssetService | |||
155 | if (!UUID.TryParse(id, out assetID)) | 166 | if (!UUID.TryParse(id, out assetID)) |
156 | return false; | 167 | return false; |
157 | 168 | ||
158 | AssetBase asset = m_Database.GetAsset(assetID); | 169 | AssetBase asset = Get(id); |
159 | 170 | ||
160 | //m_log.DebugFormat("[XASSET SERVICE]: Got asset {0}", asset); | 171 | //m_log.DebugFormat("[XASSET SERVICE]: Got asset {0}", asset); |
161 | 172 | ||
@@ -194,7 +205,15 @@ namespace OpenSim.Services.AssetService | |||
194 | if (!UUID.TryParse(id, out assetID)) | 205 | if (!UUID.TryParse(id, out assetID)) |
195 | return false; | 206 | return false; |
196 | 207 | ||
208 | // Don't bother deleting from a chained asset service. This isn't a big deal since deleting happens | ||
209 | // very rarely. | ||
210 | |||
197 | return m_Database.Delete(id); | 211 | return m_Database.Delete(id); |
198 | } | 212 | } |
213 | |||
214 | private void MigrateFromChainedService(AssetBase asset) | ||
215 | { | ||
216 | Util.FireAndForget(o => { Store(asset); m_ChainedAssetService.Delete(asset.ID); }); | ||
217 | } | ||
199 | } | 218 | } |
200 | } \ No newline at end of file | 219 | } \ No newline at end of file |
diff --git a/OpenSim/Services/AssetService/XAssetServiceBase.cs b/OpenSim/Services/AssetService/XAssetServiceBase.cs index 0c5c2c3..c118c9d 100644 --- a/OpenSim/Services/AssetService/XAssetServiceBase.cs +++ b/OpenSim/Services/AssetService/XAssetServiceBase.cs | |||
@@ -27,9 +27,11 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using log4net; | ||
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
32 | using OpenSim.Data; | 33 | using OpenSim.Data; |
34 | using OpenSim.Server.Base; | ||
33 | using OpenSim.Services.Interfaces; | 35 | using OpenSim.Services.Interfaces; |
34 | using OpenSim.Services.Base; | 36 | using OpenSim.Services.Base; |
35 | 37 | ||
@@ -37,10 +39,15 @@ namespace OpenSim.Services.AssetService | |||
37 | { | 39 | { |
38 | public class XAssetServiceBase : ServiceBase | 40 | public class XAssetServiceBase : ServiceBase |
39 | { | 41 | { |
40 | protected IXAssetDataPlugin m_Database = null; | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | protected IAssetLoader m_AssetLoader = null; | ||
42 | 43 | ||
43 | public XAssetServiceBase(IConfigSource config) : base(config) | 44 | protected IXAssetDataPlugin m_Database; |
45 | protected IAssetLoader m_AssetLoader; | ||
46 | protected IAssetService m_ChainedAssetService; | ||
47 | |||
48 | protected bool HasChainedAssetService { get { return m_ChainedAssetService != null; } } | ||
49 | |||
50 | public XAssetServiceBase(IConfigSource config, string configName) : base(config) | ||
44 | { | 51 | { |
45 | string dllName = String.Empty; | 52 | string dllName = String.Empty; |
46 | string connString = String.Empty; | 53 | string connString = String.Empty; |
@@ -48,7 +55,7 @@ namespace OpenSim.Services.AssetService | |||
48 | // | 55 | // |
49 | // Try reading the [AssetService] section first, if it exists | 56 | // Try reading the [AssetService] section first, if it exists |
50 | // | 57 | // |
51 | IConfig assetConfig = config.Configs["AssetService"]; | 58 | IConfig assetConfig = config.Configs[configName]; |
52 | if (assetConfig != null) | 59 | if (assetConfig != null) |
53 | { | 60 | { |
54 | dllName = assetConfig.GetString("StorageProvider", dllName); | 61 | dllName = assetConfig.GetString("StorageProvider", dllName); |
@@ -77,17 +84,35 @@ namespace OpenSim.Services.AssetService | |||
77 | if (m_Database == null) | 84 | if (m_Database == null) |
78 | throw new Exception("Could not find a storage interface in the given module"); | 85 | throw new Exception("Could not find a storage interface in the given module"); |
79 | 86 | ||
80 | m_Database.Initialise(connString); | 87 | string chainedAssetServiceDesignator = assetConfig.GetString("ChainedServiceModule", null); |
88 | |||
89 | if (chainedAssetServiceDesignator != null) | ||
90 | { | ||
91 | m_log.InfoFormat( | ||
92 | "[XASSET SERVICE BASE]: Loading chained asset service from {0}", chainedAssetServiceDesignator); | ||
81 | 93 | ||
82 | string loaderName = assetConfig.GetString("DefaultAssetLoader", | 94 | Object[] args = new Object[] { config, configName }; |
83 | String.Empty); | 95 | m_ChainedAssetService = ServerUtils.LoadPlugin<IAssetService>(chainedAssetServiceDesignator, args); |
84 | 96 | ||
85 | if (loaderName != String.Empty) | 97 | if (!HasChainedAssetService) |
98 | throw new Exception( | ||
99 | String.Format("Failed to load ChainedAssetService from {0}", chainedAssetServiceDesignator)); | ||
100 | } | ||
101 | |||
102 | m_Database.Initialise(connString); | ||
103 | |||
104 | if (HasChainedAssetService) | ||
86 | { | 105 | { |
87 | m_AssetLoader = LoadPlugin<IAssetLoader>(loaderName); | 106 | string loaderName = assetConfig.GetString("DefaultAssetLoader", |
107 | String.Empty); | ||
108 | |||
109 | if (loaderName != String.Empty) | ||
110 | { | ||
111 | m_AssetLoader = LoadPlugin<IAssetLoader>(loaderName); | ||
88 | 112 | ||
89 | if (m_AssetLoader == null) | 113 | if (m_AssetLoader == null) |
90 | throw new Exception("Asset loader could not be loaded"); | 114 | throw new Exception("Asset loader could not be loaded"); |
115 | } | ||
91 | } | 116 | } |
92 | } | 117 | } |
93 | } | 118 | } |
diff --git a/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs index 0eb2ba7..435852da 100644 --- a/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs index 6d6b11e..8db1671 100644 --- a/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs index 0944149..138d4cd 100644 --- a/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/Base/Properties/AssemblyInfo.cs b/OpenSim/Services/Base/Properties/AssemblyInfo.cs index 306b699..84a40f0 100644 --- a/OpenSim/Services/Base/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Base/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs index 5c50936..5004d99 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs | |||
@@ -73,7 +73,6 @@ namespace OpenSim.Services.Connectors | |||
73 | } | 73 | } |
74 | } | 74 | } |
75 | 75 | ||
76 | |||
77 | public virtual string Helo() | 76 | public virtual string Helo() |
78 | { | 77 | { |
79 | HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); | 78 | HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); |
@@ -82,10 +81,12 @@ namespace OpenSim.Services.Connectors | |||
82 | 81 | ||
83 | try | 82 | try |
84 | { | 83 | { |
85 | WebResponse response = req.GetResponse(); | 84 | using (WebResponse response = req.GetResponse()) |
86 | if (response.Headers.Get("X-Handlers-Provided") == null) // just in case this ever returns a null | 85 | { |
87 | return string.Empty; | 86 | if (response.Headers.Get("X-Handlers-Provided") == null) // just in case this ever returns a null |
88 | return response.Headers.Get("X-Handlers-Provided"); | 87 | return string.Empty; |
88 | return response.Headers.Get("X-Handlers-Provided"); | ||
89 | } | ||
89 | } | 90 | } |
90 | catch (Exception e) | 91 | catch (Exception e) |
91 | { | 92 | { |
@@ -95,6 +96,5 @@ namespace OpenSim.Services.Connectors | |||
95 | // fail | 96 | // fail |
96 | return string.Empty; | 97 | return string.Empty; |
97 | } | 98 | } |
98 | |||
99 | } | 99 | } |
100 | } | 100 | } \ No newline at end of file |
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index c542c29..d7e38f1 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -169,41 +169,45 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
169 | // Let's wait for the response | 169 | // Let's wait for the response |
170 | //m_log.Info("[USER AGENT CONNECTOR]: Waiting for a reply after DoCreateChildAgentCall"); | 170 | //m_log.Info("[USER AGENT CONNECTOR]: Waiting for a reply after DoCreateChildAgentCall"); |
171 | 171 | ||
172 | WebResponse webResponse = null; | ||
173 | StreamReader sr = null; | ||
174 | try | 172 | try |
175 | { | 173 | { |
176 | webResponse = AgentCreateRequest.GetResponse(); | 174 | using (WebResponse webResponse = AgentCreateRequest.GetResponse()) |
177 | if (webResponse == null) | ||
178 | { | 175 | { |
179 | m_log.Info("[USER AGENT CONNECTOR]: Null reply on DoCreateChildAgentCall post"); | 176 | if (webResponse == null) |
180 | } | ||
181 | else | ||
182 | { | ||
183 | |||
184 | sr = new StreamReader(webResponse.GetResponseStream()); | ||
185 | string response = sr.ReadToEnd().Trim(); | ||
186 | m_log.InfoFormat("[USER AGENT CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response); | ||
187 | |||
188 | if (!String.IsNullOrEmpty(response)) | ||
189 | { | 177 | { |
190 | try | 178 | m_log.Info("[USER AGENT CONNECTOR]: Null reply on DoCreateChildAgentCall post"); |
191 | { | 179 | } |
192 | // we assume we got an OSDMap back | 180 | else |
193 | OSDMap r = Util.GetOSDMap(response); | 181 | { |
194 | bool success = r["success"].AsBoolean(); | 182 | using (Stream s = webResponse.GetResponseStream()) |
195 | reason = r["reason"].AsString(); | ||
196 | return success; | ||
197 | } | ||
198 | catch (NullReferenceException e) | ||
199 | { | 183 | { |
200 | m_log.InfoFormat("[USER AGENT CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message); | 184 | using (StreamReader sr = new StreamReader(s)) |
201 | 185 | { | |
202 | // check for old style response | 186 | string response = sr.ReadToEnd().Trim(); |
203 | if (response.ToLower().StartsWith("true")) | 187 | m_log.InfoFormat("[USER AGENT CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response); |
204 | return true; | 188 | |
205 | 189 | if (!String.IsNullOrEmpty(response)) | |
206 | return false; | 190 | { |
191 | try | ||
192 | { | ||
193 | // we assume we got an OSDMap back | ||
194 | OSDMap r = Util.GetOSDMap(response); | ||
195 | bool success = r["success"].AsBoolean(); | ||
196 | reason = r["reason"].AsString(); | ||
197 | return success; | ||
198 | } | ||
199 | catch (NullReferenceException e) | ||
200 | { | ||
201 | m_log.InfoFormat("[USER AGENT CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message); | ||
202 | |||
203 | // check for old style response | ||
204 | if (response.ToLower().StartsWith("true")) | ||
205 | return true; | ||
206 | |||
207 | return false; | ||
208 | } | ||
209 | } | ||
210 | } | ||
207 | } | 211 | } |
208 | } | 212 | } |
209 | } | 213 | } |
@@ -214,11 +218,6 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
214 | reason = "Destination did not reply"; | 218 | reason = "Destination did not reply"; |
215 | return false; | 219 | return false; |
216 | } | 220 | } |
217 | finally | ||
218 | { | ||
219 | if (sr != null) | ||
220 | sr.Close(); | ||
221 | } | ||
222 | 221 | ||
223 | return true; | 222 | return true; |
224 | 223 | ||
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index 7688e0f..b36fa23 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | |||
@@ -168,22 +168,27 @@ namespace OpenSim.Services.Connectors | |||
168 | // Let's wait for the response | 168 | // Let's wait for the response |
169 | //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall"); | 169 | //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall"); |
170 | 170 | ||
171 | StreamReader sr = null; | ||
172 | try | 171 | try |
173 | { | 172 | { |
174 | WebResponse webResponse = helloNeighbourRequest.GetResponse(); | 173 | using (WebResponse webResponse = helloNeighbourRequest.GetResponse()) |
175 | if (webResponse == null) | ||
176 | { | 174 | { |
177 | m_log.DebugFormat( | 175 | if (webResponse == null) |
178 | "[REST COMMS]: Null reply on DoHelloNeighbourCall post from {0} to {1}", | 176 | { |
179 | thisRegion.RegionName, region.RegionName); | 177 | m_log.DebugFormat( |
178 | "[REST COMMS]: Null reply on DoHelloNeighbourCall post from {0} to {1}", | ||
179 | thisRegion.RegionName, region.RegionName); | ||
180 | } | ||
181 | |||
182 | using (Stream s = webResponse.GetResponseStream()) | ||
183 | { | ||
184 | using (StreamReader sr = new StreamReader(s)) | ||
185 | { | ||
186 | //reply = sr.ReadToEnd().Trim(); | ||
187 | sr.ReadToEnd().Trim(); | ||
188 | //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply); | ||
189 | } | ||
190 | } | ||
180 | } | 191 | } |
181 | |||
182 | sr = new StreamReader(webResponse.GetResponseStream()); | ||
183 | //reply = sr.ReadToEnd().Trim(); | ||
184 | sr.ReadToEnd().Trim(); | ||
185 | //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply); | ||
186 | |||
187 | } | 192 | } |
188 | catch (Exception e) | 193 | catch (Exception e) |
189 | { | 194 | { |
@@ -193,11 +198,6 @@ namespace OpenSim.Services.Connectors | |||
193 | 198 | ||
194 | return false; | 199 | return false; |
195 | } | 200 | } |
196 | finally | ||
197 | { | ||
198 | if (sr != null) | ||
199 | sr.Close(); | ||
200 | } | ||
201 | 201 | ||
202 | return true; | 202 | return true; |
203 | } | 203 | } |
diff --git a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs index bfb681b..8b18afb 100644 --- a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 63a32e7..74b980c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -339,36 +339,38 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
339 | // Simian does not require the asset ID to be in the URL because it's in the post data. | 339 | // Simian does not require the asset ID to be in the URL because it's in the post data. |
340 | // By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs | 340 | // By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs |
341 | HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString()); | 341 | HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString()); |
342 | |||
343 | HttpWebResponse response = MultipartForm.Post(request, postParameters); | ||
344 | using (Stream responseStream = response.GetResponseStream()) | ||
345 | { | ||
346 | string responseStr = null; | ||
347 | 342 | ||
348 | try | 343 | using (HttpWebResponse response = MultipartForm.Post(request, postParameters)) |
344 | { | ||
345 | using (Stream responseStream = response.GetResponseStream()) | ||
349 | { | 346 | { |
350 | responseStr = responseStream.GetStreamString(); | 347 | string responseStr = null; |
351 | OSD responseOSD = OSDParser.Deserialize(responseStr); | 348 | |
352 | if (responseOSD.Type == OSDType.Map) | 349 | try |
353 | { | 350 | { |
354 | OSDMap responseMap = (OSDMap)responseOSD; | 351 | responseStr = responseStream.GetStreamString(); |
355 | if (responseMap["Success"].AsBoolean()) | 352 | OSD responseOSD = OSDParser.Deserialize(responseStr); |
356 | return asset.ID; | 353 | if (responseOSD.Type == OSDType.Map) |
354 | { | ||
355 | OSDMap responseMap = (OSDMap)responseOSD; | ||
356 | if (responseMap["Success"].AsBoolean()) | ||
357 | return asset.ID; | ||
358 | else | ||
359 | errorMessage = "Upload failed: " + responseMap["Message"].AsString(); | ||
360 | } | ||
357 | else | 361 | else |
358 | errorMessage = "Upload failed: " + responseMap["Message"].AsString(); | 362 | { |
363 | errorMessage = "Response format was invalid:\n" + responseStr; | ||
364 | } | ||
359 | } | 365 | } |
360 | else | 366 | catch (Exception ex) |
361 | { | 367 | { |
362 | errorMessage = "Response format was invalid:\n" + responseStr; | 368 | if (!String.IsNullOrEmpty(responseStr)) |
369 | errorMessage = "Failed to parse the response:\n" + responseStr; | ||
370 | else | ||
371 | errorMessage = "Failed to retrieve the response: " + ex.Message; | ||
363 | } | 372 | } |
364 | } | 373 | } |
365 | catch (Exception ex) | ||
366 | { | ||
367 | if (!String.IsNullOrEmpty(responseStr)) | ||
368 | errorMessage = "Failed to parse the response:\n" + responseStr; | ||
369 | else | ||
370 | errorMessage = "Failed to retrieve the response: " + ex.Message; | ||
371 | } | ||
372 | } | 374 | } |
373 | } | 375 | } |
374 | catch (WebException ex) | 376 | catch (WebException ex) |
@@ -378,6 +380,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
378 | 380 | ||
379 | m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: Failed to store asset \"{0}\" ({1}, {2}): {3}", | 381 | m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: Failed to store asset \"{0}\" ({1}, {2}): {3}", |
380 | asset.Name, asset.ID, asset.Metadata.ContentType, errorMessage); | 382 | asset.Name, asset.ID, asset.Metadata.ContentType, errorMessage); |
383 | |||
381 | return null; | 384 | return null; |
382 | } | 385 | } |
383 | 386 | ||
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index a391275..36325ce 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -38,12 +38,14 @@ using OpenSim.Framework; | |||
38 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Services.Interfaces; | 40 | using OpenSim.Services.Interfaces; |
41 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
41 | 42 | ||
42 | namespace OpenSim.Services.Connectors.SimianGrid | 43 | namespace OpenSim.Services.Connectors.SimianGrid |
43 | { | 44 | { |
44 | /// <summary> | 45 | /// <summary> |
45 | /// Permissions bitflags | 46 | /// Permissions bitflags |
46 | /// </summary> | 47 | /// </summary> |
48 | /* | ||
47 | [Flags] | 49 | [Flags] |
48 | public enum PermissionMask : uint | 50 | public enum PermissionMask : uint |
49 | { | 51 | { |
@@ -55,6 +57,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
55 | Damage = 1 << 20, | 57 | Damage = 1 << 20, |
56 | All = 0x7FFFFFFF | 58 | All = 0x7FFFFFFF |
57 | } | 59 | } |
60 | */ | ||
58 | 61 | ||
59 | /// <summary> | 62 | /// <summary> |
60 | /// Connects avatar inventories to the SimianGrid backend | 63 | /// Connects avatar inventories to the SimianGrid backend |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 508baf7..ef2494a 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -315,7 +315,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
315 | 315 | ||
316 | try | 316 | try |
317 | { | 317 | { |
318 | OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000, false); | 318 | OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 30000, false); |
319 | bool success = result["success"].AsBoolean(); | 319 | bool success = result["success"].AsBoolean(); |
320 | if (result.ContainsKey("_Result")) | 320 | if (result.ContainsKey("_Result")) |
321 | { | 321 | { |
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index 5731e2f..6b2d710 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs | |||
@@ -162,7 +162,7 @@ namespace OpenSim.Services.Connectors | |||
162 | 162 | ||
163 | if (replyData != null) | 163 | if (replyData != null) |
164 | { | 164 | { |
165 | if (replyData.ContainsKey("result") && replyData.ContainsKey("result").ToString() == "null") | 165 | if (replyData.ContainsKey("result") && replyData["result"].ToString() == "null") |
166 | { | 166 | { |
167 | return accounts; | 167 | return accounts; |
168 | } | 168 | } |
diff --git a/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs index 58c7283..b488b36 100644 --- a/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/Friends/Properties/AssemblyInfo.cs b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs index dddb091..b11d07d 100644 --- a/OpenSim/Services/Friends/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index ee3b858..daebf8b 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -185,15 +185,15 @@ namespace OpenSim.Services.GridService | |||
185 | 185 | ||
186 | if (!m_AllowDuplicateNames) | 186 | if (!m_AllowDuplicateNames) |
187 | { | 187 | { |
188 | List<RegionData> dupe = m_Database.Get(regionInfos.RegionName, scopeID); | 188 | List<RegionData> dupe = m_Database.Get(Util.EscapeForLike(regionInfos.RegionName), scopeID); |
189 | if (dupe != null && dupe.Count > 0) | 189 | if (dupe != null && dupe.Count > 0) |
190 | { | 190 | { |
191 | foreach (RegionData d in dupe) | 191 | foreach (RegionData d in dupe) |
192 | { | 192 | { |
193 | if (d.RegionID != regionInfos.RegionID) | 193 | if (d.RegionID != regionInfos.RegionID) |
194 | { | 194 | { |
195 | m_log.WarnFormat("[GRID SERVICE]: Region {0} tried to register duplicate name with ID {1}.", | 195 | m_log.WarnFormat("[GRID SERVICE]: Region tried to register using a duplicate name. New region: {0} ({1}), existing region: {2} ({3}).", |
196 | regionInfos.RegionName, regionInfos.RegionID); | 196 | regionInfos.RegionName, regionInfos.RegionID, d.RegionName, d.RegionID); |
197 | return "Duplicate region name"; | 197 | return "Duplicate region name"; |
198 | } | 198 | } |
199 | } | 199 | } |
@@ -359,7 +359,7 @@ namespace OpenSim.Services.GridService | |||
359 | 359 | ||
360 | public GridRegion GetRegionByName(UUID scopeID, string name) | 360 | public GridRegion GetRegionByName(UUID scopeID, string name) |
361 | { | 361 | { |
362 | List<RegionData> rdatas = m_Database.Get(name, scopeID); | 362 | List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(name), scopeID); |
363 | if ((rdatas != null) && (rdatas.Count > 0)) | 363 | if ((rdatas != null) && (rdatas.Count > 0)) |
364 | return RegionData2RegionInfo(rdatas[0]); // get the first | 364 | return RegionData2RegionInfo(rdatas[0]); // get the first |
365 | 365 | ||
@@ -377,7 +377,7 @@ namespace OpenSim.Services.GridService | |||
377 | { | 377 | { |
378 | // m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); | 378 | // m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); |
379 | 379 | ||
380 | List<RegionData> rdatas = m_Database.Get(name + "%", scopeID); | 380 | List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(name) + "%", scopeID); |
381 | 381 | ||
382 | int count = 0; | 382 | int count = 0; |
383 | List<GridRegion> rinfos = new List<GridRegion>(); | 383 | List<GridRegion> rinfos = new List<GridRegion>(); |
@@ -586,7 +586,7 @@ namespace OpenSim.Services.GridService | |||
586 | 586 | ||
587 | string regionName = cmd[3]; | 587 | string regionName = cmd[3]; |
588 | 588 | ||
589 | List<RegionData> regions = m_Database.Get(regionName, UUID.Zero); | 589 | List<RegionData> regions = m_Database.Get(Util.EscapeForLike(regionName), UUID.Zero); |
590 | if (regions == null || regions.Count < 1) | 590 | if (regions == null || regions.Count < 1) |
591 | { | 591 | { |
592 | MainConsole.Instance.Output("No region with name {0} found", regionName); | 592 | MainConsole.Instance.Output("No region with name {0} found", regionName); |
@@ -716,7 +716,7 @@ namespace OpenSim.Services.GridService | |||
716 | return; | 716 | return; |
717 | } | 717 | } |
718 | 718 | ||
719 | List<RegionData> regions = m_Database.Get(cmd[3], UUID.Zero); | 719 | List<RegionData> regions = m_Database.Get(Util.EscapeForLike(cmd[3]), UUID.Zero); |
720 | if (regions == null || regions.Count < 1) | 720 | if (regions == null || regions.Count < 1) |
721 | { | 721 | { |
722 | MainConsole.Instance.Output("Region not found"); | 722 | MainConsole.Instance.Output("Region not found"); |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 743d089..8335724 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -128,7 +128,10 @@ namespace OpenSim.Services.GridService | |||
128 | 128 | ||
129 | m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); | 129 | m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); |
130 | 130 | ||
131 | m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty); | 131 | m_ThisGatekeeper = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
132 | new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); | ||
133 | // Legacy. Remove soon! | ||
134 | m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper); | ||
132 | try | 135 | try |
133 | { | 136 | { |
134 | m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper); | 137 | m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper); |
@@ -387,7 +390,7 @@ namespace OpenSim.Services.GridService | |||
387 | m_log.DebugFormat("[HYPERGRID LINKER]: Request to unlink {0}", mapName); | 390 | m_log.DebugFormat("[HYPERGRID LINKER]: Request to unlink {0}", mapName); |
388 | GridRegion regInfo = null; | 391 | GridRegion regInfo = null; |
389 | 392 | ||
390 | List<RegionData> regions = m_Database.Get(mapName, m_ScopeID); | 393 | List<RegionData> regions = m_Database.Get(Util.EscapeForLike(mapName), m_ScopeID); |
391 | if (regions != null && regions.Count > 0) | 394 | if (regions != null && regions.Count > 0) |
392 | { | 395 | { |
393 | OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]); | 396 | OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]); |
diff --git a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs index 5c0c8f4..b1e5e12 100644 --- a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 7b84d55..97a0afc 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs | |||
@@ -96,7 +96,9 @@ namespace OpenSim.Services.HypergridService | |||
96 | UUID.TryParse(scope, out m_ScopeID); | 96 | UUID.TryParse(scope, out m_ScopeID); |
97 | //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); | 97 | //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); |
98 | m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); | 98 | m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); |
99 | m_ExternalName = serverConfig.GetString("ExternalName", string.Empty); | 99 | m_ExternalName = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
100 | new string[] { "Startup", "Hypergrid", "GatekeeperService" }, String.Empty); | ||
101 | m_ExternalName = serverConfig.GetString("ExternalName", m_ExternalName); | ||
100 | if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/")) | 102 | if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/")) |
101 | m_ExternalName = m_ExternalName + "/"; | 103 | m_ExternalName = m_ExternalName + "/"; |
102 | 104 | ||
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs index 0c9cfd3..e8d7cca 100644 --- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs +++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs | |||
@@ -61,13 +61,13 @@ namespace OpenSim.Services.HypergridService | |||
61 | protected static IGridService m_GridService; | 61 | protected static IGridService m_GridService; |
62 | protected static IPresenceService m_PresenceService; | 62 | protected static IPresenceService m_PresenceService; |
63 | protected static IUserAgentService m_UserAgentService; | 63 | protected static IUserAgentService m_UserAgentService; |
64 | protected static IOfflineIMService m_OfflineIMService; | ||
64 | 65 | ||
65 | protected static IInstantMessageSimConnector m_IMSimConnector; | 66 | protected static IInstantMessageSimConnector m_IMSimConnector; |
66 | 67 | ||
67 | protected static Dictionary<UUID, object> m_UserLocationMap = new Dictionary<UUID, object>(); | 68 | protected static Dictionary<UUID, object> m_UserLocationMap = new Dictionary<UUID, object>(); |
68 | private static ExpiringCache<UUID, GridRegion> m_RegionCache; | 69 | private static ExpiringCache<UUID, GridRegion> m_RegionCache; |
69 | 70 | ||
70 | private static string m_RestURL; | ||
71 | private static bool m_ForwardOfflineGroupMessages; | 71 | private static bool m_ForwardOfflineGroupMessages; |
72 | private static bool m_InGatekeeper; | 72 | private static bool m_InGatekeeper; |
73 | 73 | ||
@@ -111,9 +111,14 @@ namespace OpenSim.Services.HypergridService | |||
111 | return; | 111 | return; |
112 | } | 112 | } |
113 | 113 | ||
114 | m_RestURL = cnf.GetString("OfflineMessageURL", string.Empty); | ||
115 | m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", false); | 114 | m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", false); |
116 | 115 | ||
116 | if (m_InGatekeeper) | ||
117 | { | ||
118 | string offlineIMService = cnf.GetString("OfflineIMService", string.Empty); | ||
119 | if (offlineIMService != string.Empty) | ||
120 | m_OfflineIMService = ServerUtils.LoadPlugin<IOfflineIMService>(offlineIMService, args); | ||
121 | } | ||
117 | } | 122 | } |
118 | } | 123 | } |
119 | 124 | ||
@@ -329,18 +334,28 @@ namespace OpenSim.Services.HypergridService | |||
329 | 334 | ||
330 | private bool UndeliveredMessage(GridInstantMessage im) | 335 | private bool UndeliveredMessage(GridInstantMessage im) |
331 | { | 336 | { |
332 | if (m_RestURL != string.Empty && (im.offline != 0) | 337 | if (m_OfflineIMService == null) |
333 | && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) | 338 | return false; |
334 | { | ||
335 | // m_log.DebugFormat("[HG IM SERVICE]: Message saved"); | ||
336 | 339 | ||
337 | return SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | 340 | if (im.dialog != (byte)InstantMessageDialog.MessageFromObject && |
338 | "POST", m_RestURL + "/SaveMessage/", im); | 341 | im.dialog != (byte)InstantMessageDialog.MessageFromAgent && |
339 | } | 342 | im.dialog != (byte)InstantMessageDialog.GroupNotice && |
340 | else | 343 | im.dialog != (byte)InstantMessageDialog.GroupInvitation && |
344 | im.dialog != (byte)InstantMessageDialog.InventoryOffered) | ||
341 | { | 345 | { |
342 | return false; | 346 | return false; |
343 | } | 347 | } |
348 | |||
349 | if (!m_ForwardOfflineGroupMessages) | ||
350 | { | ||
351 | if (im.dialog == (byte)InstantMessageDialog.GroupNotice || | ||
352 | im.dialog == (byte)InstantMessageDialog.GroupInvitation) | ||
353 | return false; | ||
354 | } | ||
355 | |||
356 | // m_log.DebugFormat("[HG IM SERVICE]: Message saved"); | ||
357 | string reason = string.Empty; | ||
358 | return m_OfflineIMService.StoreMessage(im, out reason); | ||
344 | } | 359 | } |
345 | } | 360 | } |
346 | } \ No newline at end of file | 361 | } \ No newline at end of file |
diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index 2e9bd40..326e68d 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs | |||
@@ -81,10 +81,8 @@ namespace OpenSim.Services.HypergridService | |||
81 | if (m_UserAccountService == null) | 81 | if (m_UserAccountService == null) |
82 | throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); | 82 | throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); |
83 | 83 | ||
84 | // legacy configuration [obsolete] | 84 | m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI", |
85 | m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty); | 85 | new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty); |
86 | // Preferred | ||
87 | m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL); | ||
88 | 86 | ||
89 | m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); | 87 | m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); |
90 | } | 88 | } |
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 784f136..eecf757 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -96,8 +96,8 @@ namespace OpenSim.Services.HypergridService | |||
96 | if (m_AvatarService == null) | 96 | if (m_AvatarService == null) |
97 | throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll)); | 97 | throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll)); |
98 | 98 | ||
99 | // Preferred | 99 | m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI", |
100 | m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL); | 100 | new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty); |
101 | 101 | ||
102 | // m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); | 102 | // m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); |
103 | } | 103 | } |
diff --git a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs index 49f2176..8d66f1b 100644 --- a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 416ad16..ec76508 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -131,12 +131,18 @@ namespace OpenSim.Services.HypergridService | |||
131 | LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions); | 131 | LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions); |
132 | LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_TripsDisallowedExceptions); | 132 | LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_TripsDisallowedExceptions); |
133 | 133 | ||
134 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); | 134 | m_GridName = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
135 | if (m_GridName == string.Empty) | 135 | new string[] { "Startup", "Hypergrid", "UserAgentService" }, String.Empty); |
136 | if (string.IsNullOrEmpty(m_GridName)) // Legacy. Remove soon. | ||
136 | { | 137 | { |
137 | serverConfig = config.Configs["GatekeeperService"]; | ||
138 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); | 138 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); |
139 | if (m_GridName == string.Empty) | ||
140 | { | ||
141 | serverConfig = config.Configs["GatekeeperService"]; | ||
142 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); | ||
143 | } | ||
139 | } | 144 | } |
145 | |||
140 | if (!m_GridName.EndsWith("/")) | 146 | if (!m_GridName.EndsWith("/")) |
141 | m_GridName = m_GridName + "/"; | 147 | m_GridName = m_GridName + "/"; |
142 | 148 | ||
diff --git a/OpenSim/Services/Interfaces/IOfflineIMService.cs b/OpenSim/Services/Interfaces/IOfflineIMService.cs new file mode 100644 index 0000000..2848967 --- /dev/null +++ b/OpenSim/Services/Interfaces/IOfflineIMService.cs | |||
@@ -0,0 +1,115 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | |||
30 | using OpenSim.Framework; | ||
31 | using OpenMetaverse; | ||
32 | |||
33 | namespace OpenSim.Services.Interfaces | ||
34 | { | ||
35 | public interface IOfflineIMService | ||
36 | { | ||
37 | List<GridInstantMessage> GetMessages(UUID principalID); | ||
38 | bool StoreMessage(GridInstantMessage im, out string reason); | ||
39 | } | ||
40 | |||
41 | public class OfflineIMDataUtils | ||
42 | { | ||
43 | public static GridInstantMessage GridInstantMessage(Dictionary<string, object> dict) | ||
44 | { | ||
45 | GridInstantMessage im = new GridInstantMessage(); | ||
46 | |||
47 | if (dict.ContainsKey("BinaryBucket") && dict["BinaryBucket"] != null) | ||
48 | im.binaryBucket = OpenMetaverse.Utils.HexStringToBytes(dict["BinaryBucket"].ToString(), true); | ||
49 | |||
50 | if (dict.ContainsKey("Dialog") && dict["Dialog"] != null) | ||
51 | im.dialog = byte.Parse(dict["Dialog"].ToString()); | ||
52 | |||
53 | if (dict.ContainsKey("FromAgentID") && dict["FromAgentID"] != null) | ||
54 | im.fromAgentID = new Guid(dict["FromAgentID"].ToString()); | ||
55 | |||
56 | if (dict.ContainsKey("FromAgentName") && dict["FromAgentName"] != null) | ||
57 | im.fromAgentName = dict["FromAgentName"].ToString(); | ||
58 | else | ||
59 | im.fromAgentName = string.Empty; | ||
60 | |||
61 | if (dict.ContainsKey("FromGroup") && dict["FromGroup"] != null) | ||
62 | im.fromGroup = bool.Parse(dict["FromGroup"].ToString()); | ||
63 | |||
64 | if (dict.ContainsKey("SessionID") && dict["SessionID"] != null) | ||
65 | im.imSessionID = new Guid(dict["SessionID"].ToString()); | ||
66 | |||
67 | if (dict.ContainsKey("Message") && dict["Message"] != null) | ||
68 | im.message = dict["Message"].ToString(); | ||
69 | else | ||
70 | im.message = string.Empty; | ||
71 | |||
72 | if (dict.ContainsKey("Offline") && dict["Offline"] != null) | ||
73 | im.offline = byte.Parse(dict["Offline"].ToString()); | ||
74 | |||
75 | if (dict.ContainsKey("EstateID") && dict["EstateID"] != null) | ||
76 | im.ParentEstateID = UInt32.Parse(dict["EstateID"].ToString()); | ||
77 | |||
78 | if (dict.ContainsKey("Position") && dict["Position"] != null) | ||
79 | im.Position = Vector3.Parse(dict["Position"].ToString()); | ||
80 | |||
81 | if (dict.ContainsKey("RegionID") && dict["RegionID"] != null) | ||
82 | im.RegionID = new Guid(dict["RegionID"].ToString()); | ||
83 | |||
84 | if (dict.ContainsKey("Timestamp") && dict["Timestamp"] != null) | ||
85 | im.timestamp = UInt32.Parse(dict["Timestamp"].ToString()); | ||
86 | |||
87 | if (dict.ContainsKey("ToAgentID") && dict["ToAgentID"] != null) | ||
88 | im.toAgentID = new Guid(dict["ToAgentID"].ToString()); | ||
89 | |||
90 | return im; | ||
91 | } | ||
92 | |||
93 | public static Dictionary<string, object> GridInstantMessage(GridInstantMessage im) | ||
94 | { | ||
95 | Dictionary<string, object> dict = new Dictionary<string, object>(); | ||
96 | |||
97 | dict["BinaryBucket"] = OpenMetaverse.Utils.BytesToHexString(im.binaryBucket, im.binaryBucket.Length, null); | ||
98 | dict["Dialog"] = im.dialog.ToString(); | ||
99 | dict["FromAgentID"] = im.fromAgentID.ToString(); | ||
100 | dict["FromAgentName"] = im.fromAgentName == null ? string.Empty : im.fromAgentName; | ||
101 | dict["FromGroup"] = im.fromGroup.ToString(); | ||
102 | dict["SessionID"] = im.imSessionID.ToString(); | ||
103 | dict["Message"] = im.message == null ? string.Empty : im.message; | ||
104 | dict["Offline"] = im.offline.ToString(); | ||
105 | dict["EstateID"] = im.ParentEstateID.ToString(); | ||
106 | dict["Position"] = im.Position.ToString(); | ||
107 | dict["RegionID"] = im.RegionID.ToString(); | ||
108 | dict["Timestamp"] = im.timestamp.ToString(); | ||
109 | dict["ToAgentID"] = im.toAgentID.ToString(); | ||
110 | |||
111 | return dict; | ||
112 | } | ||
113 | |||
114 | } | ||
115 | } | ||
diff --git a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs index 4723553..47ece75 100644 --- a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/InventoryService/LibraryService.cs b/OpenSim/Services/InventoryService/LibraryService.cs index f90895b..c4a5572 100644 --- a/OpenSim/Services/InventoryService/LibraryService.cs +++ b/OpenSim/Services/InventoryService/LibraryService.cs | |||
@@ -38,6 +38,7 @@ using OpenSim.Services.Interfaces; | |||
38 | using log4net; | 38 | using log4net; |
39 | using Nini.Config; | 39 | using Nini.Config; |
40 | using OpenMetaverse; | 40 | using OpenMetaverse; |
41 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
41 | 42 | ||
42 | namespace OpenSim.Services.InventoryService | 43 | namespace OpenSim.Services.InventoryService |
43 | { | 44 | { |
diff --git a/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs index 41ad9f8..bfae81f 100644 --- a/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 00faa44..7bad4b0 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -219,9 +219,15 @@ namespace OpenSim.Services.InventoryService | |||
219 | 219 | ||
220 | XInventoryFolder root = null; | 220 | XInventoryFolder root = null; |
221 | foreach (XInventoryFolder folder in folders) | 221 | foreach (XInventoryFolder folder in folders) |
222 | { | ||
222 | if (folder.folderName == "My Inventory") | 223 | if (folder.folderName == "My Inventory") |
224 | { | ||
223 | root = folder; | 225 | root = folder; |
224 | if (folders == null) // oops | 226 | break; |
227 | } | ||
228 | } | ||
229 | |||
230 | if (root == null) // oops | ||
225 | root = folders[0]; | 231 | root = folders[0]; |
226 | 232 | ||
227 | return ConvertToOpenSim(root); | 233 | return ConvertToOpenSim(root); |
@@ -249,6 +255,9 @@ namespace OpenSim.Services.InventoryService | |||
249 | { | 255 | { |
250 | // m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID); | 256 | // m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID); |
251 | 257 | ||
258 | if (type == AssetType.RootFolder) | ||
259 | return rootFolder; | ||
260 | |||
252 | XInventoryFolder[] folders = m_Database.GetFolders( | 261 | XInventoryFolder[] folders = m_Database.GetFolders( |
253 | new string[] { "agentID", "parentFolderID", "type"}, | 262 | new string[] { "agentID", "parentFolderID", "type"}, |
254 | new string[] { rootFolder.Owner.ToString(), rootFolder.ID.ToString(), ((int)type).ToString() }); | 263 | new string[] { rootFolder.Owner.ToString(), rootFolder.ID.ToString(), ((int)type).ToString() }); |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index cbb6e6c..ede2353 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -110,7 +110,8 @@ namespace OpenSim.Services.LLLoginService | |||
110 | m_RequireInventory = m_LoginServerConfig.GetBoolean("RequireInventory", true); | 110 | m_RequireInventory = m_LoginServerConfig.GetBoolean("RequireInventory", true); |
111 | m_AllowRemoteSetLoginLevel = m_LoginServerConfig.GetBoolean("AllowRemoteSetLoginLevel", false); | 111 | m_AllowRemoteSetLoginLevel = m_LoginServerConfig.GetBoolean("AllowRemoteSetLoginLevel", false); |
112 | m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0); | 112 | m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0); |
113 | m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty); | 113 | m_GatekeeperURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
114 | new string[] { "Startup", "Hypergrid", "LoginService" }, String.Empty); | ||
114 | m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); | 115 | m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); |
115 | m_ProfileURL = m_LoginServerConfig.GetString("ProfileServerURL", string.Empty); | 116 | m_ProfileURL = m_LoginServerConfig.GetString("ProfileServerURL", string.Empty); |
116 | m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty); | 117 | m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty); |
@@ -969,14 +970,25 @@ namespace OpenSim.Services.LLLoginService | |||
969 | // or fixing critical issues | 970 | // or fixing critical issues |
970 | // | 971 | // |
971 | if (cmd.Length > 2) | 972 | if (cmd.Length > 2) |
972 | Int32.TryParse(cmd[2], out m_MinLoginLevel); | 973 | { |
974 | if (Int32.TryParse(cmd[2], out m_MinLoginLevel)) | ||
975 | MainConsole.Instance.OutputFormat("Set minimum login level to {0}", m_MinLoginLevel); | ||
976 | else | ||
977 | MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid login level", cmd[2]); | ||
978 | } | ||
973 | break; | 979 | break; |
974 | case "reset": | 980 | |
981 | case "reset": | ||
975 | m_MinLoginLevel = 0; | 982 | m_MinLoginLevel = 0; |
983 | MainConsole.Instance.OutputFormat("Reset min login level to {0}", m_MinLoginLevel); | ||
976 | break; | 984 | break; |
985 | |||
977 | case "text": | 986 | case "text": |
978 | if (cmd.Length > 2) | 987 | if (cmd.Length > 2) |
988 | { | ||
979 | m_WelcomeMessage = cmd[2]; | 989 | m_WelcomeMessage = cmd[2]; |
990 | MainConsole.Instance.OutputFormat("Login welcome message set to '{0}'", m_WelcomeMessage); | ||
991 | } | ||
980 | break; | 992 | break; |
981 | } | 993 | } |
982 | } | 994 | } |
diff --git a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs index 62c6e0f..0a6daee 100644 --- a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs index 23eb664..19936e5 100644 --- a/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs index 8c03dd7..5d433df 100644 --- a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs index 24e1d16..e7d2d6f 100644 --- a/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 95c2935..772ab97 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -36,6 +36,7 @@ using OpenSim.Framework; | |||
36 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
37 | using OpenSim.Framework.Console; | 37 | using OpenSim.Framework.Console; |
38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
39 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
39 | 40 | ||
40 | namespace OpenSim.Services.UserAccountService | 41 | namespace OpenSim.Services.UserAccountService |
41 | { | 42 | { |
@@ -564,7 +565,7 @@ namespace OpenSim.Services.UserAccountService | |||
564 | return account; | 565 | return account; |
565 | } | 566 | } |
566 | 567 | ||
567 | private void CreateDefaultAppearanceEntries(UUID principalID) | 568 | protected void CreateDefaultAppearanceEntries(UUID principalID) |
568 | { | 569 | { |
569 | m_log.DebugFormat("[USER ACCOUNT SERVICE]: Creating default appearance items for {0}", principalID); | 570 | m_log.DebugFormat("[USER ACCOUNT SERVICE]: Creating default appearance items for {0}", principalID); |
570 | 571 | ||
@@ -684,4 +685,4 @@ namespace OpenSim.Services.UserAccountService | |||
684 | } | 685 | } |
685 | } | 686 | } |
686 | } | 687 | } |
687 | } \ No newline at end of file | 688 | } |