aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorlbsa712007-11-01 19:19:05 +0000
committerlbsa712007-11-01 19:19:05 +0000
commit4fad66f855544b9298ae2216c58c0f44009358a5 (patch)
tree07747305928e0072230b31c399d8a7e76442b77f /OpenSim/Framework
parentPartialy fixed a bug with collisions in BulletXPlugin. (diff)
downloadopensim-SC-4fad66f855544b9298ae2216c58c0f44009358a5.zip
opensim-SC-4fad66f855544b9298ae2216c58c0f44009358a5.tar.gz
opensim-SC-4fad66f855544b9298ae2216c58c0f44009358a5.tar.bz2
opensim-SC-4fad66f855544b9298ae2216c58c0f44009358a5.tar.xz
* Diuerse beavtificatems
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs4
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCache.cs6
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Framework/InventoryConfig.cs42
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs20
-rw-r--r--OpenSim/Framework/NetworkServersInfo.cs5
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs3
-rw-r--r--OpenSim/Framework/Servers/IStreamHandler.cs1
-rw-r--r--OpenSim/Framework/Servers/RestDeserialiseHandler.cs17
9 files changed, 49 insertions, 51 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 6222649..6be0852 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -52,10 +52,10 @@ namespace OpenSim.Framework.Communications.Cache
52 public List<AssetRequest> TextureRequests = new List<AssetRequest>(); //textures ready to be sent 52 public List<AssetRequest> TextureRequests = new List<AssetRequest>(); //textures ready to be sent
53 53
54 public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); 54 public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>();
55 //Assets requested from the asset server 55 //Assets requested from the asset server
56 56
57 public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); 57 public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>();
58 //Textures requested from the asset server 58 //Textures requested from the asset server
59 59
60 public Dictionary<LLUUID, TextureSender> SendingTextures = new Dictionary<LLUUID, TextureSender>(); 60 public Dictionary<LLUUID, TextureSender> SendingTextures = new Dictionary<LLUUID, TextureSender>();
61 private BlockingQueue<TextureSender> QueueTextures = new BlockingQueue<TextureSender>(); 61 private BlockingQueue<TextureSender> QueueTextures = new BlockingQueue<TextureSender>();
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
index ccf5024..74b2440 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Framework.Communications.Cache
90 { 90 {
91 InventoryFolderImpl createdFolder = 91 InventoryFolderImpl createdFolder =
92 userProfile.RootFolder.CreateNewSubFolder(folderID, folderName, folderType); 92 userProfile.RootFolder.CreateNewSubFolder(folderID, folderName, folderType);
93 93
94 if (createdFolder != null) 94 if (createdFolder != null)
95 { 95 {
96 m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, createdFolder); 96 m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, createdFolder);
@@ -119,7 +119,7 @@ namespace OpenSim.Framework.Communications.Cache
119 119
120 return; 120 return;
121 } 121 }
122 122
123 if ((fold = libraryRoot.HasSubFolder(folderID)) != null) 123 if ((fold = libraryRoot.HasSubFolder(folderID)) != null)
124 { 124 {
125 remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems()); 125 remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems());
@@ -129,7 +129,7 @@ namespace OpenSim.Framework.Communications.Cache
129 129
130 CachedUserInfo userProfile; 130 CachedUserInfo userProfile;
131 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 131 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
132 { 132 {
133 if (userProfile.RootFolder != null) 133 if (userProfile.RootFolder != null)
134 { 134 {
135 if (userProfile.RootFolder.folderID == folderID) 135 if (userProfile.RootFolder.folderID == folderID)
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 887be3b..62c50d5 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -444,4 +444,4 @@ namespace OpenSim.Framework
444 event Action<IClientAPI> OnConnectionClosed; 444 event Action<IClientAPI> OnConnectionClosed;
445 void SendLogoutPacket(); 445 void SendLogoutPacket();
446 } 446 }
447} 447} \ No newline at end of file
diff --git a/OpenSim/Framework/InventoryConfig.cs b/OpenSim/Framework/InventoryConfig.cs
index 8e64b68..1233196 100644
--- a/OpenSim/Framework/InventoryConfig.cs
+++ b/OpenSim/Framework/InventoryConfig.cs
@@ -1,7 +1,3 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework 1namespace OpenSim.Framework
6{ 2{
7 /// <summary> 3 /// <summary>
@@ -23,18 +19,28 @@ namespace OpenSim.Framework
23 19
24 public InventoryConfig(string description, string filename) 20 public InventoryConfig(string description, string filename)
25 { 21 {
26 configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); 22 configMember =
23 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
27 configMember.performConfigurationRetrieve(); 24 configMember.performConfigurationRetrieve();
28 } 25 }
29 26
30 public void loadConfigurationOptions() 27 public void loadConfigurationOptions()
31 { 28 {
32 configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); 29 configMember.addConfigurationOption("default_startup_message",
33 configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false); 30 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
34 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false); 31 "Default Startup Message", "Welcome to OGS", false);
35 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false); 32 configMember.addConfigurationOption("default_user_server",
36 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); 33 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
37 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Http Listener port", DefaultHttpPort.ToString(), false); 34 "Default User Server URI",
35 "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false);
36 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
37 "Key to send to user server", "null", false);
38 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
39 "Key to expect from user server", "null", false);
40 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
41 "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
42 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
43 "Http Listener port", DefaultHttpPort.ToString(), false);
38 } 44 }
39 45
40 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 46 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
@@ -42,26 +48,26 @@ namespace OpenSim.Framework
42 switch (configuration_key) 48 switch (configuration_key)
43 { 49 {
44 case "default_startup_message": 50 case "default_startup_message":
45 this.DefaultStartupMsg = (string)configuration_result; 51 DefaultStartupMsg = (string) configuration_result;
46 break; 52 break;
47 case "default_user_server": 53 case "default_user_server":
48 this.UserServerURL = (string)configuration_result; 54 UserServerURL = (string) configuration_result;
49 break; 55 break;
50 case "user_send_key": 56 case "user_send_key":
51 this.UserSendKey = (string)configuration_result; 57 UserSendKey = (string) configuration_result;
52 break; 58 break;
53 case "user_recv_key": 59 case "user_recv_key":
54 this.UserRecvKey = (string)configuration_result; 60 UserRecvKey = (string) configuration_result;
55 break; 61 break;
56 case "database_provider": 62 case "database_provider":
57 this.DatabaseProvider = (string)configuration_result; 63 DatabaseProvider = (string) configuration_result;
58 break; 64 break;
59 case "http_port": 65 case "http_port":
60 HttpPort = (int)configuration_result; 66 HttpPort = (int) configuration_result;
61 break; 67 break;
62 } 68 }
63 69
64 return true; 70 return true;
65 } 71 }
66 } 72 }
67} 73} \ No newline at end of file
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 331013f..80f631e 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -25,10 +25,9 @@
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;
29using System.Xml.Serialization;
30using System.Collections; 28using System.Collections;
31using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Xml.Serialization;
32using libsecondlife; 31using libsecondlife;
33 32
34namespace OpenSim.Framework 33namespace OpenSim.Framework
@@ -251,23 +250,20 @@ namespace OpenSim.Framework
251 * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize 250 * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
252 * into this simpler class, and then use that. 251 * into this simpler class, and then use that.
253 */ 252 */
253
254 [XmlRoot(ElementName = "inventory", IsNullable = true)] 254 [XmlRoot(ElementName = "inventory", IsNullable = true)]
255 public class SerializableInventory 255 public class SerializableInventory
256 { 256 {
257 [XmlRoot(ElementName = "folder", IsNullable = true)] 257 [XmlRoot(ElementName = "folder", IsNullable = true)]
258 public class SerializableFolder : InventoryFolderBase 258 public class SerializableFolder : InventoryFolderBase
259 { 259 {
260 [XmlArray(ElementName = "folders", IsNullable = true)] 260 [XmlArray(ElementName = "folders", IsNullable = true)] [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof (SerializableFolder))] public
261 [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof(SerializableFolder))] 261 ArrayList SubFolders;
262 public ArrayList SubFolders;
263 262
264 [XmlArray(ElementName = "items", IsNullable = true)] 263 [XmlArray(ElementName = "items", IsNullable = true)] [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof (InventoryItemBase))] public ArrayList
265 [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof(InventoryItemBase))] 264 Items;
266 public ArrayList Items;
267 } 265 }
268 266
269 [XmlElement(ElementName = "folder", IsNullable = true)] 267 [XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
270 public SerializableFolder root;
271 } 268 }
272 269} \ No newline at end of file
273}
diff --git a/OpenSim/Framework/NetworkServersInfo.cs b/OpenSim/Framework/NetworkServersInfo.cs
index b9ce143..1c76320 100644
--- a/OpenSim/Framework/NetworkServersInfo.cs
+++ b/OpenSim/Framework/NetworkServersInfo.cs
@@ -94,7 +94,8 @@ namespace OpenSim.Framework
94 UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null"); 94 UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null");
95 AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL); 95 AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL);
96 InventoryURL = config.Configs["Network"].GetString("inventory_server_url", 96 InventoryURL = config.Configs["Network"].GetString("inventory_server_url",
97 "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString()); 97 "http://127.0.0.1:" +
98 InventoryConfig.DefaultHttpPort.ToString());
98 } 99 }
99 } 100 }
100} 101} \ No newline at end of file
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index a4a7b2b..e645e7b 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -107,11 +107,10 @@ namespace OpenSim.Framework.Servers
107 { 107 {
108 IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; 108 IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
109 buffer = streamedRequestHandler.Handle(path, request.InputStream); 109 buffer = streamedRequestHandler.Handle(path, request.InputStream);
110
111 } 110 }
112 else 111 else
113 { 112 {
114 IStreamHandler streamHandler = (IStreamHandler)requestHandler; 113 IStreamHandler streamHandler = (IStreamHandler) requestHandler;
115 114
116 using (MemoryStream memoryStream = new MemoryStream()) 115 using (MemoryStream memoryStream = new MemoryStream())
117 { 116 {
diff --git a/OpenSim/Framework/Servers/IStreamHandler.cs b/OpenSim/Framework/Servers/IStreamHandler.cs
index 6dc7189..c87937a 100644
--- a/OpenSim/Framework/Servers/IStreamHandler.cs
+++ b/OpenSim/Framework/Servers/IStreamHandler.cs
@@ -53,5 +53,4 @@ namespace OpenSim.Framework.Servers
53 // Handle request stream, return byte array 53 // Handle request stream, return byte array
54 void Handle(string path, Stream request, Stream response); 54 void Handle(string path, Stream request, Stream response);
55 } 55 }
56
57} \ No newline at end of file 56} \ No newline at end of file
diff --git a/OpenSim/Framework/Servers/RestDeserialiseHandler.cs b/OpenSim/Framework/Servers/RestDeserialiseHandler.cs
index 28084e2..adf5c3f 100644
--- a/OpenSim/Framework/Servers/RestDeserialiseHandler.cs
+++ b/OpenSim/Framework/Servers/RestDeserialiseHandler.cs
@@ -1,6 +1,3 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.IO; 1using System.IO;
5using System.Xml; 2using System.Xml;
6using System.Xml.Serialization; 3using System.Xml.Serialization;
@@ -20,22 +17,22 @@ namespace OpenSim.Framework.Servers
20 m_method = method; 17 m_method = method;
21 } 18 }
22 19
23 public void Handle(string path, Stream request, Stream responseStream ) 20 public void Handle(string path, Stream request, Stream responseStream)
24 { 21 {
25 TRequest deserial; 22 TRequest deserial;
26 using (XmlTextReader xmlReader = new XmlTextReader(request)) 23 using (XmlTextReader xmlReader = new XmlTextReader(request))
27 { 24 {
28 XmlSerializer deserializer = new XmlSerializer(typeof(TRequest)); 25 XmlSerializer deserializer = new XmlSerializer(typeof (TRequest));
29 deserial = (TRequest)deserializer.Deserialize(xmlReader); 26 deserial = (TRequest) deserializer.Deserialize(xmlReader);
30 } 27 }
31 28
32 TResponse response = m_method(deserial); 29 TResponse response = m_method(deserial);
33 30
34 using (XmlWriter xmlWriter = XmlTextWriter.Create( responseStream )) 31 using (XmlWriter xmlWriter = XmlTextWriter.Create(responseStream))
35 { 32 {
36 XmlSerializer serializer = new XmlSerializer(typeof(TResponse)); 33 XmlSerializer serializer = new XmlSerializer(typeof (TResponse));
37 serializer.Serialize(xmlWriter, response ); 34 serializer.Serialize(xmlWriter, response);
38 } 35 }
39 } 36 }
40 } 37 }
41} 38} \ No newline at end of file