aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/AssetDataBase.cs11
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs78
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs36
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs10
-rw-r--r--OpenSim/Framework/Communications/IUserService.cs2
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs5
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs8
-rw-r--r--OpenSim/Framework/Servers/GetAssetStreamHandler.cs67
-rw-r--r--OpenSim/Region/Communications/Hypergrid/HGUserServices.cs5
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs168
12 files changed, 241 insertions, 153 deletions
diff --git a/OpenSim/Data/AssetDataBase.cs b/OpenSim/Data/AssetDataBase.cs
index d699f17..e67d9cb 100644
--- a/OpenSim/Data/AssetDataBase.cs
+++ b/OpenSim/Data/AssetDataBase.cs
@@ -25,7 +25,10 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text;
31using System.Text.RegularExpressions;
29using OpenMetaverse; 32using OpenMetaverse;
30using OpenSim.Framework; 33using OpenSim.Framework;
31 34
@@ -33,7 +36,13 @@ namespace OpenSim.Data
33{ 36{
34 public abstract class AssetDataBase : IAssetDataPlugin 37 public abstract class AssetDataBase : IAssetDataPlugin
35 { 38 {
36 public abstract AssetBase FetchAsset(UUID uuid); 39 public virtual AssetBase FetchAsset(UUID uuid)
40 {
41 return FetchStoredAsset(uuid);
42 }
43
44 protected abstract AssetBase FetchStoredAsset(UUID uuid);
45
37 public abstract void CreateAsset(AssetBase asset); 46 public abstract void CreateAsset(AssetBase asset);
38 public abstract void UpdateAsset(AssetBase asset); 47 public abstract void UpdateAsset(AssetBase asset);
39 public abstract bool ExistsAsset(UUID uuid); 48 public abstract bool ExistsAsset(UUID uuid);
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index 54578bc..927b02b 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -43,11 +43,11 @@ namespace OpenSim.Data.MSSQL
43 private const string _migrationStore = "AssetStore"; 43 private const string _migrationStore = "AssetStore";
44 44
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 private long TicksToEpoch; 46 private long m_ticksToEpoch;
47 /// <summary> 47 /// <summary>
48 /// Database manager 48 /// Database manager
49 /// </summary> 49 /// </summary>
50 private MSSQLManager database; 50 private MSSQLManager m_database;
51 51
52 #region IPlugin Members 52 #region IPlugin Members
53 53
@@ -72,11 +72,11 @@ namespace OpenSim.Data.MSSQL
72 /// <param name="connectionString">connect string</param> 72 /// <param name="connectionString">connect string</param>
73 override public void Initialise(string connectionString) 73 override public void Initialise(string connectionString)
74 { 74 {
75 TicksToEpoch = new System.DateTime(1970, 1, 1).Ticks; 75 m_ticksToEpoch = new System.DateTime(1970, 1, 1).Ticks;
76 76
77 if (!string.IsNullOrEmpty(connectionString)) 77 if (!string.IsNullOrEmpty(connectionString))
78 { 78 {
79 database = new MSSQLManager(connectionString); 79 m_database = new MSSQLManager(connectionString);
80 } 80 }
81 else 81 else
82 { 82 {
@@ -88,13 +88,13 @@ namespace OpenSim.Data.MSSQL
88 string settingUserId = gridDataMSSqlFile.ParseFileReadValue("user_id"); 88 string settingUserId = gridDataMSSqlFile.ParseFileReadValue("user_id");
89 string settingPassword = gridDataMSSqlFile.ParseFileReadValue("password"); 89 string settingPassword = gridDataMSSqlFile.ParseFileReadValue("password");
90 90
91 database = 91 m_database =
92 new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, 92 new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId,
93 settingPassword); 93 settingPassword);
94 } 94 }
95 95
96 //New migration to check for DB changes 96 //New migration to check for DB changes
97 database.CheckMigration(_migrationStore); 97 m_database.CheckMigration(_migrationStore);
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
@@ -102,7 +102,7 @@ namespace OpenSim.Data.MSSQL
102 /// </summary> 102 /// </summary>
103 override public string Version 103 override public string Version
104 { 104 {
105 get { return database.getVersion(); } 105 get { return m_database.getVersion(); }
106 } 106 }
107 107
108 /// <summary> 108 /// <summary>
@@ -118,15 +118,15 @@ namespace OpenSim.Data.MSSQL
118 #region IAssetDataPlugin Members 118 #region IAssetDataPlugin Members
119 119
120 /// <summary> 120 /// <summary>
121 /// Fetch Asset from database 121 /// Fetch Asset from m_database
122 /// </summary> 122 /// </summary>
123 /// <param name="assetID">the asset UUID</param> 123 /// <param name="assetID">the asset UUID</param>
124 /// <returns></returns> 124 /// <returns></returns>
125 override public AssetBase FetchAsset(UUID assetID) 125 override protected AssetBase FetchStoredAsset(UUID assetID)
126 { 126 {
127 using (AutoClosingSqlCommand command = database.Query("SELECT * FROM assets WHERE id = @id")) 127 using (AutoClosingSqlCommand command = m_database.Query("SELECT * FROM assets WHERE id = @id"))
128 { 128 {
129 command.Parameters.Add(database.CreateParameter("id", assetID)); 129 command.Parameters.Add(m_database.CreateParameter("id", assetID));
130 using (IDataReader reader = command.ExecuteReader()) 130 using (IDataReader reader = command.ExecuteReader())
131 { 131 {
132 if (reader.Read()) 132 if (reader.Read())
@@ -148,7 +148,7 @@ namespace OpenSim.Data.MSSQL
148 } 148 }
149 149
150 /// <summary> 150 /// <summary>
151 /// Create asset in database 151 /// Create asset in m_database
152 /// </summary> 152 /// </summary>
153 /// <param name="asset">the asset</param> 153 /// <param name="asset">the asset</param>
154 override public void CreateAsset(AssetBase asset) 154 override public void CreateAsset(AssetBase asset)
@@ -158,33 +158,33 @@ namespace OpenSim.Data.MSSQL
158 return; 158 return;
159 } 159 }
160 160
161 using (AutoClosingSqlCommand command = database.Query( 161 using (AutoClosingSqlCommand command = m_database.Query(
162 "INSERT INTO assets ([id], [name], [description], [assetType], [local], [temporary], [create_time], [access_time], [data])" + 162 "INSERT INTO assets ([id], [name], [description], [assetType], [local], [temporary], [create_time], [access_time], [data])" +
163 " VALUES " + 163 " VALUES " +
164 "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)")) 164 "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)"))
165 { 165 {
166 int now = (int)((System.DateTime.Now.Ticks - TicksToEpoch) / 10000000); 166 int now = (int)((System.DateTime.Now.Ticks - m_ticksToEpoch) / 10000000);
167 command.Parameters.Add(database.CreateParameter("id", asset.FullID)); 167 command.Parameters.Add(m_database.CreateParameter("id", asset.FullID));
168 command.Parameters.Add(database.CreateParameter("name", asset.Name)); 168 command.Parameters.Add(m_database.CreateParameter("name", asset.Name));
169 command.Parameters.Add(database.CreateParameter("description", asset.Description)); 169 command.Parameters.Add(m_database.CreateParameter("description", asset.Description));
170 command.Parameters.Add(database.CreateParameter("assetType", asset.Type)); 170 command.Parameters.Add(m_database.CreateParameter("assetType", asset.Type));
171 command.Parameters.Add(database.CreateParameter("local", asset.Local)); 171 command.Parameters.Add(m_database.CreateParameter("local", asset.Local));
172 command.Parameters.Add(database.CreateParameter("temporary", asset.Temporary)); 172 command.Parameters.Add(m_database.CreateParameter("temporary", asset.Temporary));
173 command.Parameters.Add(database.CreateParameter("access_time", now)); 173 command.Parameters.Add(m_database.CreateParameter("access_time", now));
174 command.Parameters.Add(database.CreateParameter("create_time", now)); 174 command.Parameters.Add(m_database.CreateParameter("create_time", now));
175 command.Parameters.Add(database.CreateParameter("data", asset.Data)); 175 command.Parameters.Add(m_database.CreateParameter("data", asset.Data));
176 176
177 command.ExecuteNonQuery(); 177 command.ExecuteNonQuery();
178 } 178 }
179 } 179 }
180 180
181 /// <summary> 181 /// <summary>
182 /// Update asset in database 182 /// Update asset in m_database
183 /// </summary> 183 /// </summary>
184 /// <param name="asset">the asset</param> 184 /// <param name="asset">the asset</param>
185 override public void UpdateAsset(AssetBase asset) 185 override public void UpdateAsset(AssetBase asset)
186 { 186 {
187 using (AutoClosingSqlCommand command = database.Query("UPDATE assets set id = @id, " + 187 using (AutoClosingSqlCommand command = m_database.Query("UPDATE assets set id = @id, " +
188 "name = @name, " + 188 "name = @name, " +
189 "description = @description," + 189 "description = @description," +
190 "assetType = @assetType," + 190 "assetType = @assetType," +
@@ -193,14 +193,14 @@ namespace OpenSim.Data.MSSQL
193 "data = @data where " + 193 "data = @data where " +
194 "id = @keyId;")) 194 "id = @keyId;"))
195 { 195 {
196 command.Parameters.Add(database.CreateParameter("id", asset.FullID)); 196 command.Parameters.Add(m_database.CreateParameter("id", asset.FullID));
197 command.Parameters.Add(database.CreateParameter("name", asset.Name)); 197 command.Parameters.Add(m_database.CreateParameter("name", asset.Name));
198 command.Parameters.Add(database.CreateParameter("description", asset.Description)); 198 command.Parameters.Add(m_database.CreateParameter("description", asset.Description));
199 command.Parameters.Add(database.CreateParameter("assetType", asset.Type)); 199 command.Parameters.Add(m_database.CreateParameter("assetType", asset.Type));
200 command.Parameters.Add(database.CreateParameter("local", asset.Local)); 200 command.Parameters.Add(m_database.CreateParameter("local", asset.Local));
201 command.Parameters.Add(database.CreateParameter("temporary", asset.Temporary)); 201 command.Parameters.Add(m_database.CreateParameter("temporary", asset.Temporary));
202 command.Parameters.Add(database.CreateParameter("data", asset.Data)); 202 command.Parameters.Add(m_database.CreateParameter("data", asset.Data));
203 command.Parameters.Add(database.CreateParameter("@keyId", asset.FullID)); 203 command.Parameters.Add(m_database.CreateParameter("@keyId", asset.FullID));
204 204
205 try 205 try
206 { 206 {
@@ -216,9 +216,9 @@ namespace OpenSim.Data.MSSQL
216// Commented out since currently unused - this probably should be called in FetchAsset() 216// Commented out since currently unused - this probably should be called in FetchAsset()
217// private void UpdateAccessTime(AssetBase asset) 217// private void UpdateAccessTime(AssetBase asset)
218// { 218// {
219// using (AutoClosingSqlCommand cmd = database.Query("UPDATE assets SET access_time = @access_time WHERE id=@id")) 219// using (AutoClosingSqlCommand cmd = m_database.Query("UPDATE assets SET access_time = @access_time WHERE id=@id"))
220// { 220// {
221// int now = (int)((System.DateTime.Now.Ticks - TicksToEpoch) / 10000000); 221// int now = (int)((System.DateTime.Now.Ticks - m_ticksToEpoch) / 10000000);
222// cmd.Parameters.AddWithValue("@id", asset.FullID.ToString()); 222// cmd.Parameters.AddWithValue("@id", asset.FullID.ToString());
223// cmd.Parameters.AddWithValue("@access_time", now); 223// cmd.Parameters.AddWithValue("@access_time", now);
224// try 224// try
@@ -233,7 +233,7 @@ namespace OpenSim.Data.MSSQL
233// } 233// }
234 234
235 /// <summary> 235 /// <summary>
236 /// Check if asset exist in database 236 /// Check if asset exist in m_database
237 /// </summary> 237 /// </summary>
238 /// <param name="uuid"></param> 238 /// <param name="uuid"></param>
239 /// <returns>true if exist.</returns> 239 /// <returns>true if exist.</returns>
@@ -258,10 +258,10 @@ namespace OpenSim.Data.MSSQL
258 { 258 {
259 List<AssetMetadata> retList = new List<AssetMetadata>(count); 259 List<AssetMetadata> retList = new List<AssetMetadata>(count);
260 260
261 using (AutoClosingSqlCommand command = database.Query("SELECT (name,description,assetType,temporary,id), Row = ROW_NUMBER() OVER (ORDER BY (some column to order by)) WHERE Row >= @Start AND Row < @Start + @Count")) 261 using (AutoClosingSqlCommand command = m_database.Query("SELECT (name,description,assetType,temporary,id), Row = ROW_NUMBER() OVER (ORDER BY (some column to order by)) WHERE Row >= @Start AND Row < @Start + @Count"))
262 { 262 {
263 command.Parameters.Add(database.CreateParameter("start", start)); 263 command.Parameters.Add(m_database.CreateParameter("start", start));
264 command.Parameters.Add(database.CreateParameter("count", count)); 264 command.Parameters.Add(m_database.CreateParameter("count", count));
265 265
266 using (IDataReader reader = command.ExecuteReader()) 266 using (IDataReader reader = command.ExecuteReader())
267 { 267 {
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 20b2673..cc16389 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -109,6 +109,24 @@ namespace OpenSim.Data.MySQL
109 109
110 public override void Dispose() { } 110 public override void Dispose() { }
111 111
112 /// <summary>
113 /// Database provider version
114 /// </summary>
115 override public string Version
116 {
117 get { return _dbConnection.getVersion(); }
118 }
119
120 /// <summary>
121 /// The name of this DB provider
122 /// </summary>
123 override public string Name
124 {
125 get { return "MySQL Asset storage engine"; }
126 }
127
128 #endregion
129
112 #region IAssetDataPlugin Members 130 #region IAssetDataPlugin Members
113 131
114 /// <summary> 132 /// <summary>
@@ -117,7 +135,7 @@ namespace OpenSim.Data.MySQL
117 /// <param name="assetID">Asset UUID to fetch</param> 135 /// <param name="assetID">Asset UUID to fetch</param>
118 /// <returns>Return the asset</returns> 136 /// <returns>Return the asset</returns>
119 /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks> 137 /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks>
120 override public AssetBase FetchAsset(UUID assetID) 138 override protected AssetBase FetchStoredAsset(UUID assetID)
121 { 139 {
122 AssetBase asset = null; 140 AssetBase asset = null;
123 lock (_dbConnection) 141 lock (_dbConnection)
@@ -364,22 +382,6 @@ namespace OpenSim.Data.MySQL
364 382
365 #endregion 383 #endregion
366 384
367 /// <summary>
368 /// Database provider version
369 /// </summary>
370 override public string Version
371 {
372 get { return _dbConnection.getVersion(); }
373 }
374 385
375 /// <summary>
376 /// The name of this DB provider
377 /// </summary>
378 override public string Name
379 {
380 get { return "MySQL Asset storage engine"; }
381 }
382
383 #endregion
384 } 386 }
385} 387}
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index 4e8f708..6e13dbb 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Data.NHibernate
65 65
66 } 66 }
67 67
68 override public AssetBase FetchAsset(UUID uuid) 68 override protected AssetBase FetchStoredAsset(UUID uuid)
69 { 69 {
70 return (AssetBase)manager.Get(typeof(AssetBase), uuid); 70 return (AssetBase)manager.Get(typeof(AssetBase), uuid);
71 } 71 }
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index d3f1308..41a75a3 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Data.SQLite
90 /// </summary> 90 /// </summary>
91 /// <param name="uuid">UUID of ... ?</param> 91 /// <param name="uuid">UUID of ... ?</param>
92 /// <returns>Asset base</returns> 92 /// <returns>Asset base</returns>
93 override public AssetBase FetchAsset(UUID uuid) 93 override protected AssetBase FetchStoredAsset(UUID uuid)
94 { 94 {
95 lock (this) 95 lock (this)
96 { 96 {
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index cbb2a5a..4d2db17 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -336,7 +336,7 @@ namespace OpenSim.Framework.Communications.Cache
336 { 336 {
337 AssetInfo assetInf = new AssetInfo(asset); 337 AssetInfo assetInf = new AssetInfo(asset);
338 338
339 ProcessReceivedAsset(IsTexture, assetInf); 339 ProcessReceivedAsset(IsTexture, assetInf, null);
340 340
341 if (!m_memcache.Contains(assetInf.FullID)) 341 if (!m_memcache.Contains(assetInf.FullID))
342 { 342 {
@@ -391,11 +391,11 @@ namespace OpenSim.Framework.Communications.Cache
391 } 391 }
392 } 392 }
393 393
394 protected void ProcessReceivedAsset(bool IsTexture, AssetInfo assetInf) 394 protected void ProcessReceivedAsset(bool IsTexture, AssetInfo assetInf, IUserService userService)
395 { 395 {
396 if(!IsTexture && assetInf.ContainsReferences && false ) 396 if(!IsTexture && assetInf.ContainsReferences && false )
397 { 397 {
398 assetInf.Data = ProcessAssetData(assetInf.Data); 398 assetInf.Data = ProcessAssetData(assetInf.Data, userService );
399 } 399 }
400 } 400 }
401 401
@@ -554,11 +554,11 @@ namespace OpenSim.Framework.Communications.Cache
554 } 554 }
555 } 555 }
556 556
557 public byte[] ProcessAssetData(byte[] assetData) 557 public byte[] ProcessAssetData(byte[] assetData, IUserService userService)
558 { 558 {
559 string data = Encoding.ASCII.GetString(assetData); 559 string data = Encoding.ASCII.GetString(assetData);
560 560
561 data = ProcessAssetDataString(data, null); 561 data = ProcessAssetDataString(data, userService );
562 562
563 return Encoding.ASCII.GetBytes( data ); 563 return Encoding.ASCII.GetBytes( data );
564 } 564 }
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index 38c360a..3c09b40 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -50,6 +50,8 @@ namespace OpenSim.Framework.Communications
50 50
51 UserProfileData GetUserProfile(Uri uri); 51 UserProfileData GetUserProfile(Uri uri);
52 52
53 Uri GetUserUri(UserProfileData userProfile);
54
53 UserAgentData GetAgentByUUID(UUID userId); 55 UserAgentData GetAgentByUUID(UUID userId);
54 56
55 void ClearUserAgent(UUID avatarID); 57 void ClearUserAgent(UUID avatarID);
diff --git a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
index 3779f55..9d9810b 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
@@ -108,6 +108,11 @@ namespace OpenSim.Framework.Communications.Tests
108 return userProfile; 108 return userProfile;
109 } 109 }
110 110
111 public Uri GetUserUri(UserProfileData userProfile)
112 {
113 throw new NotImplementedException();
114 }
115
111 public UserAgentData GetAgentByUUID(UUID userId) 116 public UserAgentData GetAgentByUUID(UUID userId)
112 { 117 {
113 throw new NotImplementedException(); 118 throw new NotImplementedException();
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index b7280d3..155f5cd 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Framework.Communications
124 124
125 public UserProfileData GetUserProfile(Uri uri) 125 public UserProfileData GetUserProfile(Uri uri)
126 { 126 {
127 throw new System.NotImplementedException(); 127 throw new NotImplementedException();
128 } 128 }
129 129
130 public UserAgentData GetAgentByUUID(UUID userId) 130 public UserAgentData GetAgentByUUID(UUID userId)
@@ -142,6 +142,11 @@ namespace OpenSim.Framework.Communications
142 return null; 142 return null;
143 } 143 }
144 144
145 public Uri GetUserUri(UserProfileData userProfile)
146 {
147 throw new NotImplementedException();
148 }
149
145 // see IUserService 150 // see IUserService
146 public virtual UserProfileData GetUserProfile(UUID uuid) 151 public virtual UserProfileData GetUserProfile(UUID uuid)
147 { 152 {
@@ -835,6 +840,5 @@ namespace OpenSim.Framework.Communications
835 } 840 }
836 841
837 #endregion 842 #endregion
838
839 } 843 }
840} 844}
diff --git a/OpenSim/Framework/Servers/GetAssetStreamHandler.cs b/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
index 91d1a28..ffd7ef4 100644
--- a/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
+++ b/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
@@ -29,6 +29,7 @@ using System;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using System.Text; 31using System.Text;
32using System.Text.RegularExpressions;
32using System.Xml; 33using System.Xml;
33using System.Xml.Serialization; 34using System.Xml.Serialization;
34using log4net; 35using log4net;
@@ -64,9 +65,9 @@ namespace OpenSim.Framework.Servers
64 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 65 OSHttpRequest httpRequest, OSHttpResponse httpResponse)
65 { 66 {
66 string param = GetParam(path); 67 string param = GetParam(path);
67 byte[] result = new byte[] {}; 68 byte[] result = new byte[] { };
68 69
69 string[] p = param.Split(new char[] {'/', '?', '&'}, StringSplitOptions.RemoveEmptyEntries); 70 string[] p = param.Split(new char[] { '/', '?', '&' }, StringSplitOptions.RemoveEmptyEntries);
70 71
71 if (p.Length > 0) 72 if (p.Length > 0)
72 { 73 {
@@ -85,7 +86,12 @@ namespace OpenSim.Framework.Servers
85 AssetBase asset = m_assetProvider.FetchAsset(assetID); 86 AssetBase asset = m_assetProvider.FetchAsset(assetID);
86 if (asset != null) 87 if (asset != null)
87 { 88 {
88 XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); 89 if (asset.ContainsReferences && false)
90 {
91 asset.Data = ProcessOutgoingAssetData(asset.Data);
92 }
93
94 XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
89 MemoryStream ms = new MemoryStream(); 95 MemoryStream ms = new MemoryStream();
90 XmlTextWriter xw = new XmlTextWriter(ms, Encoding.UTF8); 96 XmlTextWriter xw = new XmlTextWriter(ms, Encoding.UTF8);
91 xw.Formatting = Formatting.Indented; 97 xw.Formatting = Formatting.Indented;
@@ -97,15 +103,7 @@ namespace OpenSim.Framework.Servers
97 103
98 result = ms.GetBuffer(); 104 result = ms.GetBuffer();
99 105
100//Ckrinke 1/11/09 Commenting out the succesful REST message as under heavy use there 106 Array.Resize<byte>(ref result, (int)ms.Length);
101//are multiple messages in a second and that is usually (in my experience) meaning
102//the logging itself is slowing down the program. Leaving the unsuccesful message
103//as we need to know about that path.
104// m_log.InfoFormat(
105// "[REST]: GET:/asset found {0} with name {1}, size {2} bytes",
106// assetID, asset.Name, result.Length);
107
108 Array.Resize<byte>(ref result, (int) ms.Length);
109 } 107 }
110 else 108 else
111 { 109 {
@@ -118,5 +116,50 @@ namespace OpenSim.Framework.Servers
118 116
119 return result; 117 return result;
120 } 118 }
119
120 private byte[] ProcessOutgoingAssetData(byte[] assetData)
121 {
122 string data = Encoding.ASCII.GetString(assetData);
123
124 data = ProcessAssetDataString(data);
125
126 return Encoding.ASCII.GetBytes(data);
127 }
128
129 public string ProcessAssetDataString(string data)
130 {
131 Regex regex = new Regex("(creator_id|owner_id)\\s+(\\S+)");
132
133 // IUserService userService = null;
134
135 data = regex.Replace(data, delegate(Match m)
136 {
137 string result = String.Empty;
138
139 string key = m.Groups[1].Captures[0].Value;
140
141 string value = m.Groups[2].Captures[0].Value;
142
143 Guid userUri;
144
145 switch (key)
146 {
147 case "creator_id":
148 userUri = new Guid(value);
149 // result = "creator_url " + userService(userService, userUri);
150 break;
151
152 case "owner_id":
153 userUri = new Guid(value);
154 // result = "owner_url " + ResolveUserUri(userService, userUri);
155 break;
156 }
157
158 return result;
159 });
160
161 return data;
162 }
163
121 } 164 }
122} \ No newline at end of file 165} \ No newline at end of file
diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
index 6a39876..ef08421 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
@@ -63,6 +63,11 @@ namespace OpenSim.Region.Communications.Hypergrid
63 throw new System.NotImplementedException(); 63 throw new System.NotImplementedException();
64 } 64 }
65 65
66 public Uri GetUserUri(UserProfileData userProfile)
67 {
68 throw new NotImplementedException();
69 }
70
66 /// <summary> 71 /// <summary>
67 /// Get a user agent from the user server 72 /// Get a user agent from the user server
68 /// </summary> 73 /// </summary>
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index 09c1d6a..3fe78a3 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Xml.Serialization;
34using log4net; 35using log4net;
35using Nwc.XmlRpc; 36using Nwc.XmlRpc;
36using OpenMetaverse; 37using OpenMetaverse;
@@ -62,46 +63,46 @@ namespace OpenSim.Region.Communications.OGS1
62 } 63 }
63 64
64 UserProfileData userData = new UserProfileData(); 65 UserProfileData userData = new UserProfileData();
65 userData.FirstName = (string) data["firstname"]; 66 userData.FirstName = (string)data["firstname"];
66 userData.SurName = (string) data["lastname"]; 67 userData.SurName = (string)data["lastname"];
67 userData.ID = new UUID((string) data["uuid"]); 68 userData.ID = new UUID((string)data["uuid"]);
68 userData.Created = Convert.ToInt32(data["profile_created"]); 69 userData.Created = Convert.ToInt32(data["profile_created"]);
69 userData.UserInventoryURI = (string) data["server_inventory"]; 70 userData.UserInventoryURI = (string)data["server_inventory"];
70 userData.UserAssetURI = (string) data["server_asset"]; 71 userData.UserAssetURI = (string)data["server_asset"];
71 userData.FirstLifeAboutText = (string) data["profile_firstlife_about"]; 72 userData.FirstLifeAboutText = (string)data["profile_firstlife_about"];
72 userData.FirstLifeImage = new UUID((string) data["profile_firstlife_image"]); 73 userData.FirstLifeImage = new UUID((string)data["profile_firstlife_image"]);
73 userData.CanDoMask = Convert.ToUInt32((string) data["profile_can_do"]); 74 userData.CanDoMask = Convert.ToUInt32((string)data["profile_can_do"]);
74 userData.WantDoMask = Convert.ToUInt32(data["profile_want_do"]); 75 userData.WantDoMask = Convert.ToUInt32(data["profile_want_do"]);
75 userData.AboutText = (string)data["profile_about"]; 76 userData.AboutText = (string)data["profile_about"];
76 userData.Image = new UUID((string) data["profile_image"]); 77 userData.Image = new UUID((string)data["profile_image"]);
77 userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]); 78 userData.LastLogin = Convert.ToInt32((string)data["profile_lastlogin"]);
78 userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]); 79 userData.HomeRegion = Convert.ToUInt64((string)data["home_region"]);
79 if (data.Contains("home_region_id")) 80 if (data.Contains("home_region_id"))
80 userData.HomeRegionID = new UUID((string)data["home_region_id"]); 81 userData.HomeRegionID = new UUID((string)data["home_region_id"]);
81 else 82 else
82 userData.HomeRegionID = UUID.Zero; 83 userData.HomeRegionID = UUID.Zero;
83 userData.HomeLocation = 84 userData.HomeLocation =
84 new Vector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]), 85 new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]),
85 (float) Convert.ToDecimal((string) data["home_coordinates_y"]), 86 (float)Convert.ToDecimal((string)data["home_coordinates_y"]),
86 (float) Convert.ToDecimal((string) data["home_coordinates_z"])); 87 (float)Convert.ToDecimal((string)data["home_coordinates_z"]));
87 userData.HomeLookAt = 88 userData.HomeLookAt =
88 new Vector3((float) Convert.ToDecimal((string) data["home_look_x"]), 89 new Vector3((float)Convert.ToDecimal((string)data["home_look_x"]),
89 (float) Convert.ToDecimal((string) data["home_look_y"]), 90 (float)Convert.ToDecimal((string)data["home_look_y"]),
90 (float) Convert.ToDecimal((string) data["home_look_z"])); 91 (float)Convert.ToDecimal((string)data["home_look_z"]));
91 if (data.Contains("user_flags")) 92 if (data.Contains("user_flags"))
92 userData.UserFlags = Convert.ToInt32((string) data["user_flags"]); 93 userData.UserFlags = Convert.ToInt32((string)data["user_flags"]);
93 if (data.Contains("god_level")) 94 if (data.Contains("god_level"))
94 userData.GodLevel = Convert.ToInt32((string) data["god_level"]); 95 userData.GodLevel = Convert.ToInt32((string)data["god_level"]);
95 96
96 if (data.Contains("custom_type")) 97 if (data.Contains("custom_type"))
97 userData.CustomType = (string) data["custom_type"]; 98 userData.CustomType = (string)data["custom_type"];
98 else 99 else
99 userData.CustomType = ""; 100 userData.CustomType = "";
100 if (userData.CustomType == null) 101 if (userData.CustomType == null)
101 userData.CustomType = ""; 102 userData.CustomType = "";
102 103
103 if (data.Contains("partner")) 104 if (data.Contains("partner"))
104 userData.Partner = new UUID((string) data["partner"]); 105 userData.Partner = new UUID((string)data["partner"]);
105 else 106 else
106 userData.Partner = UUID.Zero; 107 userData.Partner = UUID.Zero;
107 108
@@ -110,7 +111,21 @@ namespace OpenSim.Region.Communications.OGS1
110 111
111 public UserProfileData GetUserProfile(Uri uri) 112 public UserProfileData GetUserProfile(Uri uri)
112 { 113 {
113 throw new System.NotImplementedException(); 114 WebRequest request = WebRequest.Create(uri);
115
116 WebResponse webResponse = request.GetResponse();
117
118 XmlSerializer deserializer = new XmlSerializer(typeof(XmlRpcResponse));
119 XmlRpcResponse xmlRpcResponse = (XmlRpcResponse)deserializer.Deserialize(webResponse.GetResponseStream());
120
121 Hashtable respData = (Hashtable)xmlRpcResponse.Value;
122
123 return ConvertXMLRPCDataToUserProfile(respData);
124 }
125
126 public Uri GetUserUri(UserProfileData userProfile)
127 {
128 throw new NotImplementedException();
114 } 129 }
115 130
116 /// <summary> 131 /// <summary>
@@ -120,40 +135,42 @@ namespace OpenSim.Region.Communications.OGS1
120 /// <returns>null if the request fails</returns> 135 /// <returns>null if the request fails</returns>
121 public UserAgentData GetAgentByUUID(UUID userId) 136 public UserAgentData GetAgentByUUID(UUID userId)
122 { 137 {
123 try 138 try
124 { 139 {
125 Hashtable param = new Hashtable(); 140 Hashtable param = new Hashtable();
126 param["avatar_uuid"] = userId.ToString(); 141 param["avatar_uuid"] = userId.ToString();
127 IList parameters = new ArrayList(); 142 IList parameters = new ArrayList();
128 parameters.Add(param); 143 parameters.Add(param);
129 XmlRpcRequest req = new XmlRpcRequest("get_agent_by_uuid", parameters); 144 XmlRpcRequest req = new XmlRpcRequest("get_agent_by_uuid", parameters);
130 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 6000); 145 string url = m_commsManager.NetworkServersInfo.UserURL;
131 Hashtable respData = (Hashtable) resp.Value; 146
132 if (respData.Contains("error_type")) 147 XmlRpcResponse resp = req.Send(url, 6000);
133 { 148 Hashtable respData = (Hashtable)resp.Value;
134 //m_log.Warn("[GRID]: " + 149 if (respData.Contains("error_type"))
135 // "Error sent by user server when trying to get agent: (" + 150 {
136 // (string) respData["error_type"] + 151 //m_log.Warn("[GRID]: " +
137 // "): " + (string)respData["error_desc"]); 152 // "Error sent by user server when trying to get agent: (" +
138 return null; 153 // (string) respData["error_type"] +
139 } 154 // "): " + (string)respData["error_desc"]);
140 UUID sessionid = UUID.Zero; 155 return null;
141 156 }
142 UserAgentData userAgent = new UserAgentData(); 157 UUID sessionid = UUID.Zero;
143 userAgent.Handle = Convert.ToUInt64((string)respData["handle"]); 158
144 UUID.TryParse((string)respData["sessionid"], out sessionid); 159 UserAgentData userAgent = new UserAgentData();
145 userAgent.SessionID = sessionid; 160 userAgent.Handle = Convert.ToUInt64((string)respData["handle"]);
146 161 UUID.TryParse((string)respData["sessionid"], out sessionid);
147 if ((string)respData["agent_online"] == "TRUE") 162 userAgent.SessionID = sessionid;
148 { 163
149 userAgent.AgentOnline = true; 164 if ((string)respData["agent_online"] == "TRUE")
150 } 165 {
151 else 166 userAgent.AgentOnline = true;
152 { 167 }
153 userAgent.AgentOnline = false; 168 else
154 } 169 {
155 170 userAgent.AgentOnline = false;
156 return userAgent; 171 }
172
173 return userAgent;
157 } 174 }
158 catch (Exception e) 175 catch (Exception e)
159 { 176 {
@@ -192,16 +209,16 @@ namespace OpenSim.Region.Communications.OGS1
192 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(UUID queryID, Hashtable data) 209 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(UUID queryID, Hashtable data)
193 { 210 {
194 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 211 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
195 int pickercount = Convert.ToInt32((string) data["avcount"]); 212 int pickercount = Convert.ToInt32((string)data["avcount"]);
196 UUID respqueryID = new UUID((string) data["queryid"]); 213 UUID respqueryID = new UUID((string)data["queryid"]);
197 if (queryID == respqueryID) 214 if (queryID == respqueryID)
198 { 215 {
199 for (int i = 0; i < pickercount; i++) 216 for (int i = 0; i < pickercount; i++)
200 { 217 {
201 AvatarPickerAvatar apicker = new AvatarPickerAvatar(); 218 AvatarPickerAvatar apicker = new AvatarPickerAvatar();
202 UUID avatarID = new UUID((string) data["avatarid" + i.ToString()]); 219 UUID avatarID = new UUID((string)data["avatarid" + i.ToString()]);
203 string firstname = (string) data["firstname" + i.ToString()]; 220 string firstname = (string)data["firstname" + i.ToString()];
204 string lastname = (string) data["lastname" + i.ToString()]; 221 string lastname = (string)data["lastname" + i.ToString()];
205 apicker.AvatarID = avatarID; 222 apicker.AvatarID = avatarID;
206 apicker.firstName = firstname; 223 apicker.firstName = firstname;
207 apicker.lastName = lastname; 224 apicker.lastName = lastname;
@@ -298,13 +315,13 @@ namespace OpenSim.Region.Communications.OGS1
298 try 315 try
299 { 316 {
300 Hashtable param = new Hashtable(); 317 Hashtable param = new Hashtable();
301 param["queryid"] = (string) queryID.ToString(); 318 param["queryid"] = (string)queryID.ToString();
302 param["avquery"] = objAlphaNumericPattern.Replace(query, String.Empty); 319 param["avquery"] = objAlphaNumericPattern.Replace(query, String.Empty);
303 IList parameters = new ArrayList(); 320 IList parameters = new ArrayList();
304 parameters.Add(param); 321 parameters.Add(param);
305 XmlRpcRequest req = new XmlRpcRequest("get_avatar_picker_avatar", parameters); 322 XmlRpcRequest req = new XmlRpcRequest("get_avatar_picker_avatar", parameters);
306 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 3000); 323 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 3000);
307 Hashtable respData = (Hashtable) resp.Value; 324 Hashtable respData = (Hashtable)resp.Value;
308 pickerlist = ConvertXMLRPCDataToAvatarPickerList(queryID, respData); 325 pickerlist = ConvertXMLRPCDataToAvatarPickerList(queryID, respData);
309 } 326 }
310 catch (WebException e) 327 catch (WebException e)
@@ -331,7 +348,7 @@ namespace OpenSim.Region.Communications.OGS1
331 parameters.Add(param); 348 parameters.Add(param);
332 XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters); 349 XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters);
333 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 30000); 350 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 30000);
334 Hashtable respData = (Hashtable) resp.Value; 351 Hashtable respData = (Hashtable)resp.Value;
335 352
336 return ConvertXMLRPCDataToUserProfile(respData); 353 return ConvertXMLRPCDataToUserProfile(respData);
337 } 354 }
@@ -360,7 +377,7 @@ namespace OpenSim.Region.Communications.OGS1
360 parameters.Add(param); 377 parameters.Add(param);
361 XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters); 378 XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters);
362 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 30000); 379 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 30000);
363 Hashtable respData = (Hashtable) resp.Value; 380 Hashtable respData = (Hashtable)resp.Value;
364 381
365 return ConvertXMLRPCDataToUserProfile(respData); 382 return ConvertXMLRPCDataToUserProfile(respData);
366 } 383 }
@@ -423,11 +440,11 @@ namespace OpenSim.Region.Communications.OGS1
423 { 440 {
424 throw new Exception("The method or operation is not implemented."); 441 throw new Exception("The method or operation is not implemented.");
425 } 442 }
426 443
427 public bool ResetUserPassword(string firstName, string lastName, string newPassword) 444 public bool ResetUserPassword(string firstName, string lastName, string newPassword)
428 { 445 {
429 throw new Exception("The method or operation is not implemented."); 446 throw new Exception("The method or operation is not implemented.");
430 } 447 }
431 448
432 public bool UpdateUserProfile(UserProfileData userProfile) 449 public bool UpdateUserProfile(UserProfileData userProfile)
433 { 450 {
@@ -483,7 +500,7 @@ namespace OpenSim.Region.Communications.OGS1
483 m_log.Warn("[GRID]: Unable to update user profile, UserServer didn't understand me!"); 500 m_log.Warn("[GRID]: Unable to update user profile, UserServer didn't understand me!");
484 return false; 501 return false;
485 } 502 }
486 503
487 return true; 504 return true;
488 } 505 }
489 506
@@ -659,7 +676,7 @@ namespace OpenSim.Region.Communications.OGS1
659 parameters.Add(param); 676 parameters.Add(param);
660 XmlRpcRequest req = new XmlRpcRequest("get_user_friend_list", parameters); 677 XmlRpcRequest req = new XmlRpcRequest("get_user_friend_list", parameters);
661 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 8000); 678 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 8000);
662 Hashtable respData = (Hashtable) resp.Value; 679 Hashtable respData = (Hashtable)resp.Value;
663 680
664 if (respData != null && respData.Contains("avcount")) 681 if (respData != null && respData.Contains("avcount"))
665 { 682 {
@@ -676,7 +693,7 @@ namespace OpenSim.Region.Communications.OGS1
676 return buddylist; 693 return buddylist;
677 } 694 }
678 695
679 public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos (List<UUID> uuids) 696 public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos(List<UUID> uuids)
680 { 697 {
681 Dictionary<UUID, FriendRegionInfo> result = new Dictionary<UUID, FriendRegionInfo>(); 698 Dictionary<UUID, FriendRegionInfo> result = new Dictionary<UUID, FriendRegionInfo>();
682 699
@@ -697,10 +714,11 @@ namespace OpenSim.Region.Communications.OGS1
697 714
698 parameters.Add(map); 715 parameters.Add(map);
699 716
700 try { 717 try
718 {
701 XmlRpcRequest req = new XmlRpcRequest("get_presence_info_bulk", parameters); 719 XmlRpcRequest req = new XmlRpcRequest("get_presence_info_bulk", parameters);
702 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.MessagingURL, 8000); 720 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.MessagingURL, 8000);
703 Hashtable respData = resp != null ? (Hashtable) resp.Value : null; 721 Hashtable respData = resp != null ? (Hashtable)resp.Value : null;
704 722
705 if (respData == null || respData.ContainsKey("faultMessage")) 723 if (respData == null || respData.ContainsKey("faultMessage"))
706 { 724 {
@@ -748,7 +766,7 @@ namespace OpenSim.Region.Communications.OGS1
748 { 766 {
749 m_log.ErrorFormat("[OGS1 USER SERVICES]: Network problems when trying to fetch friend infos: {0}", e.Message); 767 m_log.ErrorFormat("[OGS1 USER SERVICES]: Network problems when trying to fetch friend infos: {0}", e.Message);
750 } 768 }
751 769
752 m_log.DebugFormat("[OGS1 USER SERVICES]: Returning {0} entries", result.Count); 770 m_log.DebugFormat("[OGS1 USER SERVICES]: Returning {0} entries", result.Count);
753 return result; 771 return result;
754 } 772 }
@@ -769,7 +787,7 @@ namespace OpenSim.Region.Communications.OGS1
769 parameters.Add(param); 787 parameters.Add(param);
770 XmlRpcRequest req = new XmlRpcRequest("get_avatar_appearance", parameters); 788 XmlRpcRequest req = new XmlRpcRequest("get_avatar_appearance", parameters);
771 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 8000); 789 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 8000);
772 Hashtable respData = (Hashtable) resp.Value; 790 Hashtable respData = (Hashtable)resp.Value;
773 791
774 return ConvertXMLRPCDataToAvatarAppearance(respData); 792 return ConvertXMLRPCDataToAvatarAppearance(respData);
775 } 793 }
@@ -792,7 +810,7 @@ namespace OpenSim.Region.Communications.OGS1
792 parameters.Add(param); 810 parameters.Add(param);
793 XmlRpcRequest req = new XmlRpcRequest("update_avatar_appearance", parameters); 811 XmlRpcRequest req = new XmlRpcRequest("update_avatar_appearance", parameters);
794 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 8000); 812 XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 8000);
795 Hashtable respData = (Hashtable) resp.Value; 813 Hashtable respData = (Hashtable)resp.Value;
796 814
797 if (respData != null) 815 if (respData != null)
798 { 816 {