diff options
Diffstat (limited to 'OpenSim/Framework')
114 files changed, 1340 insertions, 1299 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 0617a76..65a072f 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -35,12 +35,13 @@ namespace OpenSim.Framework | |||
35 | public AgentCircuitData() | 35 | public AgentCircuitData() |
36 | { | 36 | { |
37 | } | 37 | } |
38 | |||
38 | public AgentCircuitData(sAgentCircuitData cAgent) | 39 | public AgentCircuitData(sAgentCircuitData cAgent) |
39 | { | 40 | { |
40 | AgentID = new LLUUID(cAgent.AgentID); | 41 | AgentID = new LLUUID(cAgent.AgentID); |
41 | SessionID = new LLUUID(cAgent.SessionID); | 42 | SessionID = new LLUUID(cAgent.SessionID); |
42 | SecureSessionID = new LLUUID(cAgent.SecureSessionID); | 43 | SecureSessionID = new LLUUID(cAgent.SecureSessionID); |
43 | startpos = new LLVector3(cAgent.startposx,cAgent.startposy,cAgent.startposz); | 44 | startpos = new LLVector3(cAgent.startposx, cAgent.startposy, cAgent.startposz); |
44 | firstname = cAgent.firstname; | 45 | firstname = cAgent.firstname; |
45 | lastname = cAgent.lastname; | 46 | lastname = cAgent.lastname; |
46 | circuitcode = cAgent.circuitcode; | 47 | circuitcode = cAgent.circuitcode; |
@@ -69,6 +70,7 @@ namespace OpenSim.Framework | |||
69 | public sAgentCircuitData() | 70 | public sAgentCircuitData() |
70 | { | 71 | { |
71 | } | 72 | } |
73 | |||
72 | public sAgentCircuitData(AgentCircuitData cAgent) | 74 | public sAgentCircuitData(AgentCircuitData cAgent) |
73 | { | 75 | { |
74 | AgentID = cAgent.AgentID.UUID; | 76 | AgentID = cAgent.AgentID.UUID; |
@@ -85,6 +87,7 @@ namespace OpenSim.Framework | |||
85 | BaseFolder = cAgent.BaseFolder.UUID; | 87 | BaseFolder = cAgent.BaseFolder.UUID; |
86 | CapsPath = cAgent.CapsPath; | 88 | CapsPath = cAgent.CapsPath; |
87 | } | 89 | } |
90 | |||
88 | public Guid AgentID; | 91 | public Guid AgentID; |
89 | public Guid SessionID; | 92 | public Guid SessionID; |
90 | public Guid SecureSessionID; | 93 | public Guid SecureSessionID; |
@@ -98,8 +101,5 @@ namespace OpenSim.Framework | |||
98 | public Guid InventoryFolder; | 101 | public Guid InventoryFolder; |
99 | public Guid BaseFolder; | 102 | public Guid BaseFolder; |
100 | public string CapsPath = ""; | 103 | public string CapsPath = ""; |
101 | |||
102 | |||
103 | |||
104 | } | 104 | } |
105 | } | 105 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/AgentCircuitManager.cs b/OpenSim/Framework/AgentCircuitManager.cs index 2803a4a..938dce8 100644 --- a/OpenSim/Framework/AgentCircuitManager.cs +++ b/OpenSim/Framework/AgentCircuitManager.cs | |||
@@ -124,4 +124,4 @@ namespace OpenSim.Framework | |||
124 | return false; | 124 | return false; |
125 | } | 125 | } |
126 | } | 126 | } |
127 | } | 127 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/AgentInventory.cs b/OpenSim/Framework/AgentInventory.cs index 541bc27..84a782b 100644 --- a/OpenSim/Framework/AgentInventory.cs +++ b/OpenSim/Framework/AgentInventory.cs | |||
@@ -255,4 +255,4 @@ namespace OpenSim.Framework | |||
255 | return result; | 255 | return result; |
256 | } | 256 | } |
257 | } | 257 | } |
258 | } | 258 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 5775f06..2bef61b 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs | |||
@@ -52,4 +52,4 @@ namespace OpenSim.Framework | |||
52 | Name = name; | 52 | Name = name; |
53 | } | 53 | } |
54 | } | 54 | } |
55 | } | 55 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs index d83b43b..050b80f 100644 --- a/OpenSim/Framework/AssetLandmark.cs +++ b/OpenSim/Framework/AssetLandmark.cs | |||
@@ -56,4 +56,4 @@ namespace OpenSim.Framework | |||
56 | LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); | 56 | LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); |
57 | } | 57 | } |
58 | } | 58 | } |
59 | } | 59 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/AssetStorage.cs b/OpenSim/Framework/AssetStorage.cs index 9e0cf10..7d6cdf0 100644 --- a/OpenSim/Framework/AssetStorage.cs +++ b/OpenSim/Framework/AssetStorage.cs | |||
@@ -45,4 +45,4 @@ namespace OpenSim.Framework | |||
45 | public string Name; | 45 | public string Name; |
46 | public LLUUID UUID; | 46 | public LLUUID UUID; |
47 | } | 47 | } |
48 | } | 48 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/AuthenticateResponse.cs b/OpenSim/Framework/AuthenticateResponse.cs index 7d4cd11..90c9acd 100644 --- a/OpenSim/Framework/AuthenticateResponse.cs +++ b/OpenSim/Framework/AuthenticateResponse.cs | |||
@@ -36,4 +36,4 @@ namespace OpenSim.Framework | |||
36 | { | 36 | { |
37 | } | 37 | } |
38 | } | 38 | } |
39 | } | 39 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index d0c68de..c7083f3 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs | |||
@@ -68,4 +68,4 @@ namespace OpenSim.Framework | |||
68 | } | 68 | } |
69 | } | 69 | } |
70 | } | 70 | } |
71 | } | 71 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs index a3cae63..ae2a189 100644 --- a/OpenSim/Framework/BlockingQueue.cs +++ b/OpenSim/Framework/BlockingQueue.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Framework | |||
34 | { | 34 | { |
35 | private Queue<T> _queue = new Queue<T>(); | 35 | private Queue<T> _queue = new Queue<T>(); |
36 | private object _queueSync = new object(); | 36 | private object _queueSync = new object(); |
37 | 37 | ||
38 | public void Enqueue(T value) | 38 | public void Enqueue(T value) |
39 | { | 39 | { |
40 | lock (_queueSync) | 40 | lock (_queueSync) |
@@ -55,4 +55,4 @@ namespace OpenSim.Framework | |||
55 | } | 55 | } |
56 | } | 56 | } |
57 | } | 57 | } |
58 | } | 58 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index fb9a48f..32ce4ab 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -27,8 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | 30 | ||
33 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
34 | { | 32 | { |
@@ -37,8 +35,8 @@ namespace OpenSim.Framework | |||
37 | { | 35 | { |
38 | public ChildAgentDataUpdate() | 36 | public ChildAgentDataUpdate() |
39 | { | 37 | { |
40 | |||
41 | } | 38 | } |
39 | |||
42 | public sLLVector3 Position; | 40 | public sLLVector3 Position; |
43 | public ulong regionHandle; | 41 | public ulong regionHandle; |
44 | public float drawdistance; | 42 | public float drawdistance; |
@@ -47,6 +45,6 @@ namespace OpenSim.Framework | |||
47 | public float AVHeight; | 45 | public float AVHeight; |
48 | public Guid AgentID; | 46 | public Guid AgentID; |
49 | public float godlevel; | 47 | public float godlevel; |
50 | public byte[] throttles; | 48 | public byte[] throttles; |
51 | } | 49 | } |
52 | } | 50 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index e32c9eb..da60ed7 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs | |||
@@ -26,9 +26,11 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
33 | using OpenSim.Framework.Console; | ||
32 | 34 | ||
33 | namespace OpenSim.Framework | 35 | namespace OpenSim.Framework |
34 | { | 36 | { |
@@ -40,7 +42,6 @@ namespace OpenSim.Framework | |||
40 | 42 | ||
41 | public void ForEachClient(ForEachClientDelegate whatToDo) | 43 | public void ForEachClient(ForEachClientDelegate whatToDo) |
42 | { | 44 | { |
43 | |||
44 | // Wasteful, I know | 45 | // Wasteful, I know |
45 | IClientAPI[] LocalClients = new IClientAPI[0]; | 46 | IClientAPI[] LocalClients = new IClientAPI[0]; |
46 | lock (m_clients) | 47 | lock (m_clients) |
@@ -55,9 +56,11 @@ namespace OpenSim.Framework | |||
55 | { | 56 | { |
56 | whatToDo(LocalClients[i]); | 57 | whatToDo(LocalClients[i]); |
57 | } | 58 | } |
58 | catch (System.Exception e) | 59 | catch (Exception e) |
59 | { | 60 | { |
60 | OpenSim.Framework.Console.MainLog.Instance.Warn("CLIENT", "Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString()); | 61 | MainLog.Instance.Warn("CLIENT", |
62 | "Unable to do ForEachClient for one of the clients" + "\n Reason: " + | ||
63 | e.ToString()); | ||
61 | } | 64 | } |
62 | } | 65 | } |
63 | } | 66 | } |
@@ -107,20 +110,19 @@ namespace OpenSim.Framework | |||
107 | IClientAPI client; | 110 | IClientAPI client; |
108 | try | 111 | try |
109 | { | 112 | { |
110 | |||
111 | if (m_clients.TryGetValue(circuits[i], out client)) | 113 | if (m_clients.TryGetValue(circuits[i], out client)) |
112 | { | 114 | { |
113 | Remove(client.CircuitCode); | 115 | Remove(client.CircuitCode); |
114 | client.Close(false); | 116 | client.Close(false); |
115 | } | 117 | } |
116 | } | 118 | } |
117 | catch (System.Exception e) | 119 | catch (Exception e) |
118 | { | 120 | { |
119 | OpenSim.Framework.Console.MainLog.Instance.Error("CLIENT", "Unable to shutdown circuit for: " + agentId.ToString() + "\n Reason: " + e.ToString()); | 121 | MainLog.Instance.Error("CLIENT", |
122 | "Unable to shutdown circuit for: " + agentId.ToString() + "\n Reason: " + | ||
123 | e.ToString()); | ||
120 | } | 124 | } |
121 | } | 125 | } |
122 | |||
123 | |||
124 | } | 126 | } |
125 | 127 | ||
126 | private uint[] GetAllCircuits(LLUUID agentId) | 128 | private uint[] GetAllCircuits(LLUUID agentId) |
@@ -135,7 +137,7 @@ namespace OpenSim.Framework | |||
135 | } | 137 | } |
136 | 138 | ||
137 | 139 | ||
138 | for (int i = 0; i < LocalClients.Length; i++ ) | 140 | for (int i = 0; i < LocalClients.Length; i++) |
139 | { | 141 | { |
140 | if (LocalClients[i].AgentId == agentId) | 142 | if (LocalClients[i].AgentId == agentId) |
141 | { | 143 | { |
@@ -168,7 +170,6 @@ namespace OpenSim.Framework | |||
168 | packet.AgentData.SessionID = LocalClients[i].SessionId; | 170 | packet.AgentData.SessionID = LocalClients[i].SessionId; |
169 | LocalClients[i].OutPacket(packet, ThrottleOutPacketType.Task); | 171 | LocalClients[i].OutPacket(packet, ThrottleOutPacketType.Task); |
170 | } | 172 | } |
171 | |||
172 | } | 173 | } |
173 | } | 174 | } |
174 | 175 | ||
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 4765548..664625e 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.IO; | ||
32 | using System.Threading; | 31 | using System.Threading; |
33 | using libsecondlife; | 32 | using libsecondlife; |
34 | using libsecondlife.Packets; | 33 | using libsecondlife.Packets; |
@@ -92,7 +91,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
92 | Thread.Sleep(500); | 91 | Thread.Sleep(500); |
93 | } | 92 | } |
94 | catch (Exception e) | 93 | catch (Exception e) |
95 | { | 94 | { |
96 | m_log.Error("ASSETCACHE", e.ToString()); | 95 | m_log.Error("ASSETCACHE", e.ToString()); |
97 | } | 96 | } |
98 | } | 97 | } |
@@ -177,30 +176,29 @@ namespace OpenSim.Framework.Communications.Cache | |||
177 | // packets from the client. | 176 | // packets from the client. |
178 | int pollPeriod = 200; | 177 | int pollPeriod = 200; |
179 | int maxPolls = 15; | 178 | int maxPolls = 15; |
180 | 179 | ||
181 | AssetBase asset = GetCachedAsset(assetID); | 180 | AssetBase asset = GetCachedAsset(assetID); |
182 | if (asset != null) | 181 | if (asset != null) |
183 | { | 182 | { |
184 | return asset; | 183 | return asset; |
185 | } | 184 | } |
186 | 185 | ||
187 | m_assetServer.RequestAsset(assetID, isTexture); | 186 | m_assetServer.RequestAsset(assetID, isTexture); |
188 | 187 | ||
189 | do | 188 | do |
190 | { | 189 | { |
191 | Thread.Sleep(pollPeriod); | 190 | Thread.Sleep(pollPeriod); |
192 | 191 | ||
193 | asset = GetCachedAsset(assetID); | 192 | asset = GetCachedAsset(assetID); |
194 | if (asset != null) | 193 | if (asset != null) |
195 | { | 194 | { |
196 | return asset; | 195 | return asset; |
197 | } | 196 | } |
198 | } | 197 | } while (--maxPolls > 0); |
199 | while (--maxPolls > 0); | 198 | |
200 | |||
201 | MainLog.Instance.Warn( | 199 | MainLog.Instance.Warn( |
202 | "ASSETCACHE", "Asset {0} was not received before the retrieval timeout was reached"); | 200 | "ASSETCACHE", "Asset {0} was not received before the retrieval timeout was reached"); |
203 | 201 | ||
204 | return null; | 202 | return null; |
205 | } | 203 | } |
206 | 204 | ||
@@ -368,12 +366,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
368 | { | 366 | { |
369 | // over max number of bytes so split up file | 367 | // over max number of bytes so split up file |
370 | long restData = data.LongLength - m_maxPacketSize; | 368 | long restData = data.LongLength - m_maxPacketSize; |
371 | int restPackets = (int) ((restData + m_maxPacketSize - 1) / m_maxPacketSize); | 369 | int restPackets = (int) ((restData + m_maxPacketSize - 1)/m_maxPacketSize); |
372 | numPackets += restPackets; | 370 | numPackets += restPackets; |
373 | } | 371 | } |
374 | 372 | ||
375 | return numPackets; | 373 | return numPackets; |
376 | } | 374 | } |
375 | |||
377 | #region Assets | 376 | #region Assets |
378 | 377 | ||
379 | /// <summary> | 378 | /// <summary> |
@@ -448,7 +447,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
448 | AssetRequest req; | 447 | AssetRequest req; |
449 | for (int i = 0; i < num; i++) | 448 | for (int i = 0; i < num; i++) |
450 | { | 449 | { |
451 | req = (AssetRequest)AssetRequests[i]; | 450 | req = (AssetRequest) AssetRequests[i]; |
452 | //Console.WriteLine("sending asset " + req.RequestAssetID); | 451 | //Console.WriteLine("sending asset " + req.RequestAssetID); |
453 | TransferInfoPacket Transfer = new TransferInfoPacket(); | 452 | TransferInfoPacket Transfer = new TransferInfoPacket(); |
454 | Transfer.TransferInfo.ChannelType = 2; | 453 | Transfer.TransferInfo.ChannelType = 2; |
@@ -458,7 +457,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
458 | { | 457 | { |
459 | Transfer.TransferInfo.Params = new byte[20]; | 458 | Transfer.TransferInfo.Params = new byte[20]; |
460 | Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); | 459 | Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); |
461 | int assType = (int)req.AssetInf.Type; | 460 | int assType = (int) req.AssetInf.Type; |
462 | Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); | 461 | Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); |
463 | } | 462 | } |
464 | else if (req.AssetRequestSource == 3) | 463 | else if (req.AssetRequestSource == 3) |
@@ -468,7 +467,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
468 | //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); | 467 | //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); |
469 | //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16); | 468 | //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16); |
470 | } | 469 | } |
471 | Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length; | 470 | Transfer.TransferInfo.Size = (int) req.AssetInf.Data.Length; |
472 | Transfer.TransferInfo.TransferID = req.TransferRequestID; | 471 | Transfer.TransferInfo.TransferID = req.TransferRequestID; |
473 | req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset); | 472 | req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset); |
474 | 473 | ||
@@ -488,20 +487,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
488 | // libsecondlife hardcodes 1500 as the maximum data chunk size | 487 | // libsecondlife hardcodes 1500 as the maximum data chunk size |
489 | int maxChunkSize = 1500; | 488 | int maxChunkSize = 1500; |
490 | int packetNumber = 0; | 489 | int packetNumber = 0; |
491 | 490 | ||
492 | while (processedLength < req.AssetInf.Data.Length) | 491 | while (processedLength < req.AssetInf.Data.Length) |
493 | { | 492 | { |
494 | TransferPacketPacket TransferPacket = new TransferPacketPacket(); | 493 | TransferPacketPacket TransferPacket = new TransferPacketPacket(); |
495 | TransferPacket.TransferData.Packet = packetNumber; | 494 | TransferPacket.TransferData.Packet = packetNumber; |
496 | TransferPacket.TransferData.ChannelType = 2; | 495 | TransferPacket.TransferData.ChannelType = 2; |
497 | TransferPacket.TransferData.TransferID = req.TransferRequestID; | 496 | TransferPacket.TransferData.TransferID = req.TransferRequestID; |
498 | 497 | ||
499 | int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize); | 498 | int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize); |
500 | byte[] chunk = new byte[chunkSize]; | 499 | byte[] chunk = new byte[chunkSize]; |
501 | Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length); | 500 | Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length); |
502 | 501 | ||
503 | TransferPacket.TransferData.Data = chunk; | 502 | TransferPacket.TransferData.Data = chunk; |
504 | 503 | ||
505 | // 0 indicates more packets to come, 1 indicates last packet | 504 | // 0 indicates more packets to come, 1 indicates last packet |
506 | if (req.AssetInf.Data.Length - processedLength > maxChunkSize) | 505 | if (req.AssetInf.Data.Length - processedLength > maxChunkSize) |
507 | { | 506 | { |
@@ -510,10 +509,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
510 | else | 509 | else |
511 | { | 510 | { |
512 | TransferPacket.TransferData.Status = 1; | 511 | TransferPacket.TransferData.Status = 1; |
513 | } | 512 | } |
514 | 513 | ||
515 | req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset); | 514 | req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset); |
516 | 515 | ||
517 | processedLength += chunkSize; | 516 | processedLength += chunkSize; |
518 | packetNumber++; | 517 | packetNumber++; |
519 | } | 518 | } |
@@ -609,4 +608,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
609 | } | 608 | } |
610 | } | 609 | } |
611 | } | 610 | } |
612 | } | 611 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/AssetServer.cs b/OpenSim/Framework/Communications/Cache/AssetServer.cs index ae6494f..692ee1e 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServer.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServer.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
80 | IObjectSet result = db.Query(new AssetUUIDQuery(req.AssetID)); | 80 | IObjectSet result = db.Query(new AssetUUIDQuery(req.AssetID)); |
81 | if (result.Count > 0) | 81 | if (result.Count > 0) |
82 | { | 82 | { |
83 | foundAsset = (AssetStorage)result.Next(); | 83 | foundAsset = (AssetStorage) result.Next(); |
84 | found = true; | 84 | found = true; |
85 | } | 85 | } |
86 | 86 | ||
@@ -93,7 +93,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
93 | asset.Name = foundAsset.Name; | 93 | asset.Name = foundAsset.Name; |
94 | idata = foundAsset.Data; | 94 | idata = foundAsset.Data; |
95 | asset.Data = idata; | 95 | asset.Data = idata; |
96 | 96 | ||
97 | return asset; | 97 | return asset; |
98 | } | 98 | } |
99 | else | 99 | else |
@@ -141,4 +141,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
141 | return (asset.UUID == _findID); | 141 | return (asset.UUID == _findID); |
142 | } | 142 | } |
143 | } | 143 | } |
144 | } | 144 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 43d3dd9..1b2c836 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
69 | { | 69 | { |
70 | MainLog.Instance.Verbose( | 70 | MainLog.Instance.Verbose( |
71 | "ASSET", "Asset {0} received from asset server", req.AssetID); | 71 | "ASSET", "Asset {0} received from asset server", req.AssetID); |
72 | 72 | ||
73 | _receiver.AssetReceived(asset, req.IsTexture); | 73 | _receiver.AssetReceived(asset, req.IsTexture); |
74 | } | 74 | } |
75 | else | 75 | else |
@@ -112,9 +112,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
112 | 112 | ||
113 | ProcessRequest(req); | 113 | ProcessRequest(req); |
114 | } | 114 | } |
115 | catch(Exception e) | 115 | catch (Exception e) |
116 | { | 116 | { |
117 | MainLog.Instance.Error("ASSETSERVER", e.Message ); | 117 | MainLog.Instance.Error("ASSETSERVER", e.Message); |
118 | } | 118 | } |
119 | } | 119 | } |
120 | } | 120 | } |
@@ -149,7 +149,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
149 | req.AssetID = assetID; | 149 | req.AssetID = assetID; |
150 | req.IsTexture = isTexture; | 150 | req.IsTexture = isTexture; |
151 | _assetRequests.Enqueue(req); | 151 | _assetRequests.Enqueue(req); |
152 | 152 | ||
153 | MainLog.Instance.Verbose("ASSET", "Added {0} to request queue", assetID); | 153 | MainLog.Instance.Verbose("ASSET", "Added {0} to request queue", assetID); |
154 | } | 154 | } |
155 | 155 | ||
@@ -253,4 +253,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
253 | assets.ForEach(action); | 253 | assets.ForEach(action); |
254 | } | 254 | } |
255 | } | 255 | } |
256 | } | 256 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs index 7de84fa..c9c9541 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs | |||
@@ -106,4 +106,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
106 | } | 106 | } |
107 | } | 107 | } |
108 | } | 108 | } |
109 | } | 109 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs index 57c1fa6..8aa567c 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs | |||
@@ -182,7 +182,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
182 | Asset.Description = "empty"; | 182 | Asset.Description = "empty"; |
183 | Asset.Local = storeLocal; | 183 | Asset.Local = storeLocal; |
184 | Asset.Temporary = tempFile; | 184 | Asset.Temporary = tempFile; |
185 | 185 | ||
186 | TransactionID = transaction; | 186 | TransactionID = transaction; |
187 | m_storeLocal = storeLocal; | 187 | m_storeLocal = storeLocal; |
188 | if (Asset.Data.Length > 2) | 188 | if (Asset.Data.Length > 2) |
@@ -312,6 +312,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
312 | } | 312 | } |
313 | 313 | ||
314 | #region Nested Classes currently not in use (waiting for them to be enabled) | 314 | #region Nested Classes currently not in use (waiting for them to be enabled) |
315 | |||
315 | public class AssetCapsUploader | 316 | public class AssetCapsUploader |
316 | { | 317 | { |
317 | // Fields | 318 | // Fields |
@@ -424,6 +425,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
424 | return text; | 425 | return text; |
425 | } | 426 | } |
426 | } | 427 | } |
428 | |||
427 | #endregion | 429 | #endregion |
428 | } | 430 | } |
429 | } | 431 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index a547c8a..1cf95b7 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -130,4 +130,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
130 | return result; | 130 | return result; |
131 | } | 131 | } |
132 | } | 132 | } |
133 | } | 133 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs index 9c460c7..cf54fa4 100644 --- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs | |||
@@ -27,10 +27,8 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | ||
31 | using System.IO; | 30 | using System.IO; |
32 | using System.Xml.Serialization; | 31 | using System.Xml.Serialization; |
33 | using libsecondlife; | ||
34 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
35 | using OpenSim.Framework.Servers; | 33 | using OpenSim.Framework.Servers; |
36 | 34 | ||
@@ -65,9 +63,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
65 | 63 | ||
66 | if (s.Length > 0) | 64 | if (s.Length > 0) |
67 | { | 65 | { |
68 | XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); | 66 | XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); |
69 | 67 | ||
70 | return (AssetBase)xs.Deserialize(s); | 68 | return (AssetBase) xs.Deserialize(s); |
71 | } | 69 | } |
72 | } | 70 | } |
73 | catch (Exception e) | 71 | catch (Exception e) |
@@ -76,12 +74,11 @@ namespace OpenSim.Framework.Communications.Cache | |||
76 | MainLog.Instance.Debug("ASSETCACHE", "Getting asset {0}", req.AssetID.ToString()); | 74 | MainLog.Instance.Debug("ASSETCACHE", "Getting asset {0}", req.AssetID.ToString()); |
77 | MainLog.Instance.Error("ASSETCACHE", e.StackTrace); | 75 | MainLog.Instance.Error("ASSETCACHE", e.StackTrace); |
78 | } | 76 | } |
79 | 77 | ||
80 | return null; | 78 | return null; |
81 | } | 79 | } |
82 | 80 | ||
83 | 81 | ||
84 | |||
85 | public override void UpdateAsset(AssetBase asset) | 82 | public override void UpdateAsset(AssetBase asset) |
86 | { | 83 | { |
87 | throw new Exception("The method or operation is not implemented."); | 84 | throw new Exception("The method or operation is not implemented."); |
@@ -119,8 +116,6 @@ namespace OpenSim.Framework.Communications.Cache | |||
119 | throw new Exception("The method or operation is not implemented."); | 116 | throw new Exception("The method or operation is not implemented."); |
120 | } | 117 | } |
121 | 118 | ||
122 | |||
123 | |||
124 | #endregion | 119 | #endregion |
125 | } | 120 | } |
126 | } | 121 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index 1d2c920..a1e79b2 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
65 | InventoryFolderImpl subFold = new InventoryFolderImpl(); | 65 | InventoryFolderImpl subFold = new InventoryFolderImpl(); |
66 | subFold.name = folderName; | 66 | subFold.name = folderName; |
67 | subFold.folderID = folderID; | 67 | subFold.folderID = folderID; |
68 | subFold.type = (short)type; | 68 | subFold.type = (short) type; |
69 | subFold.parentID = this.folderID; | 69 | subFold.parentID = this.folderID; |
70 | subFold.agentID = agentID; | 70 | subFold.agentID = agentID; |
71 | SubFolders.Add(subFold.folderID, subFold); | 71 | SubFolders.Add(subFold.folderID, subFold); |
@@ -153,4 +153,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
153 | return folderList; | 153 | return folderList; |
154 | } | 154 | } |
155 | } | 155 | } |
156 | } | 156 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index 4c8eddf..fd93b19 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |||
@@ -49,8 +49,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
49 | folderID = new LLUUID("00000112-000f-0000-0000-000100bba000"); | 49 | folderID = new LLUUID("00000112-000f-0000-0000-000100bba000"); |
50 | name = "OpenSim Library"; | 50 | name = "OpenSim Library"; |
51 | parentID = LLUUID.Zero; | 51 | parentID = LLUUID.Zero; |
52 | type = (short)-1; | 52 | type = (short) -1; |
53 | version = (ushort)1; | 53 | version = (ushort) 1; |
54 | 54 | ||
55 | InventoryFolderImpl folderInfo = new InventoryFolderImpl(); | 55 | InventoryFolderImpl folderInfo = new InventoryFolderImpl(); |
56 | folderInfo.agentID = libOwner; | 56 | folderInfo.agentID = libOwner; |
@@ -81,28 +81,41 @@ namespace OpenSim.Framework.Communications.Cache | |||
81 | 81 | ||
82 | private void CreateLibraryItems() | 82 | private void CreateLibraryItems() |
83 | { | 83 | { |
84 | InventoryItemBase item = CreateItem(new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"), new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape", (int)AssetType.Bodypart, (int)InventoryType.Wearable, folderID); | 84 | InventoryItemBase item = |
85 | CreateItem(new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"), | ||
86 | new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape", | ||
87 | (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); | ||
85 | item.inventoryCurrentPermissions = 0; | 88 | item.inventoryCurrentPermissions = 0; |
86 | item.inventoryNextPermissions = 0; | 89 | item.inventoryNextPermissions = 0; |
87 | Items.Add(item.inventoryID, item); | 90 | Items.Add(item.inventoryID, item); |
88 | 91 | ||
89 | item = CreateItem(new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"), new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin", (int)AssetType.Bodypart, (int)InventoryType.Wearable, folderID); | 92 | item = |
93 | CreateItem(new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"), | ||
94 | new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin", | ||
95 | (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); | ||
90 | item.inventoryCurrentPermissions = 0; | 96 | item.inventoryCurrentPermissions = 0; |
91 | item.inventoryNextPermissions = 0; | 97 | item.inventoryNextPermissions = 0; |
92 | Items.Add(item.inventoryID, item); | 98 | Items.Add(item.inventoryID, item); |
93 | 99 | ||
94 | item = CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"), new LLUUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt", (int)AssetType.Clothing, (int)InventoryType.Wearable, folderID); | 100 | item = |
101 | CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"), | ||
102 | new LLUUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt", | ||
103 | (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); | ||
95 | item.inventoryCurrentPermissions = 0; | 104 | item.inventoryCurrentPermissions = 0; |
96 | item.inventoryNextPermissions = 0; | 105 | item.inventoryNextPermissions = 0; |
97 | Items.Add(item.inventoryID, item); | 106 | Items.Add(item.inventoryID, item); |
98 | 107 | ||
99 | item = CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"), new LLUUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants", (int)AssetType.Clothing, (int)InventoryType.Wearable, folderID); | 108 | item = |
109 | CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"), | ||
110 | new LLUUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants", | ||
111 | (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); | ||
100 | item.inventoryCurrentPermissions = 0; | 112 | item.inventoryCurrentPermissions = 0; |
101 | item.inventoryNextPermissions = 0; | 113 | item.inventoryNextPermissions = 0; |
102 | Items.Add(item.inventoryID, item); | 114 | Items.Add(item.inventoryID, item); |
103 | } | 115 | } |
104 | 116 | ||
105 | public InventoryItemBase CreateItem(LLUUID inventoryID, LLUUID assetID, string name, string description, int assetType, int invType, LLUUID parentFolderID) | 117 | public InventoryItemBase CreateItem(LLUUID inventoryID, LLUUID assetID, string name, string description, |
118 | int assetType, int invType, LLUUID parentFolderID) | ||
106 | { | 119 | { |
107 | InventoryItemBase item = new InventoryItemBase(); | 120 | InventoryItemBase item = new InventoryItemBase(); |
108 | item.avatarID = libOwner; | 121 | item.avatarID = libOwner; |
@@ -135,10 +148,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
135 | item.inventoryName = source.Configs[i].GetString("name", ""); | 148 | item.inventoryName = source.Configs[i].GetString("name", ""); |
136 | item.assetType = source.Configs[i].GetInt("assetType", 0); | 149 | item.assetType = source.Configs[i].GetInt("assetType", 0); |
137 | item.invType = source.Configs[i].GetInt("inventoryType", 0); | 150 | item.invType = source.Configs[i].GetInt("inventoryType", 0); |
138 | item.inventoryCurrentPermissions = (uint)source.Configs[i].GetLong("currentPermissions", 0x7FFFFFFF); | 151 | item.inventoryCurrentPermissions = (uint) source.Configs[i].GetLong("currentPermissions", 0x7FFFFFFF); |
139 | item.inventoryNextPermissions = (uint)source.Configs[i].GetLong("nextPermissions", 0x7FFFFFFF); | 152 | item.inventoryNextPermissions = (uint) source.Configs[i].GetLong("nextPermissions", 0x7FFFFFFF); |
140 | item.inventoryEveryOnePermissions = (uint)source.Configs[i].GetLong("everyonePermissions", 0x7FFFFFFF); | 153 | item.inventoryEveryOnePermissions = (uint) source.Configs[i].GetLong("everyonePermissions", 0x7FFFFFFF); |
141 | item.inventoryBasePermissions = (uint)source.Configs[i].GetLong("basePermissions", 0x7FFFFFFF); | 154 | item.inventoryBasePermissions = (uint) source.Configs[i].GetLong("basePermissions", 0x7FFFFFFF); |
142 | if (item.assetType == 0) | 155 | if (item.assetType == 0) |
143 | { | 156 | { |
144 | item.parentFolderID = m_textureFolder.folderID; | 157 | item.parentFolderID = m_textureFolder.folderID; |
@@ -152,4 +165,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
152 | } | 165 | } |
153 | } | 166 | } |
154 | } | 167 | } |
155 | } | 168 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs index 7fcff10..e4c278f 100644 --- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs +++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
57 | if (typeInterface != null) | 57 | if (typeInterface != null) |
58 | { | 58 | { |
59 | IAssetProvider plug = | 59 | IAssetProvider plug = |
60 | (IAssetProvider)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 60 | (IAssetProvider) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
61 | m_assetProviderPlugin = plug; | 61 | m_assetProviderPlugin = plug; |
62 | m_assetProviderPlugin.Initialise(); | 62 | m_assetProviderPlugin.Initialise(); |
63 | 63 | ||
@@ -84,8 +84,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
84 | { | 84 | { |
85 | asset = m_assetProviderPlugin.FetchAsset(req.AssetID); | 85 | asset = m_assetProviderPlugin.FetchAsset(req.AssetID); |
86 | } | 86 | } |
87 | 87 | ||
88 | return asset; | 88 | return asset; |
89 | } | 89 | } |
90 | 90 | ||
91 | protected override void StoreAsset(AssetBase asset) | 91 | protected override void StoreAsset(AssetBase asset) |
@@ -98,4 +98,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
98 | m_assetProviderPlugin.CommitAssets(); | 98 | m_assetProviderPlugin.CommitAssets(); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | } | 101 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 47f970e..14670fd 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -130,7 +130,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID) | 133 | public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, |
134 | LLUUID parentID) | ||
134 | { | 135 | { |
135 | CachedUserInfo userProfile; | 136 | CachedUserInfo userProfile; |
136 | 137 | ||
@@ -143,7 +144,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
143 | baseFolder.folderID = folderID; | 144 | baseFolder.folderID = folderID; |
144 | baseFolder.name = name; | 145 | baseFolder.name = name; |
145 | baseFolder.parentID = parentID; | 146 | baseFolder.parentID = parentID; |
146 | baseFolder.type = (short)type; | 147 | baseFolder.type = (short) type; |
147 | baseFolder.version = userProfile.RootFolder.version; | 148 | baseFolder.version = userProfile.RootFolder.version; |
148 | m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder); | 149 | m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder); |
149 | } | 150 | } |
@@ -180,12 +181,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
180 | bool fetchFolders, bool fetchItems, int sortOrder) | 181 | bool fetchFolders, bool fetchItems, int sortOrder) |
181 | { | 182 | { |
182 | // XXX We're not handling sortOrder yet! | 183 | // XXX We're not handling sortOrder yet! |
183 | 184 | ||
184 | InventoryFolderImpl fold = null; | 185 | InventoryFolderImpl fold = null; |
185 | if (folderID == libraryRoot.folderID) | 186 | if (folderID == libraryRoot.folderID) |
186 | { | 187 | { |
187 | remoteClient.SendInventoryFolderDetails( | 188 | remoteClient.SendInventoryFolderDetails( |
188 | libraryRoot.agentID, libraryRoot.folderID, libraryRoot.RequestListOfItems(), | 189 | libraryRoot.agentID, libraryRoot.folderID, libraryRoot.RequestListOfItems(), |
189 | libraryRoot.RequestListOfFolders(), fetchFolders, fetchItems); | 190 | libraryRoot.RequestListOfFolders(), fetchFolders, fetchItems); |
190 | 191 | ||
191 | return; | 192 | return; |
@@ -194,7 +195,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
194 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) | 195 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) |
195 | { | 196 | { |
196 | remoteClient.SendInventoryFolderDetails( | 197 | remoteClient.SendInventoryFolderDetails( |
197 | libraryRoot.agentID, folderID, fold.RequestListOfItems(), | 198 | libraryRoot.agentID, folderID, fold.RequestListOfItems(), |
198 | fold.RequestListOfFolders(), fetchFolders, fetchItems); | 199 | fold.RequestListOfFolders(), fetchFolders, fetchItems); |
199 | 200 | ||
200 | return; | 201 | return; |
@@ -209,9 +210,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
209 | { | 210 | { |
210 | remoteClient.SendInventoryFolderDetails( | 211 | remoteClient.SendInventoryFolderDetails( |
211 | remoteClient.AgentId, folderID, userProfile.RootFolder.RequestListOfItems(), | 212 | remoteClient.AgentId, folderID, userProfile.RootFolder.RequestListOfItems(), |
212 | userProfile.RootFolder.RequestListOfFolders(), | 213 | userProfile.RootFolder.RequestListOfFolders(), |
213 | fetchFolders, fetchItems); | 214 | fetchFolders, fetchItems); |
214 | 215 | ||
215 | return; | 216 | return; |
216 | } | 217 | } |
217 | else | 218 | else |
@@ -219,9 +220,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
219 | if ((fold = userProfile.RootFolder.HasSubFolder(folderID)) != null) | 220 | if ((fold = userProfile.RootFolder.HasSubFolder(folderID)) != null) |
220 | { | 221 | { |
221 | remoteClient.SendInventoryFolderDetails( | 222 | remoteClient.SendInventoryFolderDetails( |
222 | remoteClient.AgentId, folderID, fold.RequestListOfItems(), | 223 | remoteClient.AgentId, folderID, fold.RequestListOfItems(), |
223 | fold.RequestListOfFolders(), fetchFolders, fetchItems); | 224 | fold.RequestListOfFolders(), fetchFolders, fetchItems); |
224 | 225 | ||
225 | return; | 226 | return; |
226 | } | 227 | } |
227 | } | 228 | } |
@@ -230,20 +231,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
230 | { | 231 | { |
231 | MainLog.Instance.Error( | 232 | MainLog.Instance.Error( |
232 | "INVENTORYCACHE", "Could not find root folder for user {0}", remoteClient.Name); | 233 | "INVENTORYCACHE", "Could not find root folder for user {0}", remoteClient.Name); |
233 | 234 | ||
234 | return; | 235 | return; |
235 | } | 236 | } |
236 | } | 237 | } |
237 | else | 238 | else |
238 | { | 239 | { |
239 | MainLog.Instance.Error( | 240 | MainLog.Instance.Error( |
240 | "INVENTORYCACHE", | 241 | "INVENTORYCACHE", |
241 | "Could not find user profile for {0} for folder {1}", | 242 | "Could not find user profile for {0} for folder {1}", |
242 | remoteClient.Name, folderID); | 243 | remoteClient.Name, folderID); |
243 | 244 | ||
244 | return; | 245 | return; |
245 | } | 246 | } |
246 | 247 | ||
247 | // If we've reached this point then we couldn't find the folder, even though the client thinks | 248 | // If we've reached this point then we couldn't find the folder, even though the client thinks |
248 | // it exists | 249 | // it exists |
249 | MainLog.Instance.Error( | 250 | MainLog.Instance.Error( |
@@ -262,8 +263,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
262 | InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID); | 263 | InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID); |
263 | if (subFolder != null) | 264 | if (subFolder != null) |
264 | { | 265 | { |
265 | List<InventoryItemBase> items=subFolder.RequestListOfItems(); | 266 | List<InventoryItemBase> items = subFolder.RequestListOfItems(); |
266 | foreach(InventoryItemBase item in items) | 267 | foreach (InventoryItemBase item in items) |
267 | { | 268 | { |
268 | userProfile.DeleteItem(remoteClient.AgentId, item); | 269 | userProfile.DeleteItem(remoteClient.AgentId, item); |
269 | } | 270 | } |
@@ -300,4 +301,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
300 | m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); | 301 | m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); |
301 | } | 302 | } |
302 | } | 303 | } |
303 | } | 304 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index e00f49d..4b42046 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -38,33 +38,33 @@ using OpenSim.Framework.Servers; | |||
38 | namespace OpenSim.Region.Capabilities | 38 | namespace OpenSim.Region.Capabilities |
39 | { | 39 | { |
40 | public delegate void UpLoadedAsset( | 40 | public delegate void UpLoadedAsset( |
41 | string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, | 41 | string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, |
42 | byte[] data, string inventoryType, string assetType); | 42 | byte[] data, string inventoryType, string assetType); |
43 | 43 | ||
44 | public delegate LLUUID UpdateItem(LLUUID itemID, byte[] data); | 44 | public delegate LLUUID UpdateItem(LLUUID itemID, byte[] data); |
45 | 45 | ||
46 | public delegate void UpdateTaskScript(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data); | 46 | public delegate void UpdateTaskScript(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data); |
47 | 47 | ||
48 | public delegate void NewInventoryItem(LLUUID userID, InventoryItemBase item); | 48 | public delegate void NewInventoryItem(LLUUID userID, InventoryItemBase item); |
49 | 49 | ||
50 | public delegate LLUUID ItemUpdatedCallback(LLUUID userID, LLUUID itemID, byte[] data); | 50 | public delegate LLUUID ItemUpdatedCallback(LLUUID userID, LLUUID itemID, byte[] data); |
51 | 51 | ||
52 | public delegate void TaskScriptUpdatedCallback(LLUUID userID, LLUUID itemID, LLUUID primID, | 52 | public delegate void TaskScriptUpdatedCallback(LLUUID userID, LLUUID itemID, LLUUID primID, |
53 | bool isScriptRunning, byte[] data); | 53 | bool isScriptRunning, byte[] data); |
54 | 54 | ||
55 | public class Caps | 55 | public class Caps |
56 | { | 56 | { |
57 | private string m_httpListenerHostName; | 57 | private string m_httpListenerHostName; |
58 | private uint m_httpListenPort; | 58 | private uint m_httpListenPort; |
59 | 59 | ||
60 | private string m_capsObjectPath = "00001-"; | 60 | private string m_capsObjectPath = "00001-"; |
61 | private string m_requestPath = "0000/"; | 61 | private string m_requestPath = "0000/"; |
62 | private string m_mapLayerPath = "0001/"; | 62 | private string m_mapLayerPath = "0001/"; |
63 | private string m_newInventory = "0002/"; | 63 | private string m_newInventory = "0002/"; |
64 | //private string m_requestTexture = "0003/"; | 64 | //private string m_requestTexture = "0003/"; |
65 | private string m_notecardUpdatePath = "0004/"; | 65 | private string m_notecardUpdatePath = "0004/"; |
66 | private string m_notecardTaskUpdatePath = "0005/"; | 66 | private string m_notecardTaskUpdatePath = "0005/"; |
67 | 67 | ||
68 | //private string eventQueue = "0100/"; | 68 | //private string eventQueue = "0100/"; |
69 | private BaseHttpServer m_httpListener; | 69 | private BaseHttpServer m_httpListener; |
70 | private LLUUID m_agentID; | 70 | private LLUUID m_agentID; |
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Capabilities | |||
78 | public NewInventoryItem AddNewInventoryItem = null; | 78 | public NewInventoryItem AddNewInventoryItem = null; |
79 | public ItemUpdatedCallback ItemUpdatedCall = null; | 79 | public ItemUpdatedCallback ItemUpdatedCall = null; |
80 | public TaskScriptUpdatedCallback TaskScriptUpdatedCall = null; | 80 | public TaskScriptUpdatedCallback TaskScriptUpdatedCall = null; |
81 | 81 | ||
82 | public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, | 82 | public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, |
83 | LLUUID agent, bool dumpAssetsToFile) | 83 | LLUUID agent, bool dumpAssetsToFile) |
84 | { | 84 | { |
@@ -138,7 +138,7 @@ namespace OpenSim.Region.Capabilities | |||
138 | /// <returns></returns> | 138 | /// <returns></returns> |
139 | public string CapsRequest(string request, string path, string param) | 139 | public string CapsRequest(string request, string path, string param) |
140 | { | 140 | { |
141 | //Console.WriteLine("caps request " + request); | 141 | //Console.WriteLine("caps request " + request); |
142 | string result = LLSDHelpers.SerialiseLLSDReply(GetCapabilities()); | 142 | string result = LLSDHelpers.SerialiseLLSDReply(GetCapabilities()); |
143 | return result; | 143 | return result; |
144 | } | 144 | } |
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Capabilities | |||
153 | string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + | 153 | string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + |
154 | m_capsObjectPath; | 154 | m_capsObjectPath; |
155 | caps.MapLayer = capsBaseUrl + m_mapLayerPath; | 155 | caps.MapLayer = capsBaseUrl + m_mapLayerPath; |
156 | // caps.RequestTextureDownload = capsBaseUrl + m_requestTexture; | 156 | // caps.RequestTextureDownload = capsBaseUrl + m_requestTexture; |
157 | caps.NewFileAgentInventory = capsBaseUrl + m_newInventory; | 157 | caps.NewFileAgentInventory = capsBaseUrl + m_newInventory; |
158 | caps.UpdateNotecardAgentInventory = capsBaseUrl + m_notecardUpdatePath; | 158 | caps.UpdateNotecardAgentInventory = capsBaseUrl + m_notecardUpdatePath; |
159 | caps.UpdateScriptAgentInventory = capsBaseUrl + m_notecardUpdatePath; | 159 | caps.UpdateScriptAgentInventory = capsBaseUrl + m_notecardUpdatePath; |
@@ -262,7 +262,7 @@ namespace OpenSim.Region.Capabilities | |||
262 | } | 262 | } |
263 | 263 | ||
264 | #endregion | 264 | #endregion |
265 | 265 | ||
266 | /// <summary> | 266 | /// <summary> |
267 | /// Callback for a client request for an upload url for a script task | 267 | /// Callback for a client request for an upload url for a script task |
268 | /// inventory update | 268 | /// inventory update |
@@ -272,28 +272,28 @@ namespace OpenSim.Region.Capabilities | |||
272 | /// <param name="param"></param> | 272 | /// <param name="param"></param> |
273 | /// <returns></returns> | 273 | /// <returns></returns> |
274 | public string ScriptTaskInventory(string request, string path, string param) | 274 | public string ScriptTaskInventory(string request, string path, string param) |
275 | { | 275 | { |
276 | try | 276 | try |
277 | { | 277 | { |
278 | // MainLog.Instance.Debug("CAPS", "request: {0}, path: {1}, param: {2}", request, path, param); | 278 | // MainLog.Instance.Debug("CAPS", "request: {0}, path: {1}, param: {2}", request, path, param); |
279 | 279 | ||
280 | Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); | 280 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); |
281 | LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); | 281 | LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); |
282 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); | 282 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); |
283 | 283 | ||
284 | string capsBase = "/CAPS/" + m_capsObjectPath; | 284 | string capsBase = "/CAPS/" + m_capsObjectPath; |
285 | string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); | 285 | string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); |
286 | 286 | ||
287 | TaskInventoryScriptUpdater uploader = | 287 | TaskInventoryScriptUpdater uploader = |
288 | new TaskInventoryScriptUpdater( | 288 | new TaskInventoryScriptUpdater( |
289 | llsdUpdateRequest.item_id, | 289 | llsdUpdateRequest.item_id, |
290 | llsdUpdateRequest.task_id, | 290 | llsdUpdateRequest.task_id, |
291 | llsdUpdateRequest.is_script_running, | 291 | llsdUpdateRequest.is_script_running, |
292 | capsBase + uploaderPath, | 292 | capsBase + uploaderPath, |
293 | m_httpListener, | 293 | m_httpListener, |
294 | m_dumpAssetsToFile); | 294 | m_dumpAssetsToFile); |
295 | uploader.OnUpLoad += TaskScriptUpdated; | 295 | uploader.OnUpLoad += TaskScriptUpdated; |
296 | 296 | ||
297 | m_httpListener.AddStreamHandler( | 297 | m_httpListener.AddStreamHandler( |
298 | new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); | 298 | new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); |
299 | string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + | 299 | string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + |
@@ -302,13 +302,13 @@ namespace OpenSim.Region.Capabilities | |||
302 | LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); | 302 | LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); |
303 | uploadResponse.uploader = uploaderURL; | 303 | uploadResponse.uploader = uploaderURL; |
304 | uploadResponse.state = "upload"; | 304 | uploadResponse.state = "upload"; |
305 | 305 | ||
306 | // MainLog.Instance.Verbose( | 306 | // MainLog.Instance.Verbose( |
307 | // "CAPS", | 307 | // "CAPS", |
308 | // "ScriptTaskInventory response: {0}", | 308 | // "ScriptTaskInventory response: {0}", |
309 | // LLSDHelpers.SerialiseLLSDReply(uploadResponse)); | 309 | // LLSDHelpers.SerialiseLLSDReply(uploadResponse)); |
310 | 310 | ||
311 | return LLSDHelpers.SerialiseLLSDReply(uploadResponse); | 311 | return LLSDHelpers.SerialiseLLSDReply(uploadResponse); |
312 | } | 312 | } |
313 | catch (Exception e) | 313 | catch (Exception e) |
314 | { | 314 | { |
@@ -329,7 +329,7 @@ namespace OpenSim.Region.Capabilities | |||
329 | public string NoteCardAgentInventory(string request, string path, string param) | 329 | public string NoteCardAgentInventory(string request, string path, string param) |
330 | { | 330 | { |
331 | //libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)libsecondlife.StructuredData.LLSDParser.DeserializeBinary(Helpers.StringToField(request)); | 331 | //libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)libsecondlife.StructuredData.LLSDParser.DeserializeBinary(Helpers.StringToField(request)); |
332 | Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); | 332 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); |
333 | LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); | 333 | LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); |
334 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); | 334 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); |
335 | 335 | ||
@@ -353,7 +353,7 @@ namespace OpenSim.Region.Capabilities | |||
353 | // "CAPS", | 353 | // "CAPS", |
354 | // "NoteCardAgentInventory response: {0}", | 354 | // "NoteCardAgentInventory response: {0}", |
355 | // LLSDHelpers.SerialiseLLSDReply(uploadResponse)); | 355 | // LLSDHelpers.SerialiseLLSDReply(uploadResponse)); |
356 | 356 | ||
357 | return LLSDHelpers.SerialiseLLSDReply(uploadResponse); | 357 | return LLSDHelpers.SerialiseLLSDReply(uploadResponse); |
358 | } | 358 | } |
359 | 359 | ||
@@ -453,7 +453,7 @@ namespace OpenSim.Region.Capabilities | |||
453 | { | 453 | { |
454 | return ItemUpdatedCall(m_agentID, itemID, data); | 454 | return ItemUpdatedCall(m_agentID, itemID, data); |
455 | } | 455 | } |
456 | 456 | ||
457 | return LLUUID.Zero; | 457 | return LLUUID.Zero; |
458 | } | 458 | } |
459 | 459 | ||
@@ -613,7 +613,7 @@ namespace OpenSim.Region.Capabilities | |||
613 | fs.Close(); | 613 | fs.Close(); |
614 | } | 614 | } |
615 | } | 615 | } |
616 | 616 | ||
617 | /// <summary> | 617 | /// <summary> |
618 | /// This class is a callback invoked when a client sends asset data to | 618 | /// This class is a callback invoked when a client sends asset data to |
619 | /// a task inventory script update url | 619 | /// a task inventory script update url |
@@ -629,17 +629,17 @@ namespace OpenSim.Region.Capabilities | |||
629 | private BaseHttpServer httpListener; | 629 | private BaseHttpServer httpListener; |
630 | private bool m_dumpAssetToFile; | 630 | private bool m_dumpAssetToFile; |
631 | 631 | ||
632 | public TaskInventoryScriptUpdater(LLUUID inventoryItemID, LLUUID primID, int isScriptRunning, | 632 | public TaskInventoryScriptUpdater(LLUUID inventoryItemID, LLUUID primID, int isScriptRunning, |
633 | string path, BaseHttpServer httpServer, bool dumpAssetToFile) | 633 | string path, BaseHttpServer httpServer, bool dumpAssetToFile) |
634 | { | 634 | { |
635 | m_dumpAssetToFile = dumpAssetToFile; | 635 | m_dumpAssetToFile = dumpAssetToFile; |
636 | 636 | ||
637 | this.inventoryItemID = inventoryItemID; | 637 | this.inventoryItemID = inventoryItemID; |
638 | this.primID = primID; | 638 | this.primID = primID; |
639 | 639 | ||
640 | // This comes in over the packet as an integer, but actually appears to be treated as a bool | 640 | // This comes in over the packet as an integer, but actually appears to be treated as a bool |
641 | this.isScriptRunning = (0 == isScriptRunning ? false : true); | 641 | this.isScriptRunning = (0 == isScriptRunning ? false : true); |
642 | 642 | ||
643 | uploaderPath = path; | 643 | uploaderPath = path; |
644 | httpListener = httpServer; | 644 | httpListener = httpServer; |
645 | } | 645 | } |
@@ -659,7 +659,7 @@ namespace OpenSim.Region.Capabilities | |||
659 | // "CAPS", | 659 | // "CAPS", |
660 | // "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", | 660 | // "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", |
661 | // data, path, param); | 661 | // data, path, param); |
662 | 662 | ||
663 | string res = ""; | 663 | string res = ""; |
664 | LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); | 664 | LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); |
665 | 665 | ||
@@ -668,7 +668,7 @@ namespace OpenSim.Region.Capabilities | |||
668 | OnUpLoad(inventoryItemID, primID, isScriptRunning, data); | 668 | OnUpLoad(inventoryItemID, primID, isScriptRunning, data); |
669 | } | 669 | } |
670 | 670 | ||
671 | uploadComplete.item_id = inventoryItemID; | 671 | uploadComplete.item_id = inventoryItemID; |
672 | uploadComplete.task_id = primID; | 672 | uploadComplete.task_id = primID; |
673 | uploadComplete.state = "complete"; | 673 | uploadComplete.state = "complete"; |
674 | 674 | ||
@@ -680,7 +680,7 @@ namespace OpenSim.Region.Capabilities | |||
680 | { | 680 | { |
681 | SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data); | 681 | SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data); |
682 | } | 682 | } |
683 | 683 | ||
684 | // MainLog.Instance.Verbose("CAPS", "TaskInventoryScriptUpdater.uploaderCaps res: {0}", res); | 684 | // MainLog.Instance.Verbose("CAPS", "TaskInventoryScriptUpdater.uploaderCaps res: {0}", res); |
685 | 685 | ||
686 | return res; | 686 | return res; |
@@ -689,9 +689,9 @@ namespace OpenSim.Region.Capabilities | |||
689 | { | 689 | { |
690 | MainLog.Instance.Error("CAPS", e.ToString()); | 690 | MainLog.Instance.Error("CAPS", e.ToString()); |
691 | } | 691 | } |
692 | 692 | ||
693 | // XXX Maybe this should be some meaningful error packet | 693 | // XXX Maybe this should be some meaningful error packet |
694 | return null; | 694 | return null; |
695 | } | 695 | } |
696 | 696 | ||
697 | private void SaveAssetToFile(string filename, byte[] data) | 697 | private void SaveAssetToFile(string filename, byte[] data) |
@@ -702,6 +702,6 @@ namespace OpenSim.Region.Capabilities | |||
702 | bw.Close(); | 702 | bw.Close(); |
703 | fs.Close(); | 703 | fs.Close(); |
704 | } | 704 | } |
705 | } | 705 | } |
706 | } | 706 | } |
707 | } | 707 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSD.cs b/OpenSim/Framework/Communications/Capabilities/LLSD.cs index 987d6e6..dab926c 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSD.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSD.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -28,12 +28,12 @@ | |||
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections; | 30 | using System.Collections; |
31 | using System.Collections.Generic; | 31 | using System.Globalization; |
32 | using System.Xml; | ||
33 | using System.IO; | 32 | using System.IO; |
34 | using libsecondlife; | ||
35 | using System.Security.Cryptography; | 33 | using System.Security.Cryptography; |
36 | using System.Text; | 34 | using System.Text; |
35 | using System.Xml; | ||
36 | using libsecondlife; | ||
37 | 37 | ||
38 | namespace OpenSim.Region.Capabilities | 38 | namespace OpenSim.Region.Capabilities |
39 | { | 39 | { |
@@ -47,7 +47,9 @@ namespace OpenSim.Region.Capabilities | |||
47 | /// </summary> | 47 | /// </summary> |
48 | public class LLSDParseException : Exception | 48 | public class LLSDParseException : Exception |
49 | { | 49 | { |
50 | public LLSDParseException(string message) : base(message) { } | 50 | public LLSDParseException(string message) : base(message) |
51 | { | ||
52 | } | ||
51 | } | 53 | } |
52 | 54 | ||
53 | /// <summary> | 55 | /// <summary> |
@@ -55,7 +57,9 @@ namespace OpenSim.Region.Capabilities | |||
55 | /// </summary> | 57 | /// </summary> |
56 | public class LLSDSerializeException : Exception | 58 | public class LLSDSerializeException : Exception |
57 | { | 59 | { |
58 | public LLSDSerializeException(string message) : base(message) { } | 60 | public LLSDSerializeException(string message) : base(message) |
61 | { | ||
62 | } | ||
59 | } | 63 | } |
60 | 64 | ||
61 | /// <summary> | 65 | /// <summary> |
@@ -129,7 +133,7 @@ namespace OpenSim.Region.Capabilities | |||
129 | if (obj is string) | 133 | if (obj is string) |
130 | { | 134 | { |
131 | writer.WriteStartElement(String.Empty, "string", String.Empty); | 135 | writer.WriteStartElement(String.Empty, "string", String.Empty); |
132 | writer.WriteString((string)obj); | 136 | writer.WriteString((string) obj); |
133 | writer.WriteEndElement(); | 137 | writer.WriteEndElement(); |
134 | } | 138 | } |
135 | else if (obj is int) | 139 | else if (obj is int) |
@@ -146,7 +150,7 @@ namespace OpenSim.Region.Capabilities | |||
146 | } | 150 | } |
147 | else if (obj is bool) | 151 | else if (obj is bool) |
148 | { | 152 | { |
149 | bool b = (bool)obj; | 153 | bool b = (bool) obj; |
150 | writer.WriteStartElement(String.Empty, "boolean", String.Empty); | 154 | writer.WriteStartElement(String.Empty, "boolean", String.Empty); |
151 | writer.WriteString(b ? "1" : "0"); | 155 | writer.WriteString(b ? "1" : "0"); |
152 | writer.WriteEndElement(); | 156 | writer.WriteEndElement(); |
@@ -157,7 +161,7 @@ namespace OpenSim.Region.Capabilities | |||
157 | } | 161 | } |
158 | else if (obj is LLUUID) | 162 | else if (obj is LLUUID) |
159 | { | 163 | { |
160 | LLUUID u = (LLUUID)obj; | 164 | LLUUID u = (LLUUID) obj; |
161 | writer.WriteStartElement(String.Empty, "uuid", String.Empty); | 165 | writer.WriteStartElement(String.Empty, "uuid", String.Empty); |
162 | writer.WriteString(u.ToString()); | 166 | writer.WriteString(u.ToString()); |
163 | writer.WriteEndElement(); | 167 | writer.WriteEndElement(); |
@@ -463,7 +467,7 @@ namespace OpenSim.Region.Capabilities | |||
463 | } | 467 | } |
464 | else if (obj is string) | 468 | else if (obj is string) |
465 | { | 469 | { |
466 | return GetSpaces(indent) + "- string \"" + (string)obj + "\"\n"; | 470 | return GetSpaces(indent) + "- string \"" + (string) obj + "\"\n"; |
467 | } | 471 | } |
468 | else if (obj is int) | 472 | else if (obj is int) |
469 | { | 473 | { |
@@ -475,13 +479,13 @@ namespace OpenSim.Region.Capabilities | |||
475 | } | 479 | } |
476 | else if (obj is LLUUID) | 480 | else if (obj is LLUUID) |
477 | { | 481 | { |
478 | return GetSpaces(indent) + "- uuid " + ((LLUUID)obj).ToString() + Environment.NewLine; | 482 | return GetSpaces(indent) + "- uuid " + ((LLUUID) obj).ToString() + Environment.NewLine; |
479 | } | 483 | } |
480 | else if (obj is Hashtable) | 484 | else if (obj is Hashtable) |
481 | { | 485 | { |
482 | StringBuilder ret = new StringBuilder(); | 486 | StringBuilder ret = new StringBuilder(); |
483 | ret.Append(GetSpaces(indent) + "- map" + Environment.NewLine); | 487 | ret.Append(GetSpaces(indent) + "- map" + Environment.NewLine); |
484 | Hashtable map = (Hashtable)obj; | 488 | Hashtable map = (Hashtable) obj; |
485 | 489 | ||
486 | foreach (string key in map.Keys) | 490 | foreach (string key in map.Keys) |
487 | { | 491 | { |
@@ -495,7 +499,7 @@ namespace OpenSim.Region.Capabilities | |||
495 | { | 499 | { |
496 | StringBuilder ret = new StringBuilder(); | 500 | StringBuilder ret = new StringBuilder(); |
497 | ret.Append(GetSpaces(indent) + "- array\n"); | 501 | ret.Append(GetSpaces(indent) + "- array\n"); |
498 | ArrayList list = (ArrayList)obj; | 502 | ArrayList list = (ArrayList) obj; |
499 | 503 | ||
500 | foreach (object item in list) | 504 | foreach (object item in list) |
501 | { | 505 | { |
@@ -506,8 +510,8 @@ namespace OpenSim.Region.Capabilities | |||
506 | } | 510 | } |
507 | else if (obj is byte[]) | 511 | else if (obj is byte[]) |
508 | { | 512 | { |
509 | return GetSpaces(indent) + "- binary\n" + Helpers.FieldToHexString((byte[])obj, GetSpaces(indent)) + | 513 | return GetSpaces(indent) + "- binary\n" + Helpers.FieldToHexString((byte[]) obj, GetSpaces(indent)) + |
510 | Environment.NewLine; | 514 | Environment.NewLine; |
511 | } | 515 | } |
512 | else | 516 | else |
513 | { | 517 | { |
@@ -557,8 +561,8 @@ namespace OpenSim.Region.Capabilities | |||
557 | double value; | 561 | double value; |
558 | endPos = FindEnd(llsd, 1); | 562 | endPos = FindEnd(llsd, 1); |
559 | 563 | ||
560 | if (Double.TryParse(llsd.Substring(1, endPos - 1), System.Globalization.NumberStyles.Float, | 564 | if (Double.TryParse(llsd.Substring(1, endPos - 1), NumberStyles.Float, |
561 | Helpers.EnUsCulture.NumberFormat, out value)) | 565 | Helpers.EnUsCulture.NumberFormat, out value)) |
562 | return value; | 566 | return value; |
563 | else | 567 | else |
564 | throw new LLSDParseException("Failed to parse double value type"); | 568 | throw new LLSDParseException("Failed to parse double value type"); |
@@ -652,7 +656,7 @@ namespace OpenSim.Region.Capabilities | |||
652 | 656 | ||
653 | private static int FindEnd(string llsd, int start) | 657 | private static int FindEnd(string llsd, int start) |
654 | { | 658 | { |
655 | int end = llsd.IndexOfAny(new char[] { ',', ']', '}' }); | 659 | int end = llsd.IndexOfAny(new char[] {',', ']', '}'}); |
656 | if (end == -1) end = llsd.Length - 1; | 660 | if (end == -1) end = llsd.Length - 1; |
657 | return end; | 661 | return end; |
658 | } | 662 | } |
@@ -673,4 +677,4 @@ namespace OpenSim.Region.Capabilities | |||
673 | } | 677 | } |
674 | } | 678 | } |
675 | } | 679 | } |
676 | } | 680 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs b/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs index 2bc1643..d641b5c 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs | |||
@@ -38,4 +38,4 @@ namespace OpenSim.Region.Capabilities | |||
38 | { | 38 | { |
39 | } | 39 | } |
40 | } | 40 | } |
41 | } | 41 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs index 307e3e3..f838c85 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs | |||
@@ -41,4 +41,4 @@ namespace OpenSim.Region.Capabilities | |||
41 | { | 41 | { |
42 | } | 42 | } |
43 | } | 43 | } |
44 | } | 44 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs b/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs index eb76d64..3b8c077 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs | |||
@@ -37,4 +37,4 @@ namespace OpenSim.Region.Capabilities | |||
37 | { | 37 | { |
38 | } | 38 | } |
39 | } | 39 | } |
40 | } | 40 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs b/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs index dfb1683..7b09cb3 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Capabilities | |||
34 | public string MapLayer = ""; | 34 | public string MapLayer = ""; |
35 | public string NewFileAgentInventory = ""; | 35 | public string NewFileAgentInventory = ""; |
36 | //public string EventQueueGet = ""; | 36 | //public string EventQueueGet = ""; |
37 | // public string RequestTextureDownload = ""; | 37 | // public string RequestTextureDownload = ""; |
38 | // public string ChatSessionRequest = ""; | 38 | // public string ChatSessionRequest = ""; |
39 | public string UpdateNotecardAgentInventory = ""; | 39 | public string UpdateNotecardAgentInventory = ""; |
40 | public string UpdateScriptAgentInventory = ""; | 40 | public string UpdateScriptAgentInventory = ""; |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDEmpty.cs b/OpenSim/Framework/Communications/Capabilities/LLSDEmpty.cs index 101d9c0..5e6e917 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDEmpty.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDEmpty.cs | |||
@@ -34,4 +34,4 @@ namespace OpenSim.Region.Capabilities | |||
34 | { | 34 | { |
35 | } | 35 | } |
36 | } | 36 | } |
37 | } | 37 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs index 60aa60c..28f838d 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs | |||
@@ -30,7 +30,6 @@ using System.Collections; | |||
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Xml; | 32 | using System.Xml; |
33 | using libsecondlife; | ||
34 | 33 | ||
35 | namespace OpenSim.Region.Capabilities | 34 | namespace OpenSim.Region.Capabilities |
36 | { | 35 | { |
@@ -77,7 +76,7 @@ namespace OpenSim.Region.Capabilities | |||
77 | writer.WriteString(fields[i].Name); | 76 | writer.WriteString(fields[i].Name); |
78 | writer.WriteEndElement(); | 77 | writer.WriteEndElement(); |
79 | LLSD.LLSDWriteOne(writer, fieldValue); | 78 | LLSD.LLSDWriteOne(writer, fieldValue); |
80 | // libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( | 79 | // libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( |
81 | // writer, libsecondlife.StructuredData.LLSD.FromObject(fieldValue)); | 80 | // writer, libsecondlife.StructuredData.LLSD.FromObject(fieldValue)); |
82 | } | 81 | } |
83 | } | 82 | } |
@@ -102,8 +101,8 @@ namespace OpenSim.Region.Capabilities | |||
102 | else | 101 | else |
103 | { | 102 | { |
104 | LLSD.LLSDWriteOne(writer, obj); | 103 | LLSD.LLSDWriteOne(writer, obj); |
105 | //libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( | 104 | //libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( |
106 | // writer, libsecondlife.StructuredData.LLSD.FromObject(obj)); | 105 | // writer, libsecondlife.StructuredData.LLSD.FromObject(obj)); |
107 | } | 106 | } |
108 | } | 107 | } |
109 | 108 | ||
@@ -122,12 +121,12 @@ namespace OpenSim.Region.Capabilities | |||
122 | FieldInfo field = myType.GetField((string) enumerator.Key); | 121 | FieldInfo field = myType.GetField((string) enumerator.Key); |
123 | if (field != null) | 122 | if (field != null) |
124 | { | 123 | { |
125 | // if (enumerator.Value is libsecondlife.StructuredData.LLSDMap) | 124 | // if (enumerator.Value is libsecondlife.StructuredData.LLSDMap) |
126 | if (enumerator.Value is Hashtable) | 125 | if (enumerator.Value is Hashtable) |
127 | { | 126 | { |
128 | object fieldValue = field.GetValue(obj); | 127 | object fieldValue = field.GetValue(obj); |
129 | DeserialiseLLSDMap((Hashtable)enumerator.Value, fieldValue); | 128 | DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); |
130 | // DeserialiseLLSDMap((libsecondlife.StructuredData.LLSDMap) enumerator.Value, fieldValue); | 129 | // DeserialiseLLSDMap((libsecondlife.StructuredData.LLSDMap) enumerator.Value, fieldValue); |
131 | } | 130 | } |
132 | else if (enumerator.Value is ArrayList) | 131 | else if (enumerator.Value is ArrayList) |
133 | { | 132 | { |
@@ -149,4 +148,4 @@ namespace OpenSim.Region.Capabilities | |||
149 | return obj; | 148 | return obj; |
150 | } | 149 | } |
151 | } | 150 | } |
152 | } | 151 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs index 214b9c7..121b36a 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs | |||
@@ -42,4 +42,4 @@ namespace OpenSim.Region.Capabilities | |||
42 | { | 42 | { |
43 | } | 43 | } |
44 | } | 44 | } |
45 | } | 45 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs index 48130b1..93b0f83 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs | |||
@@ -37,4 +37,4 @@ namespace OpenSim.Region.Capabilities | |||
37 | { | 37 | { |
38 | } | 38 | } |
39 | } | 39 | } |
40 | } | 40 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs index 71cc358..4321d7b 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs | |||
@@ -29,9 +29,7 @@ | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Text; | 31 | using System.Text; |
32 | using libsecondlife; | ||
33 | using OpenSim.Framework.Servers; | 32 | using OpenSim.Framework.Servers; |
34 | using System.Xml; | ||
35 | 33 | ||
36 | namespace OpenSim.Region.Capabilities | 34 | namespace OpenSim.Region.Capabilities |
37 | { | 35 | { |
@@ -54,10 +52,10 @@ namespace OpenSim.Region.Capabilities | |||
54 | //string requestBody = streamReader.ReadToEnd(); | 52 | //string requestBody = streamReader.ReadToEnd(); |
55 | //streamReader.Close(); | 53 | //streamReader.Close(); |
56 | 54 | ||
57 | // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap) | 55 | // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap) |
58 | // libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); | 56 | // libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); |
59 | 57 | ||
60 | Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(request); | 58 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); |
61 | TRequest llsdRequest = new TRequest(); | 59 | TRequest llsdRequest = new TRequest(); |
62 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); | 60 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); |
63 | 61 | ||
@@ -68,4 +66,4 @@ namespace OpenSim.Region.Capabilities | |||
68 | return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response)); | 66 | return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response)); |
69 | } | 67 | } |
70 | } | 68 | } |
71 | } | 69 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs index 3703efc..8d6550b 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs | |||
@@ -25,10 +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 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Region.Capabilities | 30 | namespace OpenSim.Region.Capabilities |
31 | { | 31 | { |
32 | [LLSDMap] | 32 | [LLSDMap] |
33 | public class LLSDTaskInventoryUploadComplete | 33 | public class LLSDTaskInventoryUploadComplete |
34 | { | 34 | { |
@@ -36,15 +36,15 @@ namespace OpenSim.Region.Capabilities | |||
36 | /// The task inventory item that was updated | 36 | /// The task inventory item that was updated |
37 | /// </summary> | 37 | /// </summary> |
38 | public LLUUID item_id; | 38 | public LLUUID item_id; |
39 | 39 | ||
40 | /// <summary> | 40 | /// <summary> |
41 | /// The task that was updated | 41 | /// The task that was updated |
42 | /// </summary> | 42 | /// </summary> |
43 | public LLUUID task_id; | 43 | public LLUUID task_id; |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// State of the upload. So far have only even seen this set to "complete" | 46 | /// State of the upload. So far have only even seen this set to "complete" |
47 | /// </summary> | 47 | /// </summary> |
48 | public string state; | 48 | public string state; |
49 | } | 49 | } |
50 | } | 50 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs index 6dcf2b5..e9c77b8 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs | |||
@@ -26,10 +26,10 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Region.Capabilities | 31 | namespace OpenSim.Region.Capabilities |
32 | { | 32 | { |
33 | [LLSDMap] | 33 | [LLSDMap] |
34 | public class LLSDTaskScriptUpdate | 34 | public class LLSDTaskScriptUpdate |
35 | { | 35 | { |
@@ -37,15 +37,15 @@ namespace OpenSim.Region.Capabilities | |||
37 | /// The item containing the script to update | 37 | /// The item containing the script to update |
38 | /// </summary> | 38 | /// </summary> |
39 | public LLUUID item_id; | 39 | public LLUUID item_id; |
40 | 40 | ||
41 | /// <summary> | 41 | /// <summary> |
42 | /// The task containing the script | 42 | /// The task containing the script |
43 | /// </summary> | 43 | /// </summary> |
44 | public LLUUID task_id; | 44 | public LLUUID task_id; |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
47 | /// Signals whether the script is currently active | 47 | /// Signals whether the script is currently active |
48 | /// </summary> | 48 | /// </summary> |
49 | public int is_script_running; | 49 | public int is_script_running; |
50 | } | 50 | } |
51 | } | 51 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTest.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTest.cs index 70bfd2c..d10b0c0 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTest.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTest.cs | |||
@@ -37,4 +37,4 @@ namespace OpenSim.Region.Capabilities | |||
37 | { | 37 | { |
38 | } | 38 | } |
39 | } | 39 | } |
40 | } | 40 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDType.cs b/OpenSim/Framework/Communications/Capabilities/LLSDType.cs index 7bbe16e..e851742 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDType.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDType.cs | |||
@@ -52,4 +52,4 @@ namespace OpenSim.Region.Capabilities | |||
52 | { | 52 | { |
53 | } | 53 | } |
54 | } | 54 | } |
55 | } | 55 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 4614756..02c54e1 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -26,9 +26,9 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using libsecondlife; | 30 | using libsecondlife; |
30 | using OpenSim.Framework.Communications.Cache; | 31 | using OpenSim.Framework.Communications.Cache; |
31 | using System.Collections.Generic; | ||
32 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
33 | using OpenSim.Framework.Servers; | 33 | using OpenSim.Framework.Servers; |
34 | 34 | ||
@@ -173,12 +173,13 @@ namespace OpenSim.Framework.Communications | |||
173 | } | 173 | } |
174 | } | 174 | } |
175 | } | 175 | } |
176 | |||
176 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) | 177 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) |
177 | { | 178 | { |
178 | List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query); | 179 | List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query); |
179 | return pickerlist; | 180 | return pickerlist; |
180 | } | 181 | } |
181 | 182 | ||
182 | #endregion | 183 | #endregion |
183 | } | 184 | } |
184 | } | 185 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index d51f234..e2c2661 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs | |||
@@ -25,7 +25,6 @@ | |||
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 | */ |
28 | using System.Collections; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
30 | 29 | ||
31 | namespace OpenSim.Framework.Communications | 30 | namespace OpenSim.Framework.Communications |
@@ -39,6 +38,5 @@ namespace OpenSim.Framework.Communications | |||
39 | RegionInfo RequestNeighbourInfo(ulong regionHandle); | 38 | RegionInfo RequestNeighbourInfo(ulong regionHandle); |
40 | Dictionary<string, string> GetGridSettings(); | 39 | Dictionary<string, string> GetGridSettings(); |
41 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); | 40 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); |
42 | |||
43 | } | 41 | } |
44 | } | 42 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/IInterRegionCommunications.cs b/OpenSim/Framework/Communications/IInterRegionCommunications.cs index 3aa20a3..e2a96f6 100644 --- a/OpenSim/Framework/Communications/IInterRegionCommunications.cs +++ b/OpenSim/Framework/Communications/IInterRegionCommunications.cs | |||
@@ -31,8 +31,7 @@ namespace OpenSim.Framework.Communications | |||
31 | { | 31 | { |
32 | public interface IInterRegionCommunications | 32 | public interface IInterRegionCommunications |
33 | { | 33 | { |
34 | 34 | string rdebugRegionName { get; set; } | |
35 | string rdebugRegionName{ get; set; } | ||
36 | bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData); | 35 | bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData); |
37 | bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData); | 36 | bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData); |
38 | bool RegionUp(SearializableRegionInfo region, ulong regionhandle); | 37 | bool RegionUp(SearializableRegionInfo region, ulong regionhandle); |
@@ -45,6 +44,5 @@ namespace OpenSim.Framework.Communications | |||
45 | bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID); | 44 | bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID); |
46 | 45 | ||
47 | void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID); | 46 | void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID); |
48 | |||
49 | } | 47 | } |
50 | } | 48 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index 9c493d4..f2e5cc5 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs | |||
@@ -52,4 +52,4 @@ namespace OpenSim.Framework.Communications | |||
52 | /// <returns></returns> | 52 | /// <returns></returns> |
53 | List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID); | 53 | List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID); |
54 | } | 54 | } |
55 | } | 55 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 534383a..098d08e 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs | |||
@@ -30,7 +30,6 @@ using System; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using OpenSim.Framework.Communications.Cache; | ||
34 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
35 | 34 | ||
36 | namespace OpenSim.Framework.Communications | 35 | namespace OpenSim.Framework.Communications |
@@ -65,7 +64,7 @@ namespace OpenSim.Framework.Communications | |||
65 | if (typeInterface != null) | 64 | if (typeInterface != null) |
66 | { | 65 | { |
67 | IInventoryData plug = | 66 | IInventoryData plug = |
68 | (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 67 | (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
69 | plug.Initialise(); | 68 | plug.Initialise(); |
70 | m_plugins.Add(plug.getName(), plug); | 69 | m_plugins.Add(plug.getName(), plug); |
71 | MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); | 70 | MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); |
@@ -370,4 +369,4 @@ namespace OpenSim.Framework.Communications | |||
370 | public abstract void AddNewInventoryItem(LLUUID userID, InventoryItemBase item); | 369 | public abstract void AddNewInventoryItem(LLUUID userID, InventoryItemBase item); |
371 | public abstract void DeleteInventoryItem(LLUUID userID, InventoryItemBase item); | 370 | public abstract void DeleteInventoryItem(LLUUID userID, InventoryItemBase item); |
372 | } | 371 | } |
373 | } | 372 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs index ede3148..954aecb 100644 --- a/OpenSim/Framework/Communications/LoginResponse.cs +++ b/OpenSim/Framework/Communications/LoginResponse.cs | |||
@@ -525,9 +525,9 @@ namespace OpenSim.Framework.UserManagement | |||
525 | set { welcomeMessage = value; } | 525 | set { welcomeMessage = value; } |
526 | } | 526 | } |
527 | 527 | ||
528 | public BuddyList BuddList | 528 | public BuddyList BuddList |
529 | { | 529 | { |
530 | get{return m_buddyList;} | 530 | get { return m_buddyList; } |
531 | set { m_buddyList = value; } | 531 | set { m_buddyList = value; } |
532 | } | 532 | } |
533 | 533 | ||
@@ -591,4 +591,4 @@ namespace OpenSim.Framework.UserManagement | |||
591 | } | 591 | } |
592 | } | 592 | } |
593 | } | 593 | } |
594 | } | 594 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 6d4cb68..a284910 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Framework.UserManagement | |||
64 | //CFK: CustomizeResponse contains sufficient strings to alleviate the need for this. | 64 | //CFK: CustomizeResponse contains sufficient strings to alleviate the need for this. |
65 | //CKF: MainLog.Instance.Verbose("LOGIN", "Attempting login now..."); | 65 | //CKF: MainLog.Instance.Verbose("LOGIN", "Attempting login now..."); |
66 | XmlRpcResponse response = new XmlRpcResponse(); | 66 | XmlRpcResponse response = new XmlRpcResponse(); |
67 | Hashtable requestData = (Hashtable)request.Params[0]; | 67 | Hashtable requestData = (Hashtable) request.Params[0]; |
68 | 68 | ||
69 | bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && | 69 | bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && |
70 | requestData.Contains("passwd")); | 70 | requestData.Contains("passwd")); |
@@ -75,17 +75,17 @@ namespace OpenSim.Framework.UserManagement | |||
75 | 75 | ||
76 | if (GoodXML) | 76 | if (GoodXML) |
77 | { | 77 | { |
78 | string firstname = (string)requestData["first"]; | 78 | string firstname = (string) requestData["first"]; |
79 | string lastname = (string)requestData["last"]; | 79 | string lastname = (string) requestData["last"]; |
80 | string passwd = (string)requestData["passwd"]; | 80 | string passwd = (string) requestData["passwd"]; |
81 | 81 | ||
82 | userProfile = GetTheUser(firstname, lastname); | 82 | userProfile = GetTheUser(firstname, lastname); |
83 | if (userProfile == null) | 83 | if (userProfile == null) |
84 | { | 84 | { |
85 | MainLog.Instance.Verbose( | 85 | MainLog.Instance.Verbose( |
86 | "LOGIN", | 86 | "LOGIN", |
87 | "Could not find a profile for " + firstname + " " + lastname); | 87 | "Could not find a profile for " + firstname + " " + lastname); |
88 | 88 | ||
89 | return logResponse.CreateLoginFailedResponse(); | 89 | return logResponse.CreateLoginFailedResponse(); |
90 | } | 90 | } |
91 | 91 | ||
@@ -103,15 +103,14 @@ namespace OpenSim.Framework.UserManagement | |||
103 | else | 103 | else |
104 | { | 104 | { |
105 | // If we already have a session... | 105 | // If we already have a session... |
106 | 106 | ||
107 | if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) | 107 | if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) |
108 | { | 108 | { |
109 | userProfile.currentAgent = null; | 109 | userProfile.currentAgent = null; |
110 | m_userManager.CommitAgent(ref userProfile); | 110 | m_userManager.CommitAgent(ref userProfile); |
111 | 111 | ||
112 | // Reject the login | 112 | // Reject the login |
113 | return logResponse.CreateAlreadyLoggedInResponse(); | 113 | return logResponse.CreateAlreadyLoggedInResponse(); |
114 | |||
115 | } | 114 | } |
116 | // Otherwise... | 115 | // Otherwise... |
117 | // Create a new agent session | 116 | // Create a new agent session |
@@ -132,7 +131,7 @@ namespace OpenSim.Framework.UserManagement | |||
132 | userProfile.rootInventoryFolderID = inventData.RootFolderID; | 131 | userProfile.rootInventoryFolderID = inventData.RootFolderID; |
133 | 132 | ||
134 | // Circuit Code | 133 | // Circuit Code |
135 | uint circode = (uint)(Util.RandomClass.Next()); | 134 | uint circode = (uint) (Util.RandomClass.Next()); |
136 | 135 | ||
137 | logResponse.Lastname = userProfile.surname; | 136 | logResponse.Lastname = userProfile.surname; |
138 | logResponse.Firstname = userProfile.username; | 137 | logResponse.Firstname = userProfile.username; |
@@ -150,7 +149,7 @@ namespace OpenSim.Framework.UserManagement | |||
150 | logResponse.InventoryLibRoot = InventoryLibRoot; | 149 | logResponse.InventoryLibRoot = InventoryLibRoot; |
151 | 150 | ||
152 | logResponse.InventoryLibraryOwner = GetLibraryOwner(); | 151 | logResponse.InventoryLibraryOwner = GetLibraryOwner(); |
153 | logResponse.CircuitCode = (Int32)circode; | 152 | logResponse.CircuitCode = (Int32) circode; |
154 | //logResponse.RegionX = 0; //overwritten | 153 | //logResponse.RegionX = 0; //overwritten |
155 | //logResponse.RegionY = 0; //overwritten | 154 | //logResponse.RegionY = 0; //overwritten |
156 | logResponse.Home = "!!null temporary value {home}!!"; // Overwritten | 155 | logResponse.Home = "!!null temporary value {home}!!"; // Overwritten |
@@ -277,7 +276,7 @@ namespace OpenSim.Framework.UserManagement | |||
277 | TempHash["type_default"] = -1; | 276 | TempHash["type_default"] = -1; |
278 | TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001"; | 277 | TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001"; |
279 | temp.Add(TempHash); | 278 | temp.Add(TempHash); |
280 | 279 | ||
281 | return temp; | 280 | return temp; |
282 | } | 281 | } |
283 | 282 | ||
@@ -328,4 +327,4 @@ namespace OpenSim.Framework.UserManagement | |||
328 | } | 327 | } |
329 | } | 328 | } |
330 | } | 329 | } |
331 | } | 330 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs index fd8ce38..e9c7bf3 100644 --- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs | |||
@@ -62,4 +62,4 @@ using System.Runtime.InteropServices; | |||
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
65 | [assembly : AssemblyFileVersion("1.0.0.0")] | 65 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs index 5c77193..1aaf68e 100644 --- a/OpenSim/Framework/Communications/RestClient/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs | |||
@@ -238,7 +238,7 @@ namespace OpenSim.Framework.Communications | |||
238 | } | 238 | } |
239 | } | 239 | } |
240 | realuri = sb.ToString(); | 240 | realuri = sb.ToString(); |
241 | MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri); | 241 | MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri); |
242 | return new Uri(sb.ToString()); | 242 | return new Uri(sb.ToString()); |
243 | } | 243 | } |
244 | 244 | ||
@@ -365,7 +365,7 @@ namespace OpenSim.Framework.Communications | |||
365 | } | 365 | } |
366 | 366 | ||
367 | public Stream Request(Stream src) | 367 | public Stream Request(Stream src) |
368 | { | 368 | { |
369 | _request = (HttpWebRequest) WebRequest.Create(buildUri()); | 369 | _request = (HttpWebRequest) WebRequest.Create(buildUri()); |
370 | _request.KeepAlive = false; | 370 | _request.KeepAlive = false; |
371 | _request.ContentType = "application/xml"; | 371 | _request.ContentType = "application/xml"; |
@@ -374,16 +374,16 @@ namespace OpenSim.Framework.Communications | |||
374 | _asyncException = null; | 374 | _asyncException = null; |
375 | _request.ContentLength = src.Length; | 375 | _request.ContentLength = src.Length; |
376 | 376 | ||
377 | MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength); | 377 | MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength); |
378 | MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri()); | 378 | MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri()); |
379 | src.Seek(0, SeekOrigin.Begin); | 379 | src.Seek(0, SeekOrigin.Begin); |
380 | MainLog.Instance.Verbose("REST", "Seek is ok"); | 380 | MainLog.Instance.Verbose("REST", "Seek is ok"); |
381 | Stream dst = _request.GetRequestStream(); | 381 | Stream dst = _request.GetRequestStream(); |
382 | MainLog.Instance.Verbose("REST", "GetRequestStream is ok"); | 382 | MainLog.Instance.Verbose("REST", "GetRequestStream is ok"); |
383 | 383 | ||
384 | byte[] buf = new byte[1024]; | 384 | byte[] buf = new byte[1024]; |
385 | int length = src.Read(buf, 0, 1024); | 385 | int length = src.Read(buf, 0, 1024); |
386 | MainLog.Instance.Verbose("REST", "First Read is ok"); | 386 | MainLog.Instance.Verbose("REST", "First Read is ok"); |
387 | while (length > 0) | 387 | while (length > 0) |
388 | { | 388 | { |
389 | dst.Write(buf, 0, length); | 389 | dst.Write(buf, 0, length); |
@@ -440,4 +440,4 @@ namespace OpenSim.Framework.Communications | |||
440 | 440 | ||
441 | #endregion Async Invocation | 441 | #endregion Async Invocation |
442 | } | 442 | } |
443 | } | 443 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index d946e00..f913d2c 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections; | ||
31 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using System.Security.Cryptography; | 32 | using System.Security.Cryptography; |
@@ -93,13 +92,13 @@ namespace OpenSim.Framework.UserManagement | |||
93 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 92 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
94 | { | 93 | { |
95 | UserProfileData profile = plugin.Value.GetUserByUUID(uuid); | 94 | UserProfileData profile = plugin.Value.GetUserByUUID(uuid); |
96 | 95 | ||
97 | if (null != profile) | 96 | if (null != profile) |
98 | { | 97 | { |
99 | profile.currentAgent = getUserAgent(profile.UUID); | 98 | profile.currentAgent = getUserAgent(profile.UUID); |
100 | return profile; | 99 | return profile; |
101 | } | 100 | } |
102 | } | 101 | } |
103 | 102 | ||
104 | return null; | 103 | return null; |
105 | } | 104 | } |
@@ -112,11 +111,11 @@ namespace OpenSim.Framework.UserManagement | |||
112 | try | 111 | try |
113 | { | 112 | { |
114 | pickerlist = plugin.Value.GeneratePickerResults(queryID, query); | 113 | pickerlist = plugin.Value.GeneratePickerResults(queryID, query); |
115 | |||
116 | } | 114 | } |
117 | catch (Exception) | 115 | catch (Exception) |
118 | { | 116 | { |
119 | MainLog.Instance.Verbose("USERSTORAGE", "Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")"); | 117 | MainLog.Instance.Verbose("USERSTORAGE", |
118 | "Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")"); | ||
120 | return new List<AvatarPickerAvatar>(); | 119 | return new List<AvatarPickerAvatar>(); |
121 | } | 120 | } |
122 | } | 121 | } |
@@ -162,7 +161,8 @@ namespace OpenSim.Framework.UserManagement | |||
162 | } | 161 | } |
163 | catch (Exception e) | 162 | catch (Exception e) |
164 | { | 163 | { |
165 | MainLog.Instance.Verbose("USERSTORAGE", "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")"); | 164 | MainLog.Instance.Verbose("USERSTORAGE", |
165 | "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
166 | } | 166 | } |
167 | } | 167 | } |
168 | 168 | ||
@@ -188,7 +188,8 @@ namespace OpenSim.Framework.UserManagement | |||
188 | } | 188 | } |
189 | catch (Exception e) | 189 | catch (Exception e) |
190 | { | 190 | { |
191 | MainLog.Instance.Verbose("USERSTORAGE", "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 191 | MainLog.Instance.Verbose("USERSTORAGE", |
192 | "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
192 | } | 193 | } |
193 | } | 194 | } |
194 | 195 | ||
@@ -210,7 +211,8 @@ namespace OpenSim.Framework.UserManagement | |||
210 | } | 211 | } |
211 | catch (Exception e) | 212 | catch (Exception e) |
212 | { | 213 | { |
213 | MainLog.Instance.Verbose("USERSTORAGE", "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 214 | MainLog.Instance.Verbose("USERSTORAGE", |
215 | "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
214 | } | 216 | } |
215 | } | 217 | } |
216 | 218 | ||
@@ -222,7 +224,7 @@ namespace OpenSim.Framework.UserManagement | |||
222 | { | 224 | { |
223 | UserProfileData profile = GetUserProfile(agentID); | 225 | UserProfileData profile = GetUserProfile(agentID); |
224 | profile.currentAgent = null; | 226 | profile.currentAgent = null; |
225 | 227 | ||
226 | setUserProfile(profile); | 228 | setUserProfile(profile); |
227 | } | 229 | } |
228 | 230 | ||
@@ -242,7 +244,8 @@ namespace OpenSim.Framework.UserManagement | |||
242 | } | 244 | } |
243 | catch (Exception e) | 245 | catch (Exception e) |
244 | { | 246 | { |
245 | MainLog.Instance.Verbose("USERSTORAGE", "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 247 | MainLog.Instance.Verbose("USERSTORAGE", |
248 | "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
246 | } | 249 | } |
247 | } | 250 | } |
248 | 251 | ||
@@ -356,7 +359,8 @@ namespace OpenSim.Framework.UserManagement | |||
356 | } | 359 | } |
357 | catch (Exception e) | 360 | catch (Exception e) |
358 | { | 361 | { |
359 | MainLog.Instance.Verbose("USERSTORAGE", "Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); | 362 | MainLog.Instance.Verbose("USERSTORAGE", |
363 | "Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
360 | } | 364 | } |
361 | } | 365 | } |
362 | 366 | ||
@@ -365,6 +369,6 @@ namespace OpenSim.Framework.UserManagement | |||
365 | 369 | ||
366 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName); | 370 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName); |
367 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password); | 371 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password); |
368 | public abstract UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid); | 372 | public abstract UserProfileData SetupMasterUser(LLUUID uuid); |
369 | } | 373 | } |
370 | } | 374 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs index b8e64f3..8bb31f8 100644 --- a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs +++ b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs | |||
@@ -136,4 +136,4 @@ namespace OpenSim.Framework.Configuration | |||
136 | doc = null; | 136 | doc = null; |
137 | } | 137 | } |
138 | } | 138 | } |
139 | } | 139 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs index 271c02c..a5ab613 100644 --- a/OpenSim/Framework/ConfigurationMember.cs +++ b/OpenSim/Framework/ConfigurationMember.cs | |||
@@ -27,24 +27,20 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Reflection; | ||
31 | using System.Collections; | ||
32 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
33 | using System.Text; | 31 | using System.Globalization; |
34 | using System.Net; | 32 | using System.Net; |
33 | using System.Reflection; | ||
35 | using System.Xml; | 34 | using System.Xml; |
36 | |||
37 | using libsecondlife; | 35 | using libsecondlife; |
38 | |||
39 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
40 | using OpenSim.Framework; | ||
41 | using System.Globalization; | ||
42 | 37 | ||
43 | namespace OpenSim.Framework | 38 | namespace OpenSim.Framework |
44 | { | 39 | { |
45 | public class ConfigurationMember | 40 | public class ConfigurationMember |
46 | { | 41 | { |
47 | public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); | 42 | public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); |
43 | |||
48 | public delegate void ConfigurationOptionsLoad(); | 44 | public delegate void ConfigurationOptionsLoad(); |
49 | 45 | ||
50 | private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>(); | 46 | private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>(); |
@@ -55,29 +51,36 @@ namespace OpenSim.Framework | |||
55 | private ConfigurationOptionResult resultFunction; | 51 | private ConfigurationOptionResult resultFunction; |
56 | 52 | ||
57 | private IGenericConfig configurationPlugin = null; | 53 | private IGenericConfig configurationPlugin = null; |
54 | |||
58 | /// <summary> | 55 | /// <summary> |
59 | /// This is the default configuration DLL loaded | 56 | /// This is the default configuration DLL loaded |
60 | /// </summary> | 57 | /// </summary> |
61 | private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; | 58 | private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; |
62 | public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) | 59 | |
60 | public ConfigurationMember(string configuration_filename, string configuration_description, | ||
61 | ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) | ||
63 | { | 62 | { |
64 | this.configurationFilename = configuration_filename; | 63 | configurationFilename = configuration_filename; |
65 | this.configurationDescription = configuration_description; | 64 | configurationDescription = configuration_description; |
66 | this.loadFunction = load_function; | 65 | loadFunction = load_function; |
67 | this.resultFunction = result_function; | 66 | resultFunction = result_function; |
68 | } | 67 | } |
69 | public ConfigurationMember(XmlNode configuration_xml, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) | 68 | |
69 | public ConfigurationMember(XmlNode configuration_xml, string configuration_description, | ||
70 | ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) | ||
70 | { | 71 | { |
71 | this.configurationFilename = ""; | 72 | configurationFilename = ""; |
72 | this.configurationFromXMLNode = configuration_xml; | 73 | configurationFromXMLNode = configuration_xml; |
73 | this.configurationDescription = configuration_description; | 74 | configurationDescription = configuration_description; |
74 | this.loadFunction = load_function; | 75 | loadFunction = load_function; |
75 | this.resultFunction = result_function; | 76 | resultFunction = result_function; |
76 | } | 77 | } |
78 | |||
77 | public void setConfigurationFilename(string filename) | 79 | public void setConfigurationFilename(string filename) |
78 | { | 80 | { |
79 | configurationFilename = filename; | 81 | configurationFilename = filename; |
80 | } | 82 | } |
83 | |||
81 | public void setConfigurationDescription(string desc) | 84 | public void setConfigurationDescription(string desc) |
82 | { | 85 | { |
83 | configurationDescription = desc; | 86 | configurationDescription = desc; |
@@ -92,9 +95,11 @@ namespace OpenSim.Framework | |||
92 | { | 95 | { |
93 | configurationPluginFilename = dll_filename; | 96 | configurationPluginFilename = dll_filename; |
94 | } | 97 | } |
98 | |||
95 | private void checkAndAddConfigOption(ConfigurationOption option) | 99 | private void checkAndAddConfigOption(ConfigurationOption option) |
96 | { | 100 | { |
97 | if ((option.configurationKey != "" && option.configurationQuestion != "") || (option.configurationKey != "" && option.configurationUseDefaultNoPrompt)) | 101 | if ((option.configurationKey != "" && option.configurationQuestion != "") || |
102 | (option.configurationKey != "" && option.configurationUseDefaultNoPrompt)) | ||
98 | { | 103 | { |
99 | if (!configurationOptions.Contains(option)) | 104 | if (!configurationOptions.Contains(option)) |
100 | { | 105 | { |
@@ -103,11 +108,16 @@ namespace OpenSim.Framework | |||
103 | } | 108 | } |
104 | else | 109 | else |
105 | { | 110 | { |
106 | MainLog.Instance.Notice("Required fields for adding a configuration option is invalid. Will not add this option (" + option.configurationKey + ")"); | 111 | MainLog.Instance.Notice( |
112 | "Required fields for adding a configuration option is invalid. Will not add this option (" + | ||
113 | option.configurationKey + ")"); | ||
107 | } | 114 | } |
108 | } | 115 | } |
109 | 116 | ||
110 | public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt) | 117 | public void addConfigurationOption(string configuration_key, |
118 | ConfigurationOption.ConfigurationTypes configuration_type, | ||
119 | string configuration_question, string configuration_default, | ||
120 | bool use_default_no_prompt) | ||
111 | { | 121 | { |
112 | ConfigurationOption configOption = new ConfigurationOption(); | 122 | ConfigurationOption configOption = new ConfigurationOption(); |
113 | configOption.configurationKey = configuration_key; | 123 | configOption.configurationKey = configuration_key; |
@@ -119,7 +129,11 @@ namespace OpenSim.Framework | |||
119 | checkAndAddConfigOption(configOption); | 129 | checkAndAddConfigOption(configOption); |
120 | } | 130 | } |
121 | 131 | ||
122 | public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt, ConfigurationOption.ConfigurationOptionShouldBeAsked shouldIBeAskedDelegate) | 132 | public void addConfigurationOption(string configuration_key, |
133 | ConfigurationOption.ConfigurationTypes configuration_type, | ||
134 | string configuration_question, string configuration_default, | ||
135 | bool use_default_no_prompt, | ||
136 | ConfigurationOption.ConfigurationOptionShouldBeAsked shouldIBeAskedDelegate) | ||
123 | { | 137 | { |
124 | ConfigurationOption configOption = new ConfigurationOption(); | 138 | ConfigurationOption configOption = new ConfigurationOption(); |
125 | configOption.configurationKey = configuration_key; | 139 | configOption.configurationKey = configuration_key; |
@@ -133,26 +147,30 @@ namespace OpenSim.Framework | |||
133 | 147 | ||
134 | public void performConfigurationRetrieve() | 148 | public void performConfigurationRetrieve() |
135 | { | 149 | { |
136 | configurationPlugin = this.LoadConfigDll(configurationPluginFilename); | 150 | configurationPlugin = LoadConfigDll(configurationPluginFilename); |
137 | configurationOptions.Clear(); | 151 | configurationOptions.Clear(); |
138 | if(loadFunction == null) | 152 | if (loadFunction == null) |
139 | { | 153 | { |
140 | MainLog.Instance.Error("Load Function for '" + this.configurationDescription + "' is null. Refusing to run configuration."); | 154 | MainLog.Instance.Error("Load Function for '" + configurationDescription + |
155 | "' is null. Refusing to run configuration."); | ||
141 | return; | 156 | return; |
142 | } | 157 | } |
143 | 158 | ||
144 | if(resultFunction == null) | 159 | if (resultFunction == null) |
145 | { | 160 | { |
146 | MainLog.Instance.Error("Result Function for '" + this.configurationDescription + "' is null. Refusing to run configuration."); | 161 | MainLog.Instance.Error("Result Function for '" + configurationDescription + |
162 | "' is null. Refusing to run configuration."); | ||
147 | return; | 163 | return; |
148 | } | 164 | } |
149 | 165 | ||
150 | MainLog.Instance.Verbose("CONFIG", "Calling Configuration Load Function..."); | 166 | MainLog.Instance.Verbose("CONFIG", "Calling Configuration Load Function..."); |
151 | this.loadFunction(); | 167 | loadFunction(); |
152 | 168 | ||
153 | if(configurationOptions.Count <= 0) | 169 | if (configurationOptions.Count <= 0) |
154 | { | 170 | { |
155 | MainLog.Instance.Error("CONFIG", "No configuration options were specified for '" + this.configurationOptions + "'. Refusing to continue configuration."); | 171 | MainLog.Instance.Error("CONFIG", |
172 | "No configuration options were specified for '" + configurationOptions + | ||
173 | "'. Refusing to continue configuration."); | ||
156 | return; | 174 | return; |
157 | } | 175 | } |
158 | 176 | ||
@@ -179,7 +197,7 @@ namespace OpenSim.Framework | |||
179 | } | 197 | } |
180 | else | 198 | else |
181 | { | 199 | { |
182 | if (this.configurationFromXMLNode != null) | 200 | if (configurationFromXMLNode != null) |
183 | { | 201 | { |
184 | MainLog.Instance.Notice("Loading from XML Node, will not save to the file"); | 202 | MainLog.Instance.Notice("Loading from XML Node, will not save to the file"); |
185 | configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml); | 203 | configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml); |
@@ -219,15 +237,22 @@ namespace OpenSim.Framework | |||
219 | } | 237 | } |
220 | else | 238 | else |
221 | { | 239 | { |
222 | if ((configOption.shouldIBeAsked != null && configOption.shouldIBeAsked(configOption.configurationKey)) || configOption.shouldIBeAsked == null) | 240 | if ((configOption.shouldIBeAsked != null && |
241 | configOption.shouldIBeAsked(configOption.configurationKey)) || | ||
242 | configOption.shouldIBeAsked == null) | ||
223 | { | 243 | { |
224 | if (configurationDescription.Trim() != "") | 244 | if (configurationDescription.Trim() != "") |
225 | { | 245 | { |
226 | console_result = MainLog.Instance.CmdPrompt(configurationDescription + ": " + configOption.configurationQuestion, configOption.configurationDefault); | 246 | console_result = |
247 | MainLog.Instance.CmdPrompt( | ||
248 | configurationDescription + ": " + configOption.configurationQuestion, | ||
249 | configOption.configurationDefault); | ||
227 | } | 250 | } |
228 | else | 251 | else |
229 | { | 252 | { |
230 | console_result = MainLog.Instance.CmdPrompt(configOption.configurationQuestion, configOption.configurationDefault); | 253 | console_result = |
254 | MainLog.Instance.CmdPrompt(configOption.configurationQuestion, | ||
255 | configOption.configurationDefault); | ||
231 | } | 256 | } |
232 | } | 257 | } |
233 | else | 258 | else |
@@ -235,7 +260,7 @@ namespace OpenSim.Framework | |||
235 | //Dont Ask! Just use default | 260 | //Dont Ask! Just use default |
236 | console_result = configOption.configurationDefault; | 261 | console_result = configOption.configurationDefault; |
237 | } | 262 | } |
238 | } | 263 | } |
239 | } | 264 | } |
240 | else | 265 | else |
241 | { | 266 | { |
@@ -366,7 +391,9 @@ namespace OpenSim.Framework | |||
366 | break; | 391 | break; |
367 | case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT: | 392 | case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT: |
368 | float floatResult; | 393 | float floatResult; |
369 | if (float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out floatResult)) | 394 | if ( |
395 | float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, | ||
396 | out floatResult)) | ||
370 | { | 397 | { |
371 | convertSuccess = true; | 398 | convertSuccess = true; |
372 | return_result = floatResult; | 399 | return_result = floatResult; |
@@ -375,7 +402,9 @@ namespace OpenSim.Framework | |||
375 | break; | 402 | break; |
376 | case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE: | 403 | case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE: |
377 | double doubleResult; | 404 | double doubleResult; |
378 | if (Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out doubleResult)) | 405 | if ( |
406 | Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, | ||
407 | out doubleResult)) | ||
379 | { | 408 | { |
380 | convertSuccess = true; | 409 | convertSuccess = true; |
381 | return_result = doubleResult; | 410 | return_result = doubleResult; |
@@ -391,9 +420,10 @@ namespace OpenSim.Framework | |||
391 | configurationPlugin.SetAttribute(configOption.configurationKey, console_result); | 420 | configurationPlugin.SetAttribute(configOption.configurationKey, console_result); |
392 | } | 421 | } |
393 | 422 | ||
394 | if (!this.resultFunction(configOption.configurationKey, return_result)) | 423 | if (!resultFunction(configOption.configurationKey, return_result)) |
395 | { | 424 | { |
396 | Console.MainLog.Instance.Notice("The handler for the last configuration option denied that input, please try again."); | 425 | MainLog.Instance.Notice( |
426 | "The handler for the last configuration option denied that input, please try again."); | ||
397 | convertSuccess = false; | 427 | convertSuccess = false; |
398 | ignoreNextFromConfig = true; | 428 | ignoreNextFromConfig = true; |
399 | } | 429 | } |
@@ -402,19 +432,27 @@ namespace OpenSim.Framework | |||
402 | { | 432 | { |
403 | if (configOption.configurationUseDefaultNoPrompt) | 433 | if (configOption.configurationUseDefaultNoPrompt) |
404 | { | 434 | { |
405 | MainLog.Instance.Error("CONFIG", string.Format("[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename)); | 435 | MainLog.Instance.Error("CONFIG", |
436 | string.Format( | ||
437 | "[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", | ||
438 | configOption.configurationKey, console_result, errorMessage, | ||
439 | configurationFilename)); | ||
406 | convertSuccess = true; | 440 | convertSuccess = true; |
407 | } | 441 | } |
408 | else | 442 | else |
409 | { | 443 | { |
410 | MainLog.Instance.Warn("CONFIG", string.Format("[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename)); | 444 | MainLog.Instance.Warn("CONFIG", |
445 | string.Format( | ||
446 | "[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", | ||
447 | configOption.configurationKey, console_result, errorMessage, | ||
448 | configurationFilename)); | ||
411 | ignoreNextFromConfig = true; | 449 | ignoreNextFromConfig = true; |
412 | } | 450 | } |
413 | } | 451 | } |
414 | } | 452 | } |
415 | } | 453 | } |
416 | 454 | ||
417 | if(useFile) | 455 | if (useFile) |
418 | { | 456 | { |
419 | configurationPlugin.Commit(); | 457 | configurationPlugin.Commit(); |
420 | configurationPlugin.Close(); | 458 | configurationPlugin.Close(); |
@@ -436,7 +474,8 @@ namespace OpenSim.Framework | |||
436 | 474 | ||
437 | if (typeInterface != null) | 475 | if (typeInterface != null) |
438 | { | 476 | { |
439 | plug = (IGenericConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 477 | plug = |
478 | (IGenericConfig) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
440 | } | 479 | } |
441 | } | 480 | } |
442 | } | 481 | } |
@@ -448,10 +487,10 @@ namespace OpenSim.Framework | |||
448 | 487 | ||
449 | public void forceSetConfigurationOption(string configuration_key, string configuration_value) | 488 | public void forceSetConfigurationOption(string configuration_key, string configuration_value) |
450 | { | 489 | { |
451 | this.configurationPlugin.LoadData(); | 490 | configurationPlugin.LoadData(); |
452 | this.configurationPlugin.SetAttribute(configuration_key, configuration_value); | 491 | configurationPlugin.SetAttribute(configuration_key, configuration_value); |
453 | this.configurationPlugin.Commit(); | 492 | configurationPlugin.Commit(); |
454 | this.configurationPlugin.Close(); | 493 | configurationPlugin.Close(); |
455 | } | 494 | } |
456 | } | 495 | } |
457 | } | 496 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/ConfigurationOption.cs b/OpenSim/Framework/ConfigurationOption.cs index b83be5e..7f9b5b5 100644 --- a/OpenSim/Framework/ConfigurationOption.cs +++ b/OpenSim/Framework/ConfigurationOption.cs | |||
@@ -30,7 +30,6 @@ namespace OpenSim.Framework | |||
30 | { | 30 | { |
31 | public class ConfigurationOption | 31 | public class ConfigurationOption |
32 | { | 32 | { |
33 | |||
34 | public delegate bool ConfigurationOptionShouldBeAsked(string configuration_key); | 33 | public delegate bool ConfigurationOptionShouldBeAsked(string configuration_key); |
35 | 34 | ||
36 | public enum ConfigurationTypes | 35 | public enum ConfigurationTypes |
diff --git a/OpenSim/Framework/Console/AssemblyInfo.cs b/OpenSim/Framework/Console/AssemblyInfo.cs index bba4f95..73ecd18 100644 --- a/OpenSim/Framework/Console/AssemblyInfo.cs +++ b/OpenSim/Framework/Console/AssemblyInfo.cs | |||
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices; | |||
55 | // You can specify all values by your own or you can build default build and revision | 55 | // You can specify all values by your own or you can build default build and revision |
56 | // numbers with the '*' character (the default): | 56 | // numbers with the '*' character (the default): |
57 | 57 | ||
58 | [assembly : AssemblyVersion("1.0.*")] | 58 | [assembly : AssemblyVersion("1.0.*")] \ No newline at end of file |
diff --git a/OpenSim/Framework/Console/ConsoleCallbacksBase.cs b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs index 93540aa..606469d 100644 --- a/OpenSim/Framework/Console/ConsoleCallbacksBase.cs +++ b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs | |||
@@ -32,4 +32,4 @@ namespace OpenSim.Framework.Console | |||
32 | void RunCmd(string cmd, string[] cmdparams); | 32 | void RunCmd(string cmd, string[] cmdparams); |
33 | void Show(string ShowWhat); | 33 | void Show(string ShowWhat); |
34 | } | 34 | } |
35 | } | 35 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs index dd0c5fa..e7b1945 100644 --- a/OpenSim/Framework/Console/LogBase.cs +++ b/OpenSim/Framework/Console/LogBase.cs | |||
@@ -248,12 +248,12 @@ namespace OpenSim.Framework.Console | |||
248 | // Some older systems dont support coloured text. | 248 | // Some older systems dont support coloured text. |
249 | System.Console.WriteLine(format, args); | 249 | System.Console.WriteLine(format, args); |
250 | } | 250 | } |
251 | catch (System.FormatException) | 251 | catch (FormatException) |
252 | { | 252 | { |
253 | // Some older systems dont support coloured text. | 253 | // Some older systems dont support coloured text. |
254 | System.Console.WriteLine(args); | 254 | System.Console.WriteLine(args); |
255 | } | 255 | } |
256 | 256 | ||
257 | return; | 257 | return; |
258 | } | 258 | } |
259 | } | 259 | } |
@@ -479,4 +479,4 @@ namespace OpenSim.Framework.Console | |||
479 | } | 479 | } |
480 | } | 480 | } |
481 | } | 481 | } |
482 | } | 482 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Console/MainLog.cs b/OpenSim/Framework/Console/MainLog.cs index 16ba2c2..bea2a22 100644 --- a/OpenSim/Framework/Console/MainLog.cs +++ b/OpenSim/Framework/Console/MainLog.cs | |||
@@ -37,4 +37,4 @@ namespace OpenSim.Framework.Console | |||
37 | set { instance = value; } | 37 | set { instance = value; } |
38 | } | 38 | } |
39 | } | 39 | } |
40 | } | 40 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs index 00999c2..2637166 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs | |||
@@ -140,16 +140,17 @@ namespace OpenSim.Framework.Data.DB4o | |||
140 | { | 140 | { |
141 | manager = null; | 141 | manager = null; |
142 | } | 142 | } |
143 | |||
143 | /// <summary> | 144 | /// <summary> |
144 | /// // Returns a list of avatar and UUIDs that match the query | 145 | /// // Returns a list of avatar and UUIDs that match the query |
145 | /// </summary> | 146 | /// </summary> |
146 | |||
147 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 147 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
148 | { | 148 | { |
149 | //Do nothing yet | 149 | //Do nothing yet |
150 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); | 150 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); |
151 | return returnlist; | 151 | return returnlist; |
152 | } | 152 | } |
153 | |||
153 | /// <summary> | 154 | /// <summary> |
154 | /// Returns the providers name | 155 | /// Returns the providers name |
155 | /// </summary> | 156 | /// </summary> |
@@ -173,4 +174,4 @@ namespace OpenSim.Framework.Data.DB4o | |||
173 | return null; | 174 | return null; |
174 | } | 175 | } |
175 | } | 176 | } |
176 | } | 177 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.DB4o/DB4oManager.cs b/OpenSim/Framework/Data.DB4o/DB4oManager.cs index cf1dfae..4b1b451 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oManager.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oManager.cs | |||
@@ -167,4 +167,4 @@ namespace OpenSim.Framework.Data.DB4o | |||
167 | } | 167 | } |
168 | } | 168 | } |
169 | } | 169 | } |
170 | } | 170 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs index 383bfbe..e0973f1 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs | |||
@@ -26,8 +26,8 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.IO; | ||
30 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | ||
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | 32 | ||
33 | namespace OpenSim.Framework.Data.DB4o | 33 | namespace OpenSim.Framework.Data.DB4o |
@@ -132,12 +132,14 @@ namespace OpenSim.Framework.Data.DB4o | |||
132 | return null; | 132 | return null; |
133 | } | 133 | } |
134 | } | 134 | } |
135 | public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 135 | |
136 | public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | ||
136 | { | 137 | { |
137 | //Do nothing yet | 138 | //Do nothing yet |
138 | List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>(); | 139 | List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>(); |
139 | return returnlist; | 140 | return returnlist; |
140 | } | 141 | } |
142 | |||
141 | /// <summary> | 143 | /// <summary> |
142 | /// Creates a new user profile | 144 | /// Creates a new user profile |
143 | /// </summary> | 145 | /// </summary> |
@@ -225,4 +227,4 @@ namespace OpenSim.Framework.Data.DB4o | |||
225 | return "0.1"; | 227 | return "0.1"; |
226 | } | 228 | } |
227 | } | 229 | } |
228 | } | 230 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs index cc0422c..08fbef0 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs | |||
@@ -27,18 +27,18 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Data; | ||
31 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Data; | ||
32 | using System.Data.SqlClient; | 32 | using System.Data.SqlClient; |
33 | |||
34 | using libsecondlife; | 33 | using libsecondlife; |
35 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
36 | 35 | ||
37 | namespace OpenSim.Framework.Data.MSSQL | 36 | namespace OpenSim.Framework.Data.MSSQL |
38 | { | 37 | { |
39 | class MSSQLAssetData : IAssetProvider | 38 | internal class MSSQLAssetData : IAssetProvider |
40 | { | 39 | { |
41 | MSSQLManager database; | 40 | private MSSQLManager database; |
41 | |||
42 | #region IAssetProvider Members | 42 | #region IAssetProvider Members |
43 | 43 | ||
44 | private void UpgradeAssetsTable(string tableName) | 44 | private void UpgradeAssetsTable(string tableName) |
@@ -46,7 +46,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
46 | // null as the version, indicates that the table didn't exist | 46 | // null as the version, indicates that the table didn't exist |
47 | if (tableName == null) | 47 | if (tableName == null) |
48 | { | 48 | { |
49 | MainLog.Instance.Notice("ASSETS", "Creating new database tables"); | 49 | MainLog.Instance.Notice("ASSETS", "Creating new database tables"); |
50 | database.ExecuteResourceSql("CreateAssetsTable.sql"); | 50 | database.ExecuteResourceSql("CreateAssetsTable.sql"); |
51 | return; | 51 | return; |
52 | } | 52 | } |
@@ -57,14 +57,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
57 | /// </summary> | 57 | /// </summary> |
58 | private void TestTables() | 58 | private void TestTables() |
59 | { | 59 | { |
60 | |||
61 | Dictionary<string, string> tableList = new Dictionary<string, string>(); | 60 | Dictionary<string, string> tableList = new Dictionary<string, string>(); |
62 | 61 | ||
63 | tableList["assets"] = null; | 62 | tableList["assets"] = null; |
64 | database.GetTableVersion(tableList); | 63 | database.GetTableVersion(tableList); |
65 | 64 | ||
66 | UpgradeAssetsTable(tableList["assets"]); | 65 | UpgradeAssetsTable(tableList["assets"]); |
67 | |||
68 | } | 66 | } |
69 | 67 | ||
70 | public AssetBase FetchAsset(LLUUID assetID) | 68 | public AssetBase FetchAsset(LLUUID assetID) |
@@ -80,30 +78,27 @@ namespace OpenSim.Framework.Data.MSSQL | |||
80 | asset = database.getAssetRow(reader); | 78 | asset = database.getAssetRow(reader); |
81 | reader.Close(); | 79 | reader.Close(); |
82 | result.Dispose(); | 80 | result.Dispose(); |
83 | 81 | ||
84 | return asset; | 82 | return asset; |
85 | } | 83 | } |
86 | 84 | ||
87 | public void CreateAsset(AssetBase asset) | 85 | public void CreateAsset(AssetBase asset) |
88 | { | 86 | { |
89 | 87 | if (ExistsAsset((LLUUID) asset.FullID)) | |
90 | if (ExistsAsset((LLUUID)asset.FullID)) | ||
91 | { | 88 | { |
92 | return; | 89 | return; |
93 | } | 90 | } |
94 | 91 | ||
95 | 92 | ||
96 | |||
97 | SqlCommand cmd = | 93 | SqlCommand cmd = |
98 | new SqlCommand( | 94 | new SqlCommand( |
99 | "INSERT INTO assets ([id], [name], [description], [assetType], [invType], [local], [temporary], [data])"+ | 95 | "INSERT INTO assets ([id], [name], [description], [assetType], [invType], [local], [temporary], [data])" + |
100 | " VALUES "+ | 96 | " VALUES " + |
101 | "(@id, @name, @description, @assetType, @invType, @local, @temporary, @data)", | 97 | "(@id, @name, @description, @assetType, @invType, @local, @temporary, @data)", |
102 | database.getConnection()); | 98 | database.getConnection()); |
103 | 99 | ||
104 | using (cmd) | 100 | using (cmd) |
105 | { | 101 | { |
106 | |||
107 | //SqlParameter p = cmd.Parameters.Add("id", SqlDbType.NVarChar); | 102 | //SqlParameter p = cmd.Parameters.Add("id", SqlDbType.NVarChar); |
108 | //p.Value = asset.FullID.ToString(); | 103 | //p.Value = asset.FullID.ToString(); |
109 | cmd.Parameters.AddWithValue("id", asset.FullID.ToString()); | 104 | cmd.Parameters.AddWithValue("id", asset.FullID.ToString()); |
@@ -127,24 +122,23 @@ namespace OpenSim.Framework.Data.MSSQL | |||
127 | { | 122 | { |
128 | throw; | 123 | throw; |
129 | } | 124 | } |
130 | 125 | ||
131 | cmd.Dispose(); | 126 | cmd.Dispose(); |
132 | } | 127 | } |
133 | |||
134 | } | 128 | } |
135 | 129 | ||
136 | 130 | ||
137 | public void UpdateAsset(AssetBase asset) | 131 | public void UpdateAsset(AssetBase asset) |
138 | { | 132 | { |
139 | SqlCommand command = new SqlCommand("UPDATE assets set id = @id, " + | 133 | SqlCommand command = new SqlCommand("UPDATE assets set id = @id, " + |
140 | "name = @name, " + | 134 | "name = @name, " + |
141 | "description = @description," + | 135 | "description = @description," + |
142 | "assetType = @assetType," + | 136 | "assetType = @assetType," + |
143 | "invType = @invType," + | 137 | "invType = @invType," + |
144 | "local = @local,"+ | 138 | "local = @local," + |
145 | "temporary = @temporary," + | 139 | "temporary = @temporary," + |
146 | "data = @data where " + | 140 | "data = @data where " + |
147 | "id = @keyId;", database.getConnection()); | 141 | "id = @keyId;", database.getConnection()); |
148 | SqlParameter param1 = new SqlParameter("@id", asset.FullID.ToString()); | 142 | SqlParameter param1 = new SqlParameter("@id", asset.FullID.ToString()); |
149 | SqlParameter param2 = new SqlParameter("@name", asset.Name); | 143 | SqlParameter param2 = new SqlParameter("@name", asset.Name); |
150 | SqlParameter param3 = new SqlParameter("@description", asset.Description); | 144 | SqlParameter param3 = new SqlParameter("@description", asset.Description); |
@@ -172,12 +166,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
172 | { | 166 | { |
173 | MainLog.Instance.Error(e.ToString()); | 167 | MainLog.Instance.Error(e.ToString()); |
174 | } | 168 | } |
175 | |||
176 | } | 169 | } |
177 | 170 | ||
178 | public bool ExistsAsset(LLUUID uuid) | 171 | public bool ExistsAsset(LLUUID uuid) |
179 | { | 172 | { |
180 | if (FetchAsset(uuid) != null) { | 173 | if (FetchAsset(uuid) != null) |
174 | { | ||
181 | return true; | 175 | return true; |
182 | } | 176 | } |
183 | return false; | 177 | return false; |
@@ -194,11 +188,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
194 | 188 | ||
195 | #region IPlugin Members | 189 | #region IPlugin Members |
196 | 190 | ||
197 | |||
198 | |||
199 | public void Initialise() | 191 | public void Initialise() |
200 | { | 192 | { |
201 | |||
202 | IniFile GridDataMySqlFile = new IniFile("mssql_connection.ini"); | 193 | IniFile GridDataMySqlFile = new IniFile("mssql_connection.ini"); |
203 | string settingDataSource = GridDataMySqlFile.ParseFileReadValue("data_source"); | 194 | string settingDataSource = GridDataMySqlFile.ParseFileReadValue("data_source"); |
204 | string settingInitialCatalog = GridDataMySqlFile.ParseFileReadValue("initial_catalog"); | 195 | string settingInitialCatalog = GridDataMySqlFile.ParseFileReadValue("initial_catalog"); |
@@ -206,7 +197,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
206 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); | 197 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); |
207 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | 198 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); |
208 | 199 | ||
209 | this.database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword); | 200 | database = |
201 | new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, | ||
202 | settingPassword); | ||
210 | 203 | ||
211 | TestTables(); | 204 | TestTables(); |
212 | } | 205 | } |
@@ -214,7 +207,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
214 | public string Version | 207 | public string Version |
215 | { | 208 | { |
216 | // get { return database.getVersion(); } | 209 | // get { return database.getVersion(); } |
217 | get { return database.getVersion(); } | 210 | get { return database.getVersion(); } |
218 | } | 211 | } |
219 | 212 | ||
220 | public string Name | 213 | public string Name |
@@ -224,4 +217,4 @@ namespace OpenSim.Framework.Data.MSSQL | |||
224 | 217 | ||
225 | #endregion | 218 | #endregion |
226 | } | 219 | } |
227 | } | 220 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs index 72db568..7d228e6 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs | |||
@@ -57,8 +57,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
57 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); | 57 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); |
58 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | 58 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); |
59 | 59 | ||
60 | database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword); | 60 | database = |
61 | 61 | new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, | |
62 | settingPassword); | ||
62 | } | 63 | } |
63 | 64 | ||
64 | /// <summary> | 65 | /// <summary> |
@@ -120,14 +121,13 @@ namespace OpenSim.Framework.Data.MSSQL | |||
120 | result.Dispose(); | 121 | result.Dispose(); |
121 | 122 | ||
122 | return row; | 123 | return row; |
123 | |||
124 | } | 124 | } |
125 | catch (Exception) | 125 | catch (Exception) |
126 | { | 126 | { |
127 | if (reader != null) { | 127 | if (reader != null) |
128 | { | ||
128 | reader.Close(); | 129 | reader.Close(); |
129 | } | 130 | } |
130 | |||
131 | } | 131 | } |
132 | return null; | 132 | return null; |
133 | } | 133 | } |
@@ -135,7 +135,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
135 | /// <summary> | 135 | /// <summary> |
136 | /// // Returns a list of avatar and UUIDs that match the query | 136 | /// // Returns a list of avatar and UUIDs that match the query |
137 | /// </summary> | 137 | /// </summary> |
138 | |||
139 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 138 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
140 | { | 139 | { |
141 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); | 140 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); |
@@ -152,18 +151,19 @@ namespace OpenSim.Framework.Data.MSSQL | |||
152 | param["second"] = querysplit[1]; | 151 | param["second"] = querysplit[1]; |
153 | 152 | ||
154 | IDbCommand result = | 153 | IDbCommand result = |
155 | database.Query("SELECT UUID,username,surname FROM users WHERE username = @first AND lastname = @second", param); | 154 | database.Query( |
155 | "SELECT UUID,username,surname FROM users WHERE username = @first AND lastname = @second", | ||
156 | param); | ||
156 | IDataReader reader = result.ExecuteReader(); | 157 | IDataReader reader = result.ExecuteReader(); |
157 | 158 | ||
158 | 159 | ||
159 | while (reader.Read()) | 160 | while (reader.Read()) |
160 | { | 161 | { |
161 | AvatarPickerAvatar user = new AvatarPickerAvatar(); | 162 | AvatarPickerAvatar user = new AvatarPickerAvatar(); |
162 | user.AvatarID = new LLUUID((string)reader["UUID"]); | 163 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
163 | user.firstName = (string)reader["username"]; | 164 | user.firstName = (string) reader["username"]; |
164 | user.lastName = (string)reader["surname"]; | 165 | user.lastName = (string) reader["surname"]; |
165 | returnlist.Add(user); | 166 | returnlist.Add(user); |
166 | |||
167 | } | 167 | } |
168 | reader.Close(); | 168 | reader.Close(); |
169 | result.Dispose(); | 169 | result.Dispose(); |
@@ -175,13 +175,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
175 | MainLog.Instance.Error(e.ToString()); | 175 | MainLog.Instance.Error(e.ToString()); |
176 | return returnlist; | 176 | return returnlist; |
177 | } | 177 | } |
178 | |||
179 | |||
180 | |||
181 | } | 178 | } |
182 | else if (querysplit.Length == 1) | 179 | else if (querysplit.Length == 1) |
183 | { | 180 | { |
184 | |||
185 | try | 181 | try |
186 | { | 182 | { |
187 | lock (database) | 183 | lock (database) |
@@ -191,18 +187,19 @@ namespace OpenSim.Framework.Data.MSSQL | |||
191 | param["second"] = querysplit[1]; | 187 | param["second"] = querysplit[1]; |
192 | 188 | ||
193 | IDbCommand result = | 189 | IDbCommand result = |
194 | database.Query("SELECT UUID,username,surname FROM users WHERE username = @first OR lastname = @second", param); | 190 | database.Query( |
191 | "SELECT UUID,username,surname FROM users WHERE username = @first OR lastname = @second", | ||
192 | param); | ||
195 | IDataReader reader = result.ExecuteReader(); | 193 | IDataReader reader = result.ExecuteReader(); |
196 | 194 | ||
197 | 195 | ||
198 | while (reader.Read()) | 196 | while (reader.Read()) |
199 | { | 197 | { |
200 | AvatarPickerAvatar user = new AvatarPickerAvatar(); | 198 | AvatarPickerAvatar user = new AvatarPickerAvatar(); |
201 | user.AvatarID = new LLUUID((string)reader["UUID"]); | 199 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
202 | user.firstName = (string)reader["username"]; | 200 | user.firstName = (string) reader["username"]; |
203 | user.lastName = (string)reader["surname"]; | 201 | user.lastName = (string) reader["surname"]; |
204 | returnlist.Add(user); | 202 | returnlist.Add(user); |
205 | |||
206 | } | 203 | } |
207 | reader.Close(); | 204 | reader.Close(); |
208 | result.Dispose(); | 205 | result.Dispose(); |
@@ -225,8 +222,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
225 | /// <returns>The sim profile</returns> | 222 | /// <returns>The sim profile</returns> |
226 | public RegionProfileData GetProfileByLLUUID(LLUUID uuid) | 223 | public RegionProfileData GetProfileByLLUUID(LLUUID uuid) |
227 | { | 224 | { |
228 | Dictionary<string, string> param = new Dictionary<string, string>(); | 225 | Dictionary<string, string> param = new Dictionary<string, string>(); |
229 | param["uuid"] = uuid.ToString(); | 226 | param["uuid"] = uuid.ToString(); |
230 | IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); | 227 | IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); |
231 | IDataReader reader = result.ExecuteReader(); | 228 | IDataReader reader = result.ExecuteReader(); |
232 | 229 | ||
@@ -244,7 +241,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
244 | /// <returns>A dataresponse enum indicating success</returns> | 241 | /// <returns>A dataresponse enum indicating success</returns> |
245 | public DataResponse AddProfile(RegionProfileData profile) | 242 | public DataResponse AddProfile(RegionProfileData profile) |
246 | { | 243 | { |
247 | |||
248 | try | 244 | try |
249 | { | 245 | { |
250 | if (GetProfileByLLUUID(profile.UUID) != null) | 246 | if (GetProfileByLLUUID(profile.UUID) != null) |
@@ -310,4 +306,4 @@ namespace OpenSim.Framework.Data.MSSQL | |||
310 | return null; | 306 | return null; |
311 | } | 307 | } |
312 | } | 308 | } |
313 | } | 309 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs index a6b8819..4b2c7af 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs | |||
@@ -26,10 +26,9 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.Collections.Generic; |
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Data.SqlClient; | 31 | using System.Data.SqlClient; |
32 | using System.Collections.Generic; | ||
33 | using libsecondlife; | 32 | using libsecondlife; |
34 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
35 | 34 | ||
@@ -57,7 +56,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
57 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); | 56 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); |
58 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | 57 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); |
59 | 58 | ||
60 | database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword); | 59 | database = |
60 | new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, | ||
61 | settingPassword); | ||
61 | TestTables(); | 62 | TestTables(); |
62 | } | 63 | } |
63 | 64 | ||
@@ -72,7 +73,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
72 | //database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql"); | 73 | //database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql"); |
73 | return; | 74 | return; |
74 | } | 75 | } |
75 | |||
76 | } | 76 | } |
77 | 77 | ||
78 | private void UpgradeItemsTable(string tableName) | 78 | private void UpgradeItemsTable(string tableName) |
@@ -88,17 +88,17 @@ namespace OpenSim.Framework.Data.MSSQL | |||
88 | 88 | ||
89 | private void TestTables() | 89 | private void TestTables() |
90 | { | 90 | { |
91 | |||
92 | Dictionary<string, string> tableList = new Dictionary<string, string>(); | 91 | Dictionary<string, string> tableList = new Dictionary<string, string>(); |
93 | 92 | ||
94 | tableList["inventoryfolders"] = null; | 93 | tableList["inventoryfolders"] = null; |
95 | tableList["inventoryitems"] = null; | 94 | tableList["inventoryitems"] = null; |
96 | 95 | ||
97 | database.GetTableVersion(tableList); | 96 | database.GetTableVersion(tableList); |
98 | 97 | ||
99 | UpgradeFoldersTable(tableList["inventoryfolders"]); | 98 | UpgradeFoldersTable(tableList["inventoryfolders"]); |
100 | UpgradeItemsTable(tableList["inventoryitems"]); | 99 | UpgradeItemsTable(tableList["inventoryitems"]); |
101 | } | 100 | } |
101 | |||
102 | #endregion | 102 | #endregion |
103 | 103 | ||
104 | /// <summary> | 104 | /// <summary> |
@@ -124,7 +124,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
124 | /// <returns>A string containing the DB provider</returns> | 124 | /// <returns>A string containing the DB provider</returns> |
125 | public string getVersion() | 125 | public string getVersion() |
126 | { | 126 | { |
127 | return database.getVersion(); | 127 | return database.getVersion(); |
128 | } | 128 | } |
129 | 129 | ||
130 | /// <summary> | 130 | /// <summary> |
@@ -143,15 +143,16 @@ namespace OpenSim.Framework.Data.MSSQL | |||
143 | Dictionary<string, string> param = new Dictionary<string, string>(); | 143 | Dictionary<string, string> param = new Dictionary<string, string>(); |
144 | param["parentFolderID"] = folderID.ToString(); | 144 | param["parentFolderID"] = folderID.ToString(); |
145 | 145 | ||
146 | IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param); | 146 | IDbCommand result = |
147 | database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param); | ||
147 | IDataReader reader = result.ExecuteReader(); | 148 | IDataReader reader = result.ExecuteReader(); |
148 | 149 | ||
149 | while(reader.Read()) | 150 | while (reader.Read()) |
150 | items.Add(readInventoryItem(reader)); | 151 | items.Add(readInventoryItem(reader)); |
151 | 152 | ||
152 | reader.Close(); | 153 | reader.Close(); |
153 | result.Dispose(); | 154 | result.Dispose(); |
154 | 155 | ||
155 | return items; | 156 | return items; |
156 | } | 157 | } |
157 | } | 158 | } |
@@ -174,16 +175,17 @@ namespace OpenSim.Framework.Data.MSSQL | |||
174 | { | 175 | { |
175 | lock (database) | 176 | lock (database) |
176 | { | 177 | { |
177 | |||
178 | Dictionary<string, string> param = new Dictionary<string, string>(); | 178 | Dictionary<string, string> param = new Dictionary<string, string>(); |
179 | param["uuid"] = user.ToString(); | 179 | param["uuid"] = user.ToString(); |
180 | param["zero"] = LLUUID.Zero.ToString(); | 180 | param["zero"] = LLUUID.Zero.ToString(); |
181 | 181 | ||
182 | IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); | 182 | IDbCommand result = |
183 | database.Query( | ||
184 | "SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); | ||
183 | IDataReader reader = result.ExecuteReader(); | 185 | IDataReader reader = result.ExecuteReader(); |
184 | 186 | ||
185 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); | 187 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); |
186 | while(reader.Read()) | 188 | while (reader.Read()) |
187 | items.Add(readInventoryFolder(reader)); | 189 | items.Add(readInventoryFolder(reader)); |
188 | 190 | ||
189 | 191 | ||
@@ -212,24 +214,27 @@ namespace OpenSim.Framework.Data.MSSQL | |||
212 | param["uuid"] = user.ToString(); | 214 | param["uuid"] = user.ToString(); |
213 | param["zero"] = LLUUID.Zero.ToString(); | 215 | param["zero"] = LLUUID.Zero.ToString(); |
214 | 216 | ||
215 | IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); | 217 | IDbCommand result = |
218 | database.Query( | ||
219 | "SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); | ||
216 | IDataReader reader = result.ExecuteReader(); | 220 | IDataReader reader = result.ExecuteReader(); |
217 | 221 | ||
218 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); | 222 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); |
219 | while(reader.Read()) | 223 | while (reader.Read()) |
220 | items.Add(readInventoryFolder(reader)); | 224 | items.Add(readInventoryFolder(reader)); |
221 | 225 | ||
222 | InventoryFolderBase rootFolder = null; | 226 | InventoryFolderBase rootFolder = null; |
223 | 227 | ||
224 | // There should only ever be one root folder for a user. However, if there's more | 228 | // There should only ever be one root folder for a user. However, if there's more |
225 | // than one we'll simply use the first one rather than failing. It would be even | 229 | // than one we'll simply use the first one rather than failing. It would be even |
226 | // nicer to print some message to this effect, but this feels like it's too low a | 230 | // nicer to print some message to this effect, but this feels like it's too low a |
227 | // to put such a message out, and it's too minor right now to spare the time to | 231 | // to put such a message out, and it's too minor right now to spare the time to |
228 | // suitably refactor. | 232 | // suitably refactor. |
229 | if (items.Count > 0) { | 233 | if (items.Count > 0) |
234 | { | ||
230 | rootFolder = items[0]; | 235 | rootFolder = items[0]; |
231 | } | 236 | } |
232 | 237 | ||
233 | reader.Close(); | 238 | reader.Close(); |
234 | result.Dispose(); | 239 | result.Dispose(); |
235 | 240 | ||
@@ -259,12 +264,13 @@ namespace OpenSim.Framework.Data.MSSQL | |||
259 | param["parentFolderID"] = parentID.ToString(); | 264 | param["parentFolderID"] = parentID.ToString(); |
260 | 265 | ||
261 | 266 | ||
262 | IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param); | 267 | IDbCommand result = |
268 | database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param); | ||
263 | IDataReader reader = result.ExecuteReader(); | 269 | IDataReader reader = result.ExecuteReader(); |
264 | 270 | ||
265 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); | 271 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); |
266 | 272 | ||
267 | while(reader.Read()) | 273 | while (reader.Read()) |
268 | items.Add(readInventoryFolder(reader)); | 274 | items.Add(readInventoryFolder(reader)); |
269 | 275 | ||
270 | reader.Close(); | 276 | reader.Close(); |
@@ -292,17 +298,17 @@ namespace OpenSim.Framework.Data.MSSQL | |||
292 | { | 298 | { |
293 | InventoryItemBase item = new InventoryItemBase(); | 299 | InventoryItemBase item = new InventoryItemBase(); |
294 | 300 | ||
295 | item.inventoryID = new LLUUID((string)reader["inventoryID"]); | 301 | item.inventoryID = new LLUUID((string) reader["inventoryID"]); |
296 | item.assetID = new LLUUID((string)reader["assetID"]); | 302 | item.assetID = new LLUUID((string) reader["assetID"]); |
297 | item.assetType = (int)reader["assetType"]; | 303 | item.assetType = (int) reader["assetType"]; |
298 | item.parentFolderID = new LLUUID((string)reader["parentFolderID"]); | 304 | item.parentFolderID = new LLUUID((string) reader["parentFolderID"]); |
299 | item.avatarID = new LLUUID((string)reader["avatarID"]); | 305 | item.avatarID = new LLUUID((string) reader["avatarID"]); |
300 | item.inventoryName = (string)reader["inventoryName"]; | 306 | item.inventoryName = (string) reader["inventoryName"]; |
301 | item.inventoryDescription = (string)reader["inventoryDescription"]; | 307 | item.inventoryDescription = (string) reader["inventoryDescription"]; |
302 | item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]); | 308 | item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]); |
303 | item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]); | 309 | item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]); |
304 | item.invType = (int)reader["invType"]; | 310 | item.invType = (int) reader["invType"]; |
305 | item.creatorsID = new LLUUID((string)reader["creatorID"]); | 311 | item.creatorsID = new LLUUID((string) reader["creatorID"]); |
306 | item.inventoryBasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); | 312 | item.inventoryBasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); |
307 | item.inventoryEveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); | 313 | item.inventoryEveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); |
308 | return item; | 314 | return item; |
@@ -322,7 +328,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
322 | /// <returns>An inventory item</returns> | 328 | /// <returns>An inventory item</returns> |
323 | public InventoryItemBase getInventoryItem(LLUUID itemID) | 329 | public InventoryItemBase getInventoryItem(LLUUID itemID) |
324 | { | 330 | { |
325 | |||
326 | try | 331 | try |
327 | { | 332 | { |
328 | lock (database) | 333 | lock (database) |
@@ -330,11 +335,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
330 | Dictionary<string, string> param = new Dictionary<string, string>(); | 335 | Dictionary<string, string> param = new Dictionary<string, string>(); |
331 | param["inventoryID"] = itemID.ToString(); | 336 | param["inventoryID"] = itemID.ToString(); |
332 | 337 | ||
333 | IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param); | 338 | IDbCommand result = |
339 | database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param); | ||
334 | IDataReader reader = result.ExecuteReader(); | 340 | IDataReader reader = result.ExecuteReader(); |
335 | 341 | ||
336 | InventoryItemBase item = null; | 342 | InventoryItemBase item = null; |
337 | if(reader.Read()) | 343 | if (reader.Read()) |
338 | item = readInventoryItem(reader); | 344 | item = readInventoryItem(reader); |
339 | 345 | ||
340 | reader.Close(); | 346 | reader.Close(); |
@@ -361,12 +367,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
361 | try | 367 | try |
362 | { | 368 | { |
363 | InventoryFolderBase folder = new InventoryFolderBase(); | 369 | InventoryFolderBase folder = new InventoryFolderBase(); |
364 | folder.agentID = new LLUUID((string)reader["agentID"]); | 370 | folder.agentID = new LLUUID((string) reader["agentID"]); |
365 | folder.parentID = new LLUUID((string)reader["parentFolderID"]); | 371 | folder.parentID = new LLUUID((string) reader["parentFolderID"]); |
366 | folder.folderID = new LLUUID((string)reader["folderID"]); | 372 | folder.folderID = new LLUUID((string) reader["folderID"]); |
367 | folder.name = (string)reader["folderName"]; | 373 | folder.name = (string) reader["folderName"]; |
368 | folder.type = (short)reader["type"]; | 374 | folder.type = (short) reader["type"]; |
369 | folder.version = (ushort)((int)reader["version"]); | 375 | folder.version = (ushort) ((int) reader["version"]); |
370 | return folder; | 376 | return folder; |
371 | } | 377 | } |
372 | catch (Exception e) | 378 | catch (Exception e) |
@@ -389,7 +395,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
389 | { | 395 | { |
390 | lock (database) | 396 | lock (database) |
391 | { | 397 | { |
392 | Dictionary<string, string> param = new Dictionary<string,string>(); | 398 | Dictionary<string, string> param = new Dictionary<string, string>(); |
393 | param["uuid"] = folderID.ToString(); | 399 | param["uuid"] = folderID.ToString(); |
394 | 400 | ||
395 | IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = @uuid", param); | 401 | IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = @uuid", param); |
@@ -418,8 +424,10 @@ namespace OpenSim.Framework.Data.MSSQL | |||
418 | public void addInventoryItem(InventoryItemBase item) | 424 | public void addInventoryItem(InventoryItemBase item) |
419 | { | 425 | { |
420 | string sql = "INSERT INTO inventoryitems"; | 426 | string sql = "INSERT INTO inventoryitems"; |
421 | sql += "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName], [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions], [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]) VALUES "; | 427 | sql += |
422 | sql += "(@inventoryID, @assetID, @assetType, @parentFolderID, @avatarID, @inventoryName, @inventoryDescription, @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID, @inventoryBasePermissions, @inventoryEveryOnePermissions);"; | 428 | "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName], [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions], [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]) VALUES "; |
429 | sql += | ||
430 | "(@inventoryID, @assetID, @assetType, @parentFolderID, @avatarID, @inventoryName, @inventoryDescription, @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID, @inventoryBasePermissions, @inventoryEveryOnePermissions);"; | ||
423 | 431 | ||
424 | try | 432 | try |
425 | { | 433 | { |
@@ -441,7 +449,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
441 | IDbCommand result = database.Query(sql, param); | 449 | IDbCommand result = database.Query(sql, param); |
442 | result.ExecuteNonQuery(); | 450 | result.ExecuteNonQuery(); |
443 | result.Dispose(); | 451 | result.Dispose(); |
444 | |||
445 | } | 452 | } |
446 | catch (SqlException e) | 453 | catch (SqlException e) |
447 | { | 454 | { |
@@ -454,21 +461,21 @@ namespace OpenSim.Framework.Data.MSSQL | |||
454 | /// </summary> | 461 | /// </summary> |
455 | /// <param name="item">Inventory item to update</param> | 462 | /// <param name="item">Inventory item to update</param> |
456 | public void updateInventoryItem(InventoryItemBase item) | 463 | public void updateInventoryItem(InventoryItemBase item) |
457 | { | 464 | { |
458 | SqlCommand command = new SqlCommand("UPDATE inventoryitems set inventoryID = @inventoryID, " + | 465 | SqlCommand command = new SqlCommand("UPDATE inventoryitems set inventoryID = @inventoryID, " + |
459 | "assetID = @assetID, " + | 466 | "assetID = @assetID, " + |
460 | "assetType = @assetType" + | 467 | "assetType = @assetType" + |
461 | "parentFolderID = @parentFolderID" + | 468 | "parentFolderID = @parentFolderID" + |
462 | "avatarID = @avatarID" + | 469 | "avatarID = @avatarID" + |
463 | "inventoryName = @inventoryName"+ | 470 | "inventoryName = @inventoryName" + |
464 | "inventoryDescription = @inventoryDescription" + | 471 | "inventoryDescription = @inventoryDescription" + |
465 | "inventoryNextPermissions = @inventoryNextPermissions" + | 472 | "inventoryNextPermissions = @inventoryNextPermissions" + |
466 | "inventoryCurrentPermissions = @inventoryCurrentPermissions" + | 473 | "inventoryCurrentPermissions = @inventoryCurrentPermissions" + |
467 | "invType = @invType" + | 474 | "invType = @invType" + |
468 | "creatorID = @creatorID" + | 475 | "creatorID = @creatorID" + |
469 | "inventoryBasePermissions = @inventoryBasePermissions" + | 476 | "inventoryBasePermissions = @inventoryBasePermissions" + |
470 | "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " + | 477 | "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " + |
471 | "invenoryID = @keyInventoryID;", database.getConnection()); | 478 | "invenoryID = @keyInventoryID;", database.getConnection()); |
472 | SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToString()); | 479 | SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToString()); |
473 | SqlParameter param2 = new SqlParameter("@assetID", item.assetID); | 480 | SqlParameter param2 = new SqlParameter("@assetID", item.assetID); |
474 | SqlParameter param3 = new SqlParameter("@assetType", item.assetType); | 481 | SqlParameter param3 = new SqlParameter("@assetType", item.assetType); |
@@ -481,7 +488,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
481 | SqlParameter param10 = new SqlParameter("@invType", item.invType); | 488 | SqlParameter param10 = new SqlParameter("@invType", item.invType); |
482 | SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID); | 489 | SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID); |
483 | SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions); | 490 | SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions); |
484 | SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); | 491 | SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); |
485 | SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToString()); | 492 | SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToString()); |
486 | command.Parameters.Add(param1); | 493 | command.Parameters.Add(param1); |
487 | command.Parameters.Add(param2); | 494 | command.Parameters.Add(param2); |
@@ -506,7 +513,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
506 | { | 513 | { |
507 | MainLog.Instance.Error(e.ToString()); | 514 | MainLog.Instance.Error(e.ToString()); |
508 | } | 515 | } |
509 | |||
510 | } | 516 | } |
511 | 517 | ||
512 | /// <summary> | 518 | /// <summary> |
@@ -523,8 +529,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
523 | IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param); | 529 | IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param); |
524 | cmd.ExecuteNonQuery(); | 530 | cmd.ExecuteNonQuery(); |
525 | cmd.Dispose(); | 531 | cmd.Dispose(); |
526 | |||
527 | |||
528 | } | 532 | } |
529 | catch (SqlException e) | 533 | catch (SqlException e) |
530 | { | 534 | { |
@@ -539,7 +543,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
539 | /// <param name="folder">Folder to create</param> | 543 | /// <param name="folder">Folder to create</param> |
540 | public void addInventoryFolder(InventoryFolderBase folder) | 544 | public void addInventoryFolder(InventoryFolderBase folder) |
541 | { | 545 | { |
542 | string sql = "INSERT INTO inventoryfolders ([folderID], [agentID], [parentFolderID], [folderName], [type], [version]) VALUES "; | 546 | string sql = |
547 | "INSERT INTO inventoryfolders ([folderID], [agentID], [parentFolderID], [folderName], [type], [version]) VALUES "; | ||
543 | sql += "(@folderID, @agentID, @parentFolderID, @folderName, @type, @version);"; | 548 | sql += "(@folderID, @agentID, @parentFolderID, @folderName, @type, @version);"; |
544 | 549 | ||
545 | 550 | ||
@@ -550,9 +555,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
550 | param["folderName"] = folder.name; | 555 | param["folderName"] = folder.name; |
551 | param["type"] = Convert.ToString(folder.type); | 556 | param["type"] = Convert.ToString(folder.type); |
552 | param["version"] = Convert.ToString(folder.version); | 557 | param["version"] = Convert.ToString(folder.version); |
553 | 558 | ||
554 | try | 559 | try |
555 | { | 560 | { |
556 | IDbCommand result = database.Query(sql, param); | 561 | IDbCommand result = database.Query(sql, param); |
557 | result.ExecuteNonQuery(); | 562 | result.ExecuteNonQuery(); |
558 | result.Dispose(); | 563 | result.Dispose(); |
@@ -567,16 +572,15 @@ namespace OpenSim.Framework.Data.MSSQL | |||
567 | /// Updates an inventory folder | 572 | /// Updates an inventory folder |
568 | /// </summary> | 573 | /// </summary> |
569 | /// <param name="folder">Folder to update</param> | 574 | /// <param name="folder">Folder to update</param> |
570 | |||
571 | public void updateInventoryFolder(InventoryFolderBase folder) | 575 | public void updateInventoryFolder(InventoryFolderBase folder) |
572 | { | 576 | { |
573 | SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + | 577 | SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + |
574 | "agentID = @agentID, " + | 578 | "agentID = @agentID, " + |
575 | "parentFolderID = @parentFolderID," + | 579 | "parentFolderID = @parentFolderID," + |
576 | "folderName = @folderName," + | 580 | "folderName = @folderName," + |
577 | "type = @type," + | 581 | "type = @type," + |
578 | "version = @version where " + | 582 | "version = @version where " + |
579 | "folderID = @keyFolderID;", database.getConnection()); | 583 | "folderID = @keyFolderID;", database.getConnection()); |
580 | SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); | 584 | SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); |
581 | SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToString()); | 585 | SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToString()); |
582 | SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); | 586 | SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); |
@@ -600,20 +604,17 @@ namespace OpenSim.Framework.Data.MSSQL | |||
600 | { | 604 | { |
601 | MainLog.Instance.Error(e.ToString()); | 605 | MainLog.Instance.Error(e.ToString()); |
602 | } | 606 | } |
603 | |||
604 | |||
605 | } | 607 | } |
606 | 608 | ||
607 | /// <summary> | 609 | /// <summary> |
608 | /// Updates an inventory folder | 610 | /// Updates an inventory folder |
609 | /// </summary> | 611 | /// </summary> |
610 | /// <param name="folder">Folder to update</param> | 612 | /// <param name="folder">Folder to update</param> |
611 | |||
612 | public void moveInventoryFolder(InventoryFolderBase folder) | 613 | public void moveInventoryFolder(InventoryFolderBase folder) |
613 | { | 614 | { |
614 | SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + | 615 | SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + |
615 | "parentFolderID = @parentFolderID," + | 616 | "parentFolderID = @parentFolderID," + |
616 | "folderID = @keyFolderID;", database.getConnection()); | 617 | "folderID = @keyFolderID;", database.getConnection()); |
617 | SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); | 618 | SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); |
618 | SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); | 619 | SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); |
619 | SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToString()); | 620 | SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToString()); |
@@ -629,8 +630,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
629 | { | 630 | { |
630 | MainLog.Instance.Error(e.ToString()); | 631 | MainLog.Instance.Error(e.ToString()); |
631 | } | 632 | } |
632 | |||
633 | |||
634 | } | 633 | } |
635 | 634 | ||
636 | /// <summary> | 635 | /// <summary> |
@@ -645,7 +644,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
645 | foreach (InventoryFolderBase f in subfolderList) | 644 | foreach (InventoryFolderBase f in subfolderList) |
646 | folders.Add(f); | 645 | folders.Add(f); |
647 | } | 646 | } |
648 | 647 | ||
649 | /// <summary> | 648 | /// <summary> |
650 | /// Returns all child folders in the hierarchy from the parent folder and down | 649 | /// Returns all child folders in the hierarchy from the parent folder and down |
651 | /// </summary> | 650 | /// </summary> |
@@ -672,7 +671,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
672 | IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param); | 671 | IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param); |
673 | cmd.ExecuteNonQuery(); | 672 | cmd.ExecuteNonQuery(); |
674 | cmd.Dispose(); | 673 | cmd.Dispose(); |
675 | |||
676 | } | 674 | } |
677 | catch (SqlException e) | 675 | catch (SqlException e) |
678 | { | 676 | { |
@@ -689,7 +687,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
689 | param["parentFolderID"] = folderID.ToString(); | 687 | param["parentFolderID"] = folderID.ToString(); |
690 | 688 | ||
691 | 689 | ||
692 | IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param); | 690 | IDbCommand cmd = |
691 | database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param); | ||
693 | cmd.ExecuteNonQuery(); | 692 | cmd.ExecuteNonQuery(); |
694 | cmd.Dispose(); | 693 | cmd.Dispose(); |
695 | } | 694 | } |
@@ -724,4 +723,4 @@ namespace OpenSim.Framework.Data.MSSQL | |||
724 | } | 723 | } |
725 | } | 724 | } |
726 | } | 725 | } |
727 | } | 726 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLLogData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLLogData.cs index a5b33ec..c3ec7c6 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLLogData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLLogData.cs | |||
@@ -25,14 +25,12 @@ | |||
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 | */ |
28 | using System; | ||
29 | |||
30 | namespace OpenSim.Framework.Data.MSSQL | 28 | namespace OpenSim.Framework.Data.MSSQL |
31 | { | 29 | { |
32 | /// <summary> | 30 | /// <summary> |
33 | /// An interface to the log database for MySQL | 31 | /// An interface to the log database for MySQL |
34 | /// </summary> | 32 | /// </summary> |
35 | class MSSQLLogData : ILogData | 33 | internal class MSSQLLogData : ILogData |
36 | { | 34 | { |
37 | /// <summary> | 35 | /// <summary> |
38 | /// The database manager | 36 | /// The database manager |
@@ -51,7 +49,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
51 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); | 49 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); |
52 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | 50 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); |
53 | 51 | ||
54 | database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword); | 52 | database = |
53 | new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, | ||
54 | settingPassword); | ||
55 | } | 55 | } |
56 | 56 | ||
57 | /// <summary> | 57 | /// <summary> |
@@ -63,7 +63,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
63 | /// <param name="arguments">The arguments passed to the method</param> | 63 | /// <param name="arguments">The arguments passed to the method</param> |
64 | /// <param name="priority">How critical is this?</param> | 64 | /// <param name="priority">How critical is this?</param> |
65 | /// <param name="logMessage">The message to log</param> | 65 | /// <param name="logMessage">The message to log</param> |
66 | public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) | 66 | public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, |
67 | string logMessage) | ||
67 | { | 68 | { |
68 | try | 69 | try |
69 | { | 70 | { |
@@ -101,4 +102,4 @@ namespace OpenSim.Framework.Data.MSSQL | |||
101 | return "0.1"; | 102 | return "0.1"; |
102 | } | 103 | } |
103 | } | 104 | } |
104 | } | 105 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs index b009a56..0dc3338 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs | |||
@@ -25,6 +25,7 @@ | |||
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 | */ |
28 | |||
28 | using System; | 29 | using System; |
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Data; | 31 | using System.Data; |
@@ -32,7 +33,6 @@ using System.Data.SqlClient; | |||
32 | using System.IO; | 33 | using System.IO; |
33 | using System.Reflection; | 34 | using System.Reflection; |
34 | using libsecondlife; | 35 | using libsecondlife; |
35 | |||
36 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
37 | 37 | ||
38 | namespace OpenSim.Framework.Data.MSSQL | 38 | namespace OpenSim.Framework.Data.MSSQL |
@@ -40,12 +40,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
40 | /// <summary> | 40 | /// <summary> |
41 | /// A management class for the MS SQL Storage Engine | 41 | /// A management class for the MS SQL Storage Engine |
42 | /// </summary> | 42 | /// </summary> |
43 | class MSSQLManager | 43 | internal class MSSQLManager |
44 | { | 44 | { |
45 | /// <summary> | 45 | /// <summary> |
46 | /// The database connection object | 46 | /// The database connection object |
47 | /// </summary> | 47 | /// </summary> |
48 | IDbConnection dbcon; | 48 | private IDbConnection dbcon; |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// Connection string for ADO.net | 51 | /// Connection string for ADO.net |
@@ -60,12 +60,14 @@ namespace OpenSim.Framework.Data.MSSQL | |||
60 | /// <param name="username">The username logging into the database</param> | 60 | /// <param name="username">The username logging into the database</param> |
61 | /// <param name="password">The password for the user logging in</param> | 61 | /// <param name="password">The password for the user logging in</param> |
62 | /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param> | 62 | /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param> |
63 | public MSSQLManager(string dataSource, string initialCatalog, string persistSecurityInfo, string userId, string password) | 63 | public MSSQLManager(string dataSource, string initialCatalog, string persistSecurityInfo, string userId, |
64 | string password) | ||
64 | { | 65 | { |
65 | try | 66 | try |
66 | { | 67 | { |
67 | 68 | connectionString = "Data Source=" + dataSource + ";Initial Catalog=" + initialCatalog + | |
68 | connectionString = "Data Source=" + dataSource + ";Initial Catalog=" + initialCatalog + ";Persist Security Info=" + persistSecurityInfo + ";User ID=" + userId + ";Password=" + password+";"; | 69 | ";Persist Security Info=" + persistSecurityInfo + ";User ID=" + userId + ";Password=" + |
70 | password + ";"; | ||
69 | dbcon = new SqlConnection(connectionString); | 71 | dbcon = new SqlConnection(connectionString); |
70 | TestTables(dbcon); | 72 | TestTables(dbcon); |
71 | dbcon.Open(); | 73 | dbcon.Open(); |
@@ -78,7 +80,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
78 | 80 | ||
79 | private bool TestTables(IDbConnection conn) | 81 | private bool TestTables(IDbConnection conn) |
80 | { | 82 | { |
81 | IDbCommand cmd = this.Query("SELECT * FROM regions", new Dictionary<string, string>()); | 83 | IDbCommand cmd = Query("SELECT * FROM regions", new Dictionary<string, string>()); |
82 | //SqlCommand cmd = (SqlCommand)dbcon.CreateCommand(); | 84 | //SqlCommand cmd = (SqlCommand)dbcon.CreateCommand(); |
83 | //cmd.CommandText = "SELECT * FROM regions"; | 85 | //cmd.CommandText = "SELECT * FROM regions"; |
84 | try | 86 | try |
@@ -90,7 +92,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
90 | } | 92 | } |
91 | catch (Exception) | 93 | catch (Exception) |
92 | { | 94 | { |
93 | MainLog.Instance.Verbose("DATASTORE", "MSSQL Database doesn't exist... creating"); | 95 | MainLog.Instance.Verbose("DATASTORE", "MSSQL Database doesn't exist... creating"); |
94 | InitDB(conn); | 96 | InitDB(conn); |
95 | } | 97 | } |
96 | return true; | 98 | return true; |
@@ -100,66 +102,66 @@ namespace OpenSim.Framework.Data.MSSQL | |||
100 | { | 102 | { |
101 | string createRegions = defineTable(createRegionsTable()); | 103 | string createRegions = defineTable(createRegionsTable()); |
102 | Dictionary<string, string> param = new Dictionary<string, string>(); | 104 | Dictionary<string, string> param = new Dictionary<string, string>(); |
103 | IDbCommand pcmd = this.Query(createRegions, param); | 105 | IDbCommand pcmd = Query(createRegions, param); |
104 | if (conn.State == ConnectionState.Closed) { | 106 | if (conn.State == ConnectionState.Closed) |
107 | { | ||
105 | conn.Open(); | 108 | conn.Open(); |
106 | } | 109 | } |
107 | pcmd.ExecuteNonQuery(); | 110 | pcmd.ExecuteNonQuery(); |
108 | pcmd.Dispose(); | 111 | pcmd.Dispose(); |
109 | 112 | ||
110 | this.ExecuteResourceSql("Mssql-users.sql"); | 113 | ExecuteResourceSql("Mssql-users.sql"); |
111 | this.ExecuteResourceSql("Mssql-agents.sql"); | 114 | ExecuteResourceSql("Mssql-agents.sql"); |
112 | this.ExecuteResourceSql("Mssql-logs.sql"); | 115 | ExecuteResourceSql("Mssql-logs.sql"); |
113 | 116 | ||
114 | conn.Close(); | 117 | conn.Close(); |
115 | |||
116 | } | 118 | } |
117 | 119 | ||
118 | private DataTable createRegionsTable() | 120 | private DataTable createRegionsTable() |
119 | { | 121 | { |
120 | DataTable regions = new DataTable("regions"); | 122 | DataTable regions = new DataTable("regions"); |
121 | 123 | ||
122 | createCol(regions, "regionHandle", typeof(ulong)); | 124 | createCol(regions, "regionHandle", typeof (ulong)); |
123 | createCol(regions, "regionName", typeof(System.String)); | 125 | createCol(regions, "regionName", typeof (String)); |
124 | createCol(regions, "uuid", typeof(System.String)); | 126 | createCol(regions, "uuid", typeof (String)); |
125 | 127 | ||
126 | createCol(regions, "regionRecvKey", typeof(System.String)); | 128 | createCol(regions, "regionRecvKey", typeof (String)); |
127 | createCol(regions, "regionSecret", typeof(System.String)); | 129 | createCol(regions, "regionSecret", typeof (String)); |
128 | createCol(regions, "regionSendKey", typeof(System.String)); | 130 | createCol(regions, "regionSendKey", typeof (String)); |
129 | 131 | ||
130 | createCol(regions, "regionDataURI", typeof(System.String)); | 132 | createCol(regions, "regionDataURI", typeof (String)); |
131 | createCol(regions, "serverIP", typeof(System.String)); | 133 | createCol(regions, "serverIP", typeof (String)); |
132 | createCol(regions, "serverPort", typeof(System.String)); | 134 | createCol(regions, "serverPort", typeof (String)); |
133 | createCol(regions, "serverURI", typeof(System.String)); | 135 | createCol(regions, "serverURI", typeof (String)); |
134 | 136 | ||
135 | 137 | ||
136 | createCol(regions, "locX", typeof(uint)); | 138 | createCol(regions, "locX", typeof (uint)); |
137 | createCol(regions, "locY", typeof(uint)); | 139 | createCol(regions, "locY", typeof (uint)); |
138 | createCol(regions, "locZ", typeof(uint)); | 140 | createCol(regions, "locZ", typeof (uint)); |
139 | 141 | ||
140 | createCol(regions, "eastOverrideHandle", typeof(ulong)); | 142 | createCol(regions, "eastOverrideHandle", typeof (ulong)); |
141 | createCol(regions, "westOverrideHandle", typeof(ulong)); | 143 | createCol(regions, "westOverrideHandle", typeof (ulong)); |
142 | createCol(regions, "southOverrideHandle", typeof(ulong)); | 144 | createCol(regions, "southOverrideHandle", typeof (ulong)); |
143 | createCol(regions, "northOverrideHandle", typeof(ulong)); | 145 | createCol(regions, "northOverrideHandle", typeof (ulong)); |
144 | 146 | ||
145 | createCol(regions, "regionAssetURI", typeof(System.String)); | 147 | createCol(regions, "regionAssetURI", typeof (String)); |
146 | createCol(regions, "regionAssetRecvKey", typeof(System.String)); | 148 | createCol(regions, "regionAssetRecvKey", typeof (String)); |
147 | createCol(regions, "regionAssetSendKey", typeof(System.String)); | 149 | createCol(regions, "regionAssetSendKey", typeof (String)); |
148 | 150 | ||
149 | createCol(regions, "regionUserURI", typeof(System.String)); | 151 | createCol(regions, "regionUserURI", typeof (String)); |
150 | createCol(regions, "regionUserRecvKey", typeof(System.String)); | 152 | createCol(regions, "regionUserRecvKey", typeof (String)); |
151 | createCol(regions, "regionUserSendKey", typeof(System.String)); | 153 | createCol(regions, "regionUserSendKey", typeof (String)); |
152 | 154 | ||
153 | createCol(regions, "regionMapTexture", typeof(System.String)); | 155 | createCol(regions, "regionMapTexture", typeof (String)); |
154 | createCol(regions, "serverHttpPort", typeof(System.String)); | 156 | createCol(regions, "serverHttpPort", typeof (String)); |
155 | createCol(regions, "serverRemotingPort", typeof(uint)); | 157 | createCol(regions, "serverRemotingPort", typeof (uint)); |
156 | 158 | ||
157 | // Add in contraints | 159 | // Add in contraints |
158 | regions.PrimaryKey = new DataColumn[] { regions.Columns["UUID"] }; | 160 | regions.PrimaryKey = new DataColumn[] {regions.Columns["UUID"]}; |
159 | return regions; | 161 | return regions; |
160 | } | 162 | } |
161 | 163 | ||
162 | protected static void createCol(DataTable dt, string name, System.Type type) | 164 | protected static void createCol(DataTable dt, string name, Type type) |
163 | { | 165 | { |
164 | DataColumn col = new DataColumn(name, type); | 166 | DataColumn col = new DataColumn(name, type); |
165 | dt.Columns.Add(col); | 167 | dt.Columns.Add(col); |
@@ -172,10 +174,11 @@ namespace OpenSim.Framework.Data.MSSQL | |||
172 | foreach (DataColumn col in dt.Columns) | 174 | foreach (DataColumn col in dt.Columns) |
173 | { | 175 | { |
174 | if (subsql.Length > 0) | 176 | if (subsql.Length > 0) |
175 | { // a map function would rock so much here | 177 | { |
178 | // a map function would rock so much here | ||
176 | subsql += ",\n"; | 179 | subsql += ",\n"; |
177 | } | 180 | } |
178 | 181 | ||
179 | subsql += col.ColumnName + " " + SqlType(col.DataType); | 182 | subsql += col.ColumnName + " " + SqlType(col.DataType); |
180 | if (col == dt.PrimaryKey[0]) | 183 | if (col == dt.PrimaryKey[0]) |
181 | { | 184 | { |
@@ -192,19 +195,19 @@ namespace OpenSim.Framework.Data.MSSQL | |||
192 | // slightly differently. | 195 | // slightly differently. |
193 | private static string SqlType(Type type) | 196 | private static string SqlType(Type type) |
194 | { | 197 | { |
195 | if (type == typeof(System.String)) | 198 | if (type == typeof (String)) |
196 | { | 199 | { |
197 | return "varchar(255)"; | 200 | return "varchar(255)"; |
198 | } | 201 | } |
199 | else if (type == typeof(System.Int32)) | 202 | else if (type == typeof (Int32)) |
200 | { | 203 | { |
201 | return "integer"; | 204 | return "integer"; |
202 | } | 205 | } |
203 | else if (type == typeof(System.Double)) | 206 | else if (type == typeof (Double)) |
204 | { | 207 | { |
205 | return "float"; | 208 | return "float"; |
206 | } | 209 | } |
207 | else if (type == typeof(System.Byte[])) | 210 | else if (type == typeof (Byte[])) |
208 | { | 211 | { |
209 | return "image"; | 212 | return "image"; |
210 | } | 213 | } |
@@ -254,14 +257,14 @@ namespace OpenSim.Framework.Data.MSSQL | |||
254 | /// <returns>A Sql DB Command</returns> | 257 | /// <returns>A Sql DB Command</returns> |
255 | public IDbCommand Query(string sql, Dictionary<string, string> parameters) | 258 | public IDbCommand Query(string sql, Dictionary<string, string> parameters) |
256 | { | 259 | { |
257 | SqlCommand dbcommand = (SqlCommand)dbcon.CreateCommand(); | 260 | SqlCommand dbcommand = (SqlCommand) dbcon.CreateCommand(); |
258 | dbcommand.CommandText = sql; | 261 | dbcommand.CommandText = sql; |
259 | foreach (KeyValuePair<string, string> param in parameters) | 262 | foreach (KeyValuePair<string, string> param in parameters) |
260 | { | 263 | { |
261 | dbcommand.Parameters.AddWithValue(param.Key, param.Value); | 264 | dbcommand.Parameters.AddWithValue(param.Key, param.Value); |
262 | } | 265 | } |
263 | 266 | ||
264 | return (IDbCommand)dbcommand; | 267 | return (IDbCommand) dbcommand; |
265 | } | 268 | } |
266 | 269 | ||
267 | /// <summary> | 270 | /// <summary> |
@@ -277,20 +280,20 @@ namespace OpenSim.Framework.Data.MSSQL | |||
277 | { | 280 | { |
278 | // Region Main | 281 | // Region Main |
279 | regionprofile.regionHandle = Convert.ToUInt64(reader["regionHandle"]); | 282 | regionprofile.regionHandle = Convert.ToUInt64(reader["regionHandle"]); |
280 | regionprofile.regionName = (string)reader["regionName"]; | 283 | regionprofile.regionName = (string) reader["regionName"]; |
281 | regionprofile.UUID = new LLUUID((string)reader["uuid"]); | 284 | regionprofile.UUID = new LLUUID((string) reader["uuid"]); |
282 | 285 | ||
283 | // Secrets | 286 | // Secrets |
284 | regionprofile.regionRecvKey = (string)reader["regionRecvKey"]; | 287 | regionprofile.regionRecvKey = (string) reader["regionRecvKey"]; |
285 | regionprofile.regionSecret = (string)reader["regionSecret"]; | 288 | regionprofile.regionSecret = (string) reader["regionSecret"]; |
286 | regionprofile.regionSendKey = (string)reader["regionSendKey"]; | 289 | regionprofile.regionSendKey = (string) reader["regionSendKey"]; |
287 | 290 | ||
288 | // Region Server | 291 | // Region Server |
289 | regionprofile.regionDataURI = (string)reader["regionDataURI"]; | 292 | regionprofile.regionDataURI = (string) reader["regionDataURI"]; |
290 | regionprofile.regionOnline = false; // Needs to be pinged before this can be set. | 293 | regionprofile.regionOnline = false; // Needs to be pinged before this can be set. |
291 | regionprofile.serverIP = (string)reader["serverIP"]; | 294 | regionprofile.serverIP = (string) reader["serverIP"]; |
292 | regionprofile.serverPort = Convert.ToUInt32(reader["serverPort"]); | 295 | regionprofile.serverPort = Convert.ToUInt32(reader["serverPort"]); |
293 | regionprofile.serverURI = (string)reader["serverURI"]; | 296 | regionprofile.serverURI = (string) reader["serverURI"]; |
294 | regionprofile.httpPort = Convert.ToUInt32(reader["serverHttpPort"]); | 297 | regionprofile.httpPort = Convert.ToUInt32(reader["serverHttpPort"]); |
295 | regionprofile.remotingPort = Convert.ToUInt32(reader["serverRemotingPort"]); | 298 | regionprofile.remotingPort = Convert.ToUInt32(reader["serverRemotingPort"]); |
296 | 299 | ||
@@ -307,14 +310,14 @@ namespace OpenSim.Framework.Data.MSSQL | |||
307 | regionprofile.regionNorthOverrideHandle = Convert.ToUInt64(reader["northOverrideHandle"]); | 310 | regionprofile.regionNorthOverrideHandle = Convert.ToUInt64(reader["northOverrideHandle"]); |
308 | 311 | ||
309 | // Assets | 312 | // Assets |
310 | regionprofile.regionAssetURI = (string)reader["regionAssetURI"]; | 313 | regionprofile.regionAssetURI = (string) reader["regionAssetURI"]; |
311 | regionprofile.regionAssetRecvKey = (string)reader["regionAssetRecvKey"]; | 314 | regionprofile.regionAssetRecvKey = (string) reader["regionAssetRecvKey"]; |
312 | regionprofile.regionAssetSendKey = (string)reader["regionAssetSendKey"]; | 315 | regionprofile.regionAssetSendKey = (string) reader["regionAssetSendKey"]; |
313 | 316 | ||
314 | // Userserver | 317 | // Userserver |
315 | regionprofile.regionUserURI = (string)reader["regionUserURI"]; | 318 | regionprofile.regionUserURI = (string) reader["regionUserURI"]; |
316 | regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; | 319 | regionprofile.regionUserRecvKey = (string) reader["regionUserRecvKey"]; |
317 | regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; | 320 | regionprofile.regionUserSendKey = (string) reader["regionUserSendKey"]; |
318 | 321 | ||
319 | // World Map Addition | 322 | // World Map Addition |
320 | string tempRegionMap = reader["regionMapTexture"].ToString(); | 323 | string tempRegionMap = reader["regionMapTexture"].ToString(); |
@@ -331,7 +334,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
331 | { | 334 | { |
332 | reader.Close(); | 335 | reader.Close(); |
333 | throw new Exception("No rows to return"); | 336 | throw new Exception("No rows to return"); |
334 | |||
335 | } | 337 | } |
336 | return regionprofile; | 338 | return regionprofile; |
337 | } | 339 | } |
@@ -347,12 +349,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
347 | 349 | ||
348 | if (reader.Read()) | 350 | if (reader.Read()) |
349 | { | 351 | { |
350 | retval.UUID = new LLUUID((string)reader["UUID"]); | 352 | retval.UUID = new LLUUID((string) reader["UUID"]); |
351 | retval.username = (string)reader["username"]; | 353 | retval.username = (string) reader["username"]; |
352 | retval.surname = (string)reader["lastname"]; | 354 | retval.surname = (string) reader["lastname"]; |
353 | 355 | ||
354 | retval.passwordHash = (string)reader["passwordHash"]; | 356 | retval.passwordHash = (string) reader["passwordHash"]; |
355 | retval.passwordSalt = (string)reader["passwordSalt"]; | 357 | retval.passwordSalt = (string) reader["passwordSalt"]; |
356 | 358 | ||
357 | retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); | 359 | retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); |
358 | retval.homeLocation = new LLVector3( | 360 | retval.homeLocation = new LLVector3( |
@@ -367,18 +369,17 @@ namespace OpenSim.Framework.Data.MSSQL | |||
367 | retval.created = Convert.ToInt32(reader["created"].ToString()); | 369 | retval.created = Convert.ToInt32(reader["created"].ToString()); |
368 | retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); | 370 | retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); |
369 | 371 | ||
370 | retval.userInventoryURI = (string)reader["userInventoryURI"]; | 372 | retval.userInventoryURI = (string) reader["userInventoryURI"]; |
371 | retval.userAssetURI = (string)reader["userAssetURI"]; | 373 | retval.userAssetURI = (string) reader["userAssetURI"]; |
372 | 374 | ||
373 | retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); | 375 | retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); |
374 | retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); | 376 | retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); |
375 | 377 | ||
376 | retval.profileAboutText = (string)reader["profileAboutText"]; | 378 | retval.profileAboutText = (string) reader["profileAboutText"]; |
377 | retval.profileFirstText = (string)reader["profileFirstText"]; | 379 | retval.profileFirstText = (string) reader["profileFirstText"]; |
378 | |||
379 | retval.profileImage = new LLUUID((string)reader["profileImage"]); | ||
380 | retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]); | ||
381 | 380 | ||
381 | retval.profileImage = new LLUUID((string) reader["profileImage"]); | ||
382 | retval.profileFirstImage = new LLUUID((string) reader["profileFirstImage"]); | ||
382 | } | 383 | } |
383 | else | 384 | else |
384 | { | 385 | { |
@@ -399,12 +400,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
399 | if (reader.Read()) | 400 | if (reader.Read()) |
400 | { | 401 | { |
401 | // Agent IDs | 402 | // Agent IDs |
402 | retval.UUID = new LLUUID((string)reader["UUID"]); | 403 | retval.UUID = new LLUUID((string) reader["UUID"]); |
403 | retval.sessionID = new LLUUID((string)reader["sessionID"]); | 404 | retval.sessionID = new LLUUID((string) reader["sessionID"]); |
404 | retval.secureSessionID = new LLUUID((string)reader["secureSessionID"]); | 405 | retval.secureSessionID = new LLUUID((string) reader["secureSessionID"]); |
405 | 406 | ||
406 | // Agent Who? | 407 | // Agent Who? |
407 | retval.agentIP = (string)reader["agentIP"]; | 408 | retval.agentIP = (string) reader["agentIP"]; |
408 | retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString()); | 409 | retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString()); |
409 | retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString()); | 410 | retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString()); |
410 | 411 | ||
@@ -413,9 +414,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
413 | retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); | 414 | retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); |
414 | 415 | ||
415 | // Current position | 416 | // Current position |
416 | retval.currentRegion = (string)reader["currentRegion"]; | 417 | retval.currentRegion = (string) reader["currentRegion"]; |
417 | retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString()); | 418 | retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString()); |
418 | LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); | 419 | LLVector3.TryParse((string) reader["currentPos"], out retval.currentPos); |
419 | } | 420 | } |
420 | else | 421 | else |
421 | { | 422 | { |
@@ -426,20 +427,19 @@ namespace OpenSim.Framework.Data.MSSQL | |||
426 | 427 | ||
427 | public AssetBase getAssetRow(IDataReader reader) | 428 | public AssetBase getAssetRow(IDataReader reader) |
428 | { | 429 | { |
429 | AssetBase asset = new AssetBase(); | 430 | AssetBase asset = new AssetBase(); |
430 | if (reader.Read()) | 431 | if (reader.Read()) |
431 | { | 432 | { |
432 | // Region Main | 433 | // Region Main |
433 | 434 | ||
434 | asset = new AssetBase(); | 435 | asset = new AssetBase(); |
435 | asset.Data = (byte[])reader["data"]; | 436 | asset.Data = (byte[]) reader["data"]; |
436 | asset.Description = (string)reader["description"]; | 437 | asset.Description = (string) reader["description"]; |
437 | asset.FullID = new LLUUID((string)reader["id"]); | 438 | asset.FullID = new LLUUID((string) reader["id"]); |
438 | asset.InvType = Convert.ToSByte(reader["invType"]); | 439 | asset.InvType = Convert.ToSByte(reader["invType"]); |
439 | asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false; | 440 | asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false; |
440 | asset.Name = (string)reader["name"]; | 441 | asset.Name = (string) reader["name"]; |
441 | asset.Type = Convert.ToSByte(reader["assetType"]); | 442 | asset.Type = Convert.ToSByte(reader["assetType"]); |
442 | |||
443 | } | 443 | } |
444 | else | 444 | else |
445 | { | 445 | { |
@@ -455,15 +455,19 @@ namespace OpenSim.Framework.Data.MSSQL | |||
455 | /// <returns>Successful?</returns> | 455 | /// <returns>Successful?</returns> |
456 | public bool insertRegionRow(RegionProfileData profile) | 456 | public bool insertRegionRow(RegionProfileData profile) |
457 | { | 457 | { |
458 | |||
459 | //Insert new region | 458 | //Insert new region |
460 | string sql = "INSERT INTO regions ([regionHandle], [regionName], [uuid], [regionRecvKey], [regionSecret], [regionSendKey], [regionDataURI], "; | 459 | string sql = |
461 | sql += "[serverIP], [serverPort], [serverURI], [locX], [locY], [locZ], [eastOverrideHandle], [westOverrideHandle], [southOverrideHandle], [northOverrideHandle], [regionAssetURI], [regionAssetRecvKey], "; | 460 | "INSERT INTO regions ([regionHandle], [regionName], [uuid], [regionRecvKey], [regionSecret], [regionSendKey], [regionDataURI], "; |
462 | sql += "[regionAssetSendKey], [regionUserURI], [regionUserRecvKey], [regionUserSendKey], [regionMapTexture], [serverHttpPort], [serverRemotingPort]) VALUES "; | 461 | sql += |
462 | "[serverIP], [serverPort], [serverURI], [locX], [locY], [locZ], [eastOverrideHandle], [westOverrideHandle], [southOverrideHandle], [northOverrideHandle], [regionAssetURI], [regionAssetRecvKey], "; | ||
463 | sql += | ||
464 | "[regionAssetSendKey], [regionUserURI], [regionUserRecvKey], [regionUserSendKey], [regionMapTexture], [serverHttpPort], [serverRemotingPort]) VALUES "; | ||
463 | 465 | ||
464 | sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, "; | 466 | sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, "; |
465 | sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, "; | 467 | sql += |
466 | sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey, @regionMapTexture, @serverHttpPort, @serverRemotingPort);"; | 468 | "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, "; |
469 | sql += | ||
470 | "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey, @regionMapTexture, @serverHttpPort, @serverRemotingPort);"; | ||
467 | 471 | ||
468 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | 472 | Dictionary<string, string> parameters = new Dictionary<string, string>(); |
469 | 473 | ||
@@ -498,9 +502,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
498 | bool returnval = false; | 502 | bool returnval = false; |
499 | 503 | ||
500 | try | 504 | try |
501 | { | 505 | { |
502 | IDbCommand result = Query(sql, parameters); | 506 | IDbCommand result = Query(sql, parameters); |
503 | 507 | ||
504 | if (result.ExecuteNonQuery() == 1) | 508 | if (result.ExecuteNonQuery() == 1) |
505 | returnval = true; | 509 | returnval = true; |
506 | 510 | ||
@@ -509,15 +513,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
509 | catch (Exception e) | 513 | catch (Exception e) |
510 | { | 514 | { |
511 | MainLog.Instance.Error("MSSQLManager : " + e.ToString()); | 515 | MainLog.Instance.Error("MSSQLManager : " + e.ToString()); |
512 | |||
513 | } | 516 | } |
514 | 517 | ||
515 | return returnval; | 518 | return returnval; |
516 | |||
517 | } | 519 | } |
518 | 520 | ||
519 | 521 | ||
520 | |||
521 | /// <summary> | 522 | /// <summary> |
522 | /// Inserts a new row into the log database | 523 | /// Inserts a new row into the log database |
523 | /// </summary> | 524 | /// </summary> |
@@ -528,7 +529,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
528 | /// <param name="priority">How critical is this?</param> | 529 | /// <param name="priority">How critical is this?</param> |
529 | /// <param name="logMessage">Extra message info</param> | 530 | /// <param name="logMessage">Extra message info</param> |
530 | /// <returns>Saved successfully?</returns> | 531 | /// <returns>Saved successfully?</returns> |
531 | public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) | 532 | public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, |
533 | string logMessage) | ||
532 | { | 534 | { |
533 | string sql = "INSERT INTO logs ([target], [server], [method], [arguments], [priority], [message]) VALUES "; | 535 | string sql = "INSERT INTO logs ([target], [server], [method], [arguments], [priority], [message]) VALUES "; |
534 | sql += "(@target, @server, @method, @arguments, @priority, @message);"; | 536 | sql += "(@target, @server, @method, @arguments, @priority, @message);"; |
@@ -588,19 +590,26 @@ namespace OpenSim.Framework.Data.MSSQL | |||
588 | /// <param name="profileImage">UUID for profile image</param> | 590 | /// <param name="profileImage">UUID for profile image</param> |
589 | /// <param name="firstImage">UUID for firstlife image</param> | 591 | /// <param name="firstImage">UUID for firstlife image</param> |
590 | /// <returns>Success?</returns> | 592 | /// <returns>Success?</returns> |
591 | public bool insertUserRow(libsecondlife.LLUUID uuid, string username, string lastname, string passwordHash, string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, | 593 | public bool insertUserRow(LLUUID uuid, string username, string lastname, string passwordHash, |
592 | float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText, | 594 | string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, |
593 | libsecondlife.LLUUID profileImage, libsecondlife.LLUUID firstImage) | 595 | float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, |
596 | string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, | ||
597 | string aboutText, string firstText, | ||
598 | LLUUID profileImage, LLUUID firstImage) | ||
594 | { | 599 | { |
595 | string sql = "INSERT INTO users "; | 600 | string sql = "INSERT INTO users "; |
596 | sql += "([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], "; | 601 | sql += "([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], "; |
597 | sql += "[homeLocationX], [homeLocationY], [homeLocationZ], [homeLookAtX], [homeLookAtY], [homeLookAtZ], [created], "; | 602 | sql += |
598 | sql += "[lastLogin], [userInventoryURI], [userAssetURI], [profileCanDoMask], [profileWantDoMask], [profileAboutText], "; | 603 | "[homeLocationX], [homeLocationY], [homeLocationZ], [homeLookAtX], [homeLookAtY], [homeLookAtZ], [created], "; |
604 | sql += | ||
605 | "[lastLogin], [userInventoryURI], [userAssetURI], [profileCanDoMask], [profileWantDoMask], [profileAboutText], "; | ||
599 | sql += "[profileFirstText], [profileImage], [profileFirstImage]) VALUES "; | 606 | sql += "[profileFirstText], [profileImage], [profileFirstImage]) VALUES "; |
600 | 607 | ||
601 | sql += "(@UUID, @username, @lastname, @passwordHash, @passwordSalt, @homeRegion, "; | 608 | sql += "(@UUID, @username, @lastname, @passwordHash, @passwordSalt, @homeRegion, "; |
602 | sql += "@homeLocationX, @homeLocationY, @homeLocationZ, @homeLookAtX, @homeLookAtY, @homeLookAtZ, @created, "; | 609 | sql += |
603 | sql += "@lastLogin, @userInventoryURI, @userAssetURI, @profileCanDoMask, @profileWantDoMask, @profileAboutText, "; | 610 | "@homeLocationX, @homeLocationY, @homeLocationZ, @homeLookAtX, @homeLookAtY, @homeLookAtZ, @created, "; |
611 | sql += | ||
612 | "@lastLogin, @userInventoryURI, @userAssetURI, @profileCanDoMask, @profileWantDoMask, @profileAboutText, "; | ||
604 | sql += "@profileFirstText, @profileImage, @profileFirstImage);"; | 613 | sql += "@profileFirstText, @profileImage, @profileFirstImage);"; |
605 | 614 | ||
606 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | 615 | Dictionary<string, string> parameters = new Dictionary<string, string>(); |
@@ -624,13 +633,13 @@ namespace OpenSim.Framework.Data.MSSQL | |||
624 | parameters["profileWantDoMask"] = "0"; | 633 | parameters["profileWantDoMask"] = "0"; |
625 | parameters["profileAboutText"] = ""; | 634 | parameters["profileAboutText"] = ""; |
626 | parameters["profileFirstText"] = ""; | 635 | parameters["profileFirstText"] = ""; |
627 | parameters["profileImage"] = libsecondlife.LLUUID.Zero.ToString(); | 636 | parameters["profileImage"] = LLUUID.Zero.ToString(); |
628 | parameters["profileFirstImage"] = libsecondlife.LLUUID.Zero.ToString(); | 637 | parameters["profileFirstImage"] = LLUUID.Zero.ToString(); |
629 | 638 | ||
630 | bool returnval = false; | 639 | bool returnval = false; |
631 | 640 | ||
632 | try | 641 | try |
633 | { | 642 | { |
634 | IDbCommand result = Query(sql, parameters); | 643 | IDbCommand result = Query(sql, parameters); |
635 | 644 | ||
636 | if (result.ExecuteNonQuery() == 1) | 645 | if (result.ExecuteNonQuery() == 1) |
@@ -655,8 +664,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
655 | { | 664 | { |
656 | try | 665 | try |
657 | { | 666 | { |
658 | 667 | SqlCommand cmd = new SqlCommand(getResourceString(name), (SqlConnection) dbcon); | |
659 | SqlCommand cmd = new SqlCommand(getResourceString(name), (SqlConnection)dbcon); | ||
660 | cmd.ExecuteNonQuery(); | 668 | cmd.ExecuteNonQuery(); |
661 | cmd.Dispose(); | 669 | cmd.Dispose(); |
662 | } | 670 | } |
@@ -668,7 +676,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
668 | 676 | ||
669 | public SqlConnection getConnection() | 677 | public SqlConnection getConnection() |
670 | { | 678 | { |
671 | return (SqlConnection)dbcon; | 679 | return (SqlConnection) dbcon; |
672 | } | 680 | } |
673 | 681 | ||
674 | /// <summary> | 682 | /// <summary> |
@@ -681,14 +689,15 @@ namespace OpenSim.Framework.Data.MSSQL | |||
681 | { | 689 | { |
682 | Dictionary<string, string> param = new Dictionary<string, string>(); | 690 | Dictionary<string, string> param = new Dictionary<string, string>(); |
683 | param["dbname"] = dbcon.Database; | 691 | param["dbname"] = dbcon.Database; |
684 | IDbCommand tablesCmd = this.Query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_CATALOG=@dbname", param); | 692 | IDbCommand tablesCmd = |
693 | Query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_CATALOG=@dbname", param); | ||
685 | using (IDataReader tables = tablesCmd.ExecuteReader()) | 694 | using (IDataReader tables = tablesCmd.ExecuteReader()) |
686 | { | 695 | { |
687 | while (tables.Read()) | 696 | while (tables.Read()) |
688 | { | 697 | { |
689 | try | 698 | try |
690 | { | 699 | { |
691 | string tableName = (string)tables["TABLE_NAME"]; | 700 | string tableName = (string) tables["TABLE_NAME"]; |
692 | if (tableList.ContainsKey(tableName)) | 701 | if (tableList.ContainsKey(tableName)) |
693 | tableList[tableName] = tableName; | 702 | tableList[tableName] = tableName; |
694 | } | 703 | } |
@@ -704,7 +713,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
704 | 713 | ||
705 | private string getResourceString(string name) | 714 | private string getResourceString(string name) |
706 | { | 715 | { |
707 | Assembly assem = this.GetType().Assembly; | 716 | Assembly assem = GetType().Assembly; |
708 | string[] names = assem.GetManifestResourceNames(); | 717 | string[] names = assem.GetManifestResourceNames(); |
709 | 718 | ||
710 | foreach (string s in names) | 719 | foreach (string s in names) |
@@ -726,16 +735,14 @@ namespace OpenSim.Framework.Data.MSSQL | |||
726 | /// <returns>A string containing the DB provider</returns> | 735 | /// <returns>A string containing the DB provider</returns> |
727 | public string getVersion() | 736 | public string getVersion() |
728 | { | 737 | { |
729 | System.Reflection.Module module = this.GetType().Module; | 738 | Module module = GetType().Module; |
730 | string dllName = module.Assembly.ManifestModule.Name; | 739 | string dllName = module.Assembly.ManifestModule.Name; |
731 | Version dllVersion = module.Assembly.GetName().Version; | 740 | Version dllVersion = module.Assembly.GetName().Version; |
732 | 741 | ||
733 | 742 | ||
734 | return string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, dllVersion.Revision); | 743 | return |
744 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, | ||
745 | dllVersion.Revision); | ||
735 | } | 746 | } |
736 | |||
737 | } | 747 | } |
738 | 748 | } \ No newline at end of file | |
739 | |||
740 | |||
741 | } | ||
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs index eac9826..01ef559 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs | |||
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
37 | /// <summary> | 37 | /// <summary> |
38 | /// A database interface class to a user profile storage system | 38 | /// A database interface class to a user profile storage system |
39 | /// </summary> | 39 | /// </summary> |
40 | class MSSQLUserData : IUserData | 40 | internal class MSSQLUserData : IUserData |
41 | { | 41 | { |
42 | /// <summary> | 42 | /// <summary> |
43 | /// Database manager for MySQL | 43 | /// Database manager for MySQL |
@@ -58,7 +58,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
58 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); | 58 | string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id"); |
59 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | 59 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); |
60 | 60 | ||
61 | database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword); | 61 | database = |
62 | new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, | ||
63 | settingPassword); | ||
62 | } | 64 | } |
63 | 65 | ||
64 | /// <summary> | 66 | /// <summary> |
@@ -77,11 +79,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
77 | param["first"] = user; | 79 | param["first"] = user; |
78 | param["second"] = last; | 80 | param["second"] = last; |
79 | 81 | ||
80 | IDbCommand result = database.Query("SELECT * FROM users WHERE username = @first AND lastname = @second", param); | 82 | IDbCommand result = |
83 | database.Query("SELECT * FROM users WHERE username = @first AND lastname = @second", param); | ||
81 | IDataReader reader = result.ExecuteReader(); | 84 | IDataReader reader = result.ExecuteReader(); |
82 | 85 | ||
83 | UserProfileData row = database.readUserRow(reader); | 86 | UserProfileData row = database.readUserRow(reader); |
84 | 87 | ||
85 | reader.Close(); | 88 | reader.Close(); |
86 | result.Dispose(); | 89 | result.Dispose(); |
87 | 90 | ||
@@ -96,9 +99,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
96 | } | 99 | } |
97 | } | 100 | } |
98 | 101 | ||
99 | public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 102 | public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
100 | { | 103 | { |
101 | List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>(); | 104 | List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>(); |
102 | string[] querysplit; | 105 | string[] querysplit; |
103 | querysplit = query.Split(' '); | 106 | querysplit = query.Split(' '); |
104 | if (querysplit.Length == 2) | 107 | if (querysplit.Length == 2) |
@@ -112,18 +115,19 @@ namespace OpenSim.Framework.Data.MSSQL | |||
112 | param["second"] = querysplit[1]; | 115 | param["second"] = querysplit[1]; |
113 | 116 | ||
114 | IDbCommand result = | 117 | IDbCommand result = |
115 | database.Query("SELECT UUID,username,surname FROM users WHERE username = @first AND lastname = @second", param); | 118 | database.Query( |
119 | "SELECT UUID,username,surname FROM users WHERE username = @first AND lastname = @second", | ||
120 | param); | ||
116 | IDataReader reader = result.ExecuteReader(); | 121 | IDataReader reader = result.ExecuteReader(); |
117 | 122 | ||
118 | 123 | ||
119 | while (reader.Read()) | 124 | while (reader.Read()) |
120 | { | 125 | { |
121 | OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar(); | 126 | Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); |
122 | user.AvatarID = new LLUUID((string)reader["UUID"]); | 127 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
123 | user.firstName = (string)reader["username"]; | 128 | user.firstName = (string) reader["username"]; |
124 | user.lastName = (string)reader["surname"]; | 129 | user.lastName = (string) reader["surname"]; |
125 | returnlist.Add(user); | 130 | returnlist.Add(user); |
126 | |||
127 | } | 131 | } |
128 | reader.Close(); | 132 | reader.Close(); |
129 | result.Dispose(); | 133 | result.Dispose(); |
@@ -135,13 +139,9 @@ namespace OpenSim.Framework.Data.MSSQL | |||
135 | MainLog.Instance.Error(e.ToString()); | 139 | MainLog.Instance.Error(e.ToString()); |
136 | return returnlist; | 140 | return returnlist; |
137 | } | 141 | } |
138 | |||
139 | |||
140 | |||
141 | } | 142 | } |
142 | else if (querysplit.Length == 1) | 143 | else if (querysplit.Length == 1) |
143 | { | 144 | { |
144 | |||
145 | try | 145 | try |
146 | { | 146 | { |
147 | lock (database) | 147 | lock (database) |
@@ -151,18 +151,19 @@ namespace OpenSim.Framework.Data.MSSQL | |||
151 | param["second"] = querysplit[1]; | 151 | param["second"] = querysplit[1]; |
152 | 152 | ||
153 | IDbCommand result = | 153 | IDbCommand result = |
154 | database.Query("SELECT UUID,username,surname FROM users WHERE username = @first OR lastname = @second", param); | 154 | database.Query( |
155 | "SELECT UUID,username,surname FROM users WHERE username = @first OR lastname = @second", | ||
156 | param); | ||
155 | IDataReader reader = result.ExecuteReader(); | 157 | IDataReader reader = result.ExecuteReader(); |
156 | 158 | ||
157 | 159 | ||
158 | while (reader.Read()) | 160 | while (reader.Read()) |
159 | { | 161 | { |
160 | OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar(); | 162 | Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); |
161 | user.AvatarID = new LLUUID((string)reader["UUID"]); | 163 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
162 | user.firstName = (string)reader["username"]; | 164 | user.firstName = (string) reader["username"]; |
163 | user.lastName = (string)reader["surname"]; | 165 | user.lastName = (string) reader["surname"]; |
164 | returnlist.Add(user); | 166 | returnlist.Add(user); |
165 | |||
166 | } | 167 | } |
167 | reader.Close(); | 168 | reader.Close(); |
168 | result.Dispose(); | 169 | result.Dispose(); |
@@ -268,21 +269,25 @@ namespace OpenSim.Framework.Data.MSSQL | |||
268 | /// <param name="user">The user profile to create</param> | 269 | /// <param name="user">The user profile to create</param> |
269 | public void AddNewUserProfile(UserProfileData user) | 270 | public void AddNewUserProfile(UserProfileData user) |
270 | { | 271 | { |
271 | try | 272 | try |
272 | { | 273 | { |
273 | lock (database) | 274 | lock (database) |
274 | { | 275 | { |
275 | database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z, | 276 | database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, |
276 | user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI, user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask, | 277 | user.homeRegion, user.homeLocation.X, user.homeLocation.Y, |
277 | user.profileAboutText, user.profileFirstText, user.profileImage, user.profileFirstImage); | 278 | user.homeLocation.Z, |
278 | } | 279 | user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, |
279 | } | 280 | user.lastLogin, user.userInventoryURI, user.userAssetURI, |
280 | catch (Exception e) | 281 | user.profileCanDoMask, user.profileWantDoMask, |
281 | { | 282 | user.profileAboutText, user.profileFirstText, user.profileImage, |
282 | database.Reconnect(); | 283 | user.profileFirstImage); |
283 | MainLog.Instance.Error(e.ToString()); | 284 | } |
284 | } | 285 | } |
285 | 286 | catch (Exception e) | |
287 | { | ||
288 | database.Reconnect(); | ||
289 | MainLog.Instance.Error(e.ToString()); | ||
290 | } | ||
286 | } | 291 | } |
287 | 292 | ||
288 | /// <summary> | 293 | /// <summary> |
@@ -293,34 +298,33 @@ namespace OpenSim.Framework.Data.MSSQL | |||
293 | { | 298 | { |
294 | // Do nothing. | 299 | // Do nothing. |
295 | } | 300 | } |
296 | 301 | ||
297 | 302 | ||
298 | public bool UpdateUserProfile(UserProfileData user) | 303 | public bool UpdateUserProfile(UserProfileData user) |
299 | { | 304 | { |
300 | |||
301 | SqlCommand command = new SqlCommand("UPDATE users set UUID = @uuid, " + | 305 | SqlCommand command = new SqlCommand("UPDATE users set UUID = @uuid, " + |
302 | "username = @username, " + | 306 | "username = @username, " + |
303 | "lastname = @lastname," + | 307 | "lastname = @lastname," + |
304 | "passwordHash = @passwordHash," + | 308 | "passwordHash = @passwordHash," + |
305 | "passwordSalt = @passwordSalt," + | 309 | "passwordSalt = @passwordSalt," + |
306 | "homeRegion = @homeRegion," + | 310 | "homeRegion = @homeRegion," + |
307 | "homeLocationX = @homeLocationX," + | 311 | "homeLocationX = @homeLocationX," + |
308 | "homeLocationY = @homeLocationY," + | 312 | "homeLocationY = @homeLocationY," + |
309 | "homeLocationZ = @homeLocationZ," + | 313 | "homeLocationZ = @homeLocationZ," + |
310 | "homeLookAtX = @homeLookAtX," + | 314 | "homeLookAtX = @homeLookAtX," + |
311 | "homeLookAtY = @homeLookAtY," + | 315 | "homeLookAtY = @homeLookAtY," + |
312 | "homeLookAtZ = @homeLookAtZ," + | 316 | "homeLookAtZ = @homeLookAtZ," + |
313 | "created = @created," + | 317 | "created = @created," + |
314 | "lastLogin = @lastLogin," + | 318 | "lastLogin = @lastLogin," + |
315 | "userInventoryURI = @userInventoryURI," + | 319 | "userInventoryURI = @userInventoryURI," + |
316 | "userAssetURI = @userAssetURI," + | 320 | "userAssetURI = @userAssetURI," + |
317 | "profileCanDoMask = @profileCanDoMask," + | 321 | "profileCanDoMask = @profileCanDoMask," + |
318 | "profileWantDoMask = @profileWantDoMask," + | 322 | "profileWantDoMask = @profileWantDoMask," + |
319 | "profileAboutText = @profileAboutText," + | 323 | "profileAboutText = @profileAboutText," + |
320 | "profileFirstText = @profileFirstText," + | 324 | "profileFirstText = @profileFirstText," + |
321 | "profileImage = @profileImage," + | 325 | "profileImage = @profileImage," + |
322 | "profileFirstImage = @profileFirstImage where " + | 326 | "profileFirstImage = @profileFirstImage where " + |
323 | "UUID = @keyUUUID;", database.getConnection()); | 327 | "UUID = @keyUUUID;", database.getConnection()); |
324 | SqlParameter param1 = new SqlParameter("@uuid", user.UUID.ToString()); | 328 | SqlParameter param1 = new SqlParameter("@uuid", user.UUID.ToString()); |
325 | SqlParameter param2 = new SqlParameter("@username", user.username); | 329 | SqlParameter param2 = new SqlParameter("@username", user.username); |
326 | SqlParameter param3 = new SqlParameter("@lastname", user.surname); | 330 | SqlParameter param3 = new SqlParameter("@lastname", user.surname); |
@@ -341,8 +345,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
341 | SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.profileWantDoMask)); | 345 | SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.profileWantDoMask)); |
342 | SqlParameter param19 = new SqlParameter("@profileAboutText", user.profileAboutText); | 346 | SqlParameter param19 = new SqlParameter("@profileAboutText", user.profileAboutText); |
343 | SqlParameter param20 = new SqlParameter("@profileFirstText", user.profileFirstText); | 347 | SqlParameter param20 = new SqlParameter("@profileFirstText", user.profileFirstText); |
344 | SqlParameter param21 = new SqlParameter("@profileImage", libsecondlife.LLUUID.Zero.ToString()); | 348 | SqlParameter param21 = new SqlParameter("@profileImage", LLUUID.Zero.ToString()); |
345 | SqlParameter param22 = new SqlParameter("@profileFirstImage", libsecondlife.LLUUID.Zero.ToString()); | 349 | SqlParameter param22 = new SqlParameter("@profileFirstImage", LLUUID.Zero.ToString()); |
346 | SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToString()); | 350 | SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToString()); |
347 | command.Parameters.Add(param1); | 351 | command.Parameters.Add(param1); |
348 | command.Parameters.Add(param2); | 352 | command.Parameters.Add(param2); |
@@ -370,9 +374,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
370 | try | 374 | try |
371 | { | 375 | { |
372 | int affected = command.ExecuteNonQuery(); | 376 | int affected = command.ExecuteNonQuery(); |
373 | if (affected != 0) { | 377 | if (affected != 0) |
378 | { | ||
374 | return true; | 379 | return true; |
375 | } else { | 380 | } |
381 | else | ||
382 | { | ||
376 | return false; | 383 | return false; |
377 | } | 384 | } |
378 | } | 385 | } |
@@ -433,6 +440,5 @@ namespace OpenSim.Framework.Data.MSSQL | |||
433 | public void runQuery(string query) | 440 | public void runQuery(string query) |
434 | { | 441 | { |
435 | } | 442 | } |
436 | |||
437 | } | 443 | } |
438 | } | 444 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs index 19ae115..b20c54e 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | |||
@@ -83,13 +83,13 @@ namespace OpenSim.Framework.Data.MySQL | |||
83 | if (dbReader.Read()) | 83 | if (dbReader.Read()) |
84 | { | 84 | { |
85 | asset = new AssetBase(); | 85 | asset = new AssetBase(); |
86 | asset.Data = (byte[])dbReader["data"]; | 86 | asset.Data = (byte[]) dbReader["data"]; |
87 | asset.Description = (string)dbReader["description"]; | 87 | asset.Description = (string) dbReader["description"]; |
88 | asset.FullID = assetID; | 88 | asset.FullID = assetID; |
89 | asset.InvType = (sbyte)dbReader["invType"]; | 89 | asset.InvType = (sbyte) dbReader["invType"]; |
90 | asset.Local = ((sbyte)dbReader["local"]) != 0 ? true : false; | 90 | asset.Local = ((sbyte) dbReader["local"]) != 0 ? true : false; |
91 | asset.Name = (string)dbReader["name"]; | 91 | asset.Name = (string) dbReader["name"]; |
92 | asset.Type = (sbyte)dbReader["assetType"]; | 92 | asset.Type = (sbyte) dbReader["assetType"]; |
93 | } | 93 | } |
94 | dbReader.Close(); | 94 | dbReader.Close(); |
95 | cmd.Dispose(); | 95 | cmd.Dispose(); |
@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
98 | catch (Exception) | 98 | catch (Exception) |
99 | { | 99 | { |
100 | MainLog.Instance.Warn("ASSETS", "MySql failure fetching asset"); | 100 | MainLog.Instance.Warn("ASSETS", "MySql failure fetching asset"); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | return asset; | 103 | return asset; |
104 | } | 104 | } |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index c48c88f..fcf8c6f 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | |||
@@ -31,15 +31,12 @@ using System.Collections.Generic; | |||
31 | using System.Data; | 31 | using System.Data; |
32 | using System.Diagnostics; | 32 | using System.Diagnostics; |
33 | using System.IO; | 33 | using System.IO; |
34 | using System.Text; | ||
35 | using libsecondlife; | 34 | using libsecondlife; |
36 | using MySql.Data.MySqlClient; | 35 | using MySql.Data.MySqlClient; |
37 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
38 | using OpenSim.Region.Environment.Interfaces; | 37 | using OpenSim.Region.Environment.Interfaces; |
39 | using OpenSim.Region.Environment.LandManagement; | 38 | using OpenSim.Region.Environment.LandManagement; |
40 | using OpenSim.Region.Environment.Scenes; | 39 | using OpenSim.Region.Environment.Scenes; |
41 | using System.Data.SqlClient; | ||
42 | using System.Data.Common; | ||
43 | 40 | ||
44 | namespace OpenSim.Framework.Data.MySQL | 41 | namespace OpenSim.Framework.Data.MySQL |
45 | { | 42 | { |
@@ -130,7 +127,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
130 | { | 127 | { |
131 | foreach (SceneObjectPart prim in obj.Children.Values) | 128 | foreach (SceneObjectPart prim in obj.Children.Values) |
132 | { | 129 | { |
133 | if ((prim.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0) | 130 | if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) |
134 | { | 131 | { |
135 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); | 132 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); |
136 | addPrim(prim, obj.UUID, regionUUID); | 133 | addPrim(prim, obj.UUID, regionUUID); |
@@ -156,7 +153,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
156 | DataRow[] primRows = prims.Select(selectExp); | 153 | DataRow[] primRows = prims.Select(selectExp); |
157 | foreach (DataRow row in primRows) | 154 | foreach (DataRow row in primRows) |
158 | { | 155 | { |
159 | LLUUID uuid = new LLUUID((string)row["UUID"]); | 156 | LLUUID uuid = new LLUUID((string) row["UUID"]); |
160 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); | 157 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); |
161 | if (shapeRow != null) | 158 | if (shapeRow != null) |
162 | { | 159 | { |
@@ -191,8 +188,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
191 | { | 188 | { |
192 | try | 189 | try |
193 | { | 190 | { |
194 | string uuid = (string)primRow["UUID"]; | 191 | string uuid = (string) primRow["UUID"]; |
195 | string objID = (string)primRow["SceneGroupID"]; | 192 | string objID = (string) primRow["SceneGroupID"]; |
196 | if (uuid == objID) //is new SceneObjectGroup ? | 193 | if (uuid == objID) //is new SceneObjectGroup ? |
197 | { | 194 | { |
198 | SceneObjectGroup group = new SceneObjectGroup(); | 195 | SceneObjectGroup group = new SceneObjectGroup(); |
@@ -255,10 +252,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
255 | lock (m_dataSet) | 252 | lock (m_dataSet) |
256 | { | 253 | { |
257 | MySqlCommand cmd = new MySqlCommand("insert into terrain(RegionUUID, Revision, Heightfield)" + | 254 | MySqlCommand cmd = new MySqlCommand("insert into terrain(RegionUUID, Revision, Heightfield)" + |
258 | " values(?RegionUUID, ?Revision, ?Heightfield)", m_connection); | 255 | " values(?RegionUUID, ?Revision, ?Heightfield)", m_connection); |
259 | using (cmd) | 256 | using (cmd) |
260 | { | 257 | { |
261 | |||
262 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); | 258 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); |
263 | cmd.Parameters.Add(new MySqlParameter("?Revision", revision)); | 259 | cmd.Parameters.Add(new MySqlParameter("?Revision", revision)); |
264 | cmd.Parameters.Add(new MySqlParameter("?Heightfield", serializeTerrain(ter))); | 260 | cmd.Parameters.Add(new MySqlParameter("?Heightfield", serializeTerrain(ter))); |
@@ -269,7 +265,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
269 | 265 | ||
270 | public double[,] LoadTerrain(LLUUID regionID) | 266 | public double[,] LoadTerrain(LLUUID regionID) |
271 | { | 267 | { |
272 | double[,] terret = new double[256, 256]; | 268 | double[,] terret = new double[256,256]; |
273 | terret.Initialize(); | 269 | terret.Initialize(); |
274 | 270 | ||
275 | MySqlCommand cmd = new MySqlCommand( | 271 | MySqlCommand cmd = new MySqlCommand( |
@@ -278,7 +274,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
278 | , m_connection); | 274 | , m_connection); |
279 | 275 | ||
280 | MySqlParameter param = new MySqlParameter(); | 276 | MySqlParameter param = new MySqlParameter(); |
281 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); | 277 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); |
282 | 278 | ||
283 | if (m_connection.State != ConnectionState.Open) | 279 | if (m_connection.State != ConnectionState.Open) |
284 | { | 280 | { |
@@ -290,15 +286,15 @@ namespace OpenSim.Framework.Data.MySQL | |||
290 | int rev = 0; | 286 | int rev = 0; |
291 | if (row.Read()) | 287 | if (row.Read()) |
292 | { | 288 | { |
293 | byte[] heightmap = (byte[])row["Heightfield"]; | 289 | byte[] heightmap = (byte[]) row["Heightfield"]; |
294 | for (int x = 0; x < 256; x++) | 290 | for (int x = 0; x < 256; x++) |
295 | { | 291 | { |
296 | for (int y = 0; y < 256; y++) | 292 | for (int y = 0; y < 256; y++) |
297 | { | 293 | { |
298 | terret[x, y] = BitConverter.ToDouble(heightmap, ((x * 256) + y) * 8); | 294 | terret[x, y] = BitConverter.ToDouble(heightmap, ((x*256) + y)*8); |
299 | } | 295 | } |
300 | } | 296 | } |
301 | rev = (int)row["Revision"]; | 297 | rev = (int) row["Revision"]; |
302 | } | 298 | } |
303 | else | 299 | else |
304 | { | 300 | { |
@@ -322,7 +318,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
322 | cmd.ExecuteNonQuery(); | 318 | cmd.ExecuteNonQuery(); |
323 | } | 319 | } |
324 | 320 | ||
325 | using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection)) | 321 | using ( |
322 | MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection) | ||
323 | ) | ||
326 | { | 324 | { |
327 | cmd.Parameters.Add(new MySqlParameter("?UUID", Util.ToRawUuidString(globalID))); | 325 | cmd.Parameters.Add(new MySqlParameter("?UUID", Util.ToRawUuidString(globalID))); |
328 | cmd.ExecuteNonQuery(); | 326 | cmd.ExecuteNonQuery(); |
@@ -336,7 +334,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
336 | { | 334 | { |
337 | DataTable land = m_landTable; | 335 | DataTable land = m_landTable; |
338 | DataTable landaccesslist = m_landAccessListTable; | 336 | DataTable landaccesslist = m_landAccessListTable; |
339 | 337 | ||
340 | DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID)); | 338 | DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID)); |
341 | if (landRow == null) | 339 | if (landRow == null) |
342 | { | 340 | { |
@@ -349,7 +347,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
349 | fillLandRow(landRow, parcel.landData, regionUUID); | 347 | fillLandRow(landRow, parcel.landData, regionUUID); |
350 | } | 348 | } |
351 | 349 | ||
352 | using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection)) | 350 | using ( |
351 | MySqlCommand cmd = | ||
352 | new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection)) | ||
353 | { | 353 | { |
354 | cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID))); | 354 | cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID))); |
355 | cmd.ExecuteNonQuery(); | 355 | cmd.ExecuteNonQuery(); |
@@ -361,13 +361,12 @@ namespace OpenSim.Framework.Data.MySQL | |||
361 | fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); | 361 | fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); |
362 | landaccesslist.Rows.Add(newAccessRow); | 362 | landaccesslist.Rows.Add(newAccessRow); |
363 | } | 363 | } |
364 | |||
365 | } | 364 | } |
366 | 365 | ||
367 | Commit(); | 366 | Commit(); |
368 | } | 367 | } |
369 | 368 | ||
370 | public List<Framework.LandData> LoadLandObjects(LLUUID regionUUID) | 369 | public List<LandData> LoadLandObjects(LLUUID regionUUID) |
371 | { | 370 | { |
372 | List<LandData> landDataForRegion = new List<LandData>(); | 371 | List<LandData> landDataForRegion = new List<LandData>(); |
373 | lock (m_dataSet) | 372 | lock (m_dataSet) |
@@ -403,7 +402,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
403 | foreach (DataRow row in table.Rows) | 402 | foreach (DataRow row in table.Rows) |
404 | { | 403 | { |
405 | //--- Display the original values, if there are any. | 404 | //--- Display the original values, if there are any. |
406 | if (row.HasVersion(System.Data.DataRowVersion.Original)) | 405 | if (row.HasVersion(DataRowVersion.Original)) |
407 | { | 406 | { |
408 | Debug.Write("Original Row Values ===> "); | 407 | Debug.Write("Original Row Values ===> "); |
409 | foreach (DataColumn column in table.Columns) | 408 | foreach (DataColumn column in table.Columns) |
@@ -412,7 +411,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
412 | Debug.WriteLine(""); | 411 | Debug.WriteLine(""); |
413 | } | 412 | } |
414 | //--- Display the current values, if there are any. | 413 | //--- Display the current values, if there are any. |
415 | if (row.HasVersion(System.Data.DataRowVersion.Current)) | 414 | if (row.HasVersion(DataRowVersion.Current)) |
416 | { | 415 | { |
417 | Debug.Write("Current Row Values ====> "); | 416 | Debug.Write("Current Row Values ====> "); |
418 | foreach (DataColumn column in table.Columns) | 417 | foreach (DataColumn column in table.Columns) |
@@ -470,9 +469,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
470 | { | 469 | { |
471 | DataTable terrain = new DataTable("terrain"); | 470 | DataTable terrain = new DataTable("terrain"); |
472 | 471 | ||
473 | createCol(terrain, "RegionUUID", typeof(String)); | 472 | createCol(terrain, "RegionUUID", typeof (String)); |
474 | createCol(terrain, "Revision", typeof(Int32)); | 473 | createCol(terrain, "Revision", typeof (Int32)); |
475 | DataColumn heightField = createCol(terrain, "Heightfield", typeof(Byte[])); | 474 | DataColumn heightField = createCol(terrain, "Heightfield", typeof (Byte[])); |
476 | return terrain; | 475 | return terrain; |
477 | } | 476 | } |
478 | 477 | ||
@@ -480,62 +479,62 @@ namespace OpenSim.Framework.Data.MySQL | |||
480 | { | 479 | { |
481 | DataTable prims = new DataTable("prims"); | 480 | DataTable prims = new DataTable("prims"); |
482 | 481 | ||
483 | createCol(prims, "UUID", typeof(String)); | 482 | createCol(prims, "UUID", typeof (String)); |
484 | createCol(prims, "RegionUUID", typeof(String)); | 483 | createCol(prims, "RegionUUID", typeof (String)); |
485 | createCol(prims, "ParentID", typeof(Int32)); | 484 | createCol(prims, "ParentID", typeof (Int32)); |
486 | createCol(prims, "CreationDate", typeof(Int32)); | 485 | createCol(prims, "CreationDate", typeof (Int32)); |
487 | createCol(prims, "Name", typeof(String)); | 486 | createCol(prims, "Name", typeof (String)); |
488 | createCol(prims, "SceneGroupID", typeof(String)); | 487 | createCol(prims, "SceneGroupID", typeof (String)); |
489 | // various text fields | 488 | // various text fields |
490 | createCol(prims, "Text", typeof(String)); | 489 | createCol(prims, "Text", typeof (String)); |
491 | createCol(prims, "Description", typeof(String)); | 490 | createCol(prims, "Description", typeof (String)); |
492 | createCol(prims, "SitName", typeof(String)); | 491 | createCol(prims, "SitName", typeof (String)); |
493 | createCol(prims, "TouchName", typeof(String)); | 492 | createCol(prims, "TouchName", typeof (String)); |
494 | // permissions | 493 | // permissions |
495 | createCol(prims, "ObjectFlags", typeof(Int32)); | 494 | createCol(prims, "ObjectFlags", typeof (Int32)); |
496 | createCol(prims, "CreatorID", typeof(String)); | 495 | createCol(prims, "CreatorID", typeof (String)); |
497 | createCol(prims, "OwnerID", typeof(String)); | 496 | createCol(prims, "OwnerID", typeof (String)); |
498 | createCol(prims, "GroupID", typeof(String)); | 497 | createCol(prims, "GroupID", typeof (String)); |
499 | createCol(prims, "LastOwnerID", typeof(String)); | 498 | createCol(prims, "LastOwnerID", typeof (String)); |
500 | createCol(prims, "OwnerMask", typeof(Int32)); | 499 | createCol(prims, "OwnerMask", typeof (Int32)); |
501 | createCol(prims, "NextOwnerMask", typeof(Int32)); | 500 | createCol(prims, "NextOwnerMask", typeof (Int32)); |
502 | createCol(prims, "GroupMask", typeof(Int32)); | 501 | createCol(prims, "GroupMask", typeof (Int32)); |
503 | createCol(prims, "EveryoneMask", typeof(Int32)); | 502 | createCol(prims, "EveryoneMask", typeof (Int32)); |
504 | createCol(prims, "BaseMask", typeof(Int32)); | 503 | createCol(prims, "BaseMask", typeof (Int32)); |
505 | // vectors | 504 | // vectors |
506 | createCol(prims, "PositionX", typeof(Double)); | 505 | createCol(prims, "PositionX", typeof (Double)); |
507 | createCol(prims, "PositionY", typeof(Double)); | 506 | createCol(prims, "PositionY", typeof (Double)); |
508 | createCol(prims, "PositionZ", typeof(Double)); | 507 | createCol(prims, "PositionZ", typeof (Double)); |
509 | createCol(prims, "GroupPositionX", typeof(Double)); | 508 | createCol(prims, "GroupPositionX", typeof (Double)); |
510 | createCol(prims, "GroupPositionY", typeof(Double)); | 509 | createCol(prims, "GroupPositionY", typeof (Double)); |
511 | createCol(prims, "GroupPositionZ", typeof(Double)); | 510 | createCol(prims, "GroupPositionZ", typeof (Double)); |
512 | createCol(prims, "VelocityX", typeof(Double)); | 511 | createCol(prims, "VelocityX", typeof (Double)); |
513 | createCol(prims, "VelocityY", typeof(Double)); | 512 | createCol(prims, "VelocityY", typeof (Double)); |
514 | createCol(prims, "VelocityZ", typeof(Double)); | 513 | createCol(prims, "VelocityZ", typeof (Double)); |
515 | createCol(prims, "AngularVelocityX", typeof(Double)); | 514 | createCol(prims, "AngularVelocityX", typeof (Double)); |
516 | createCol(prims, "AngularVelocityY", typeof(Double)); | 515 | createCol(prims, "AngularVelocityY", typeof (Double)); |
517 | createCol(prims, "AngularVelocityZ", typeof(Double)); | 516 | createCol(prims, "AngularVelocityZ", typeof (Double)); |
518 | createCol(prims, "AccelerationX", typeof(Double)); | 517 | createCol(prims, "AccelerationX", typeof (Double)); |
519 | createCol(prims, "AccelerationY", typeof(Double)); | 518 | createCol(prims, "AccelerationY", typeof (Double)); |
520 | createCol(prims, "AccelerationZ", typeof(Double)); | 519 | createCol(prims, "AccelerationZ", typeof (Double)); |
521 | // quaternions | 520 | // quaternions |
522 | createCol(prims, "RotationX", typeof(Double)); | 521 | createCol(prims, "RotationX", typeof (Double)); |
523 | createCol(prims, "RotationY", typeof(Double)); | 522 | createCol(prims, "RotationY", typeof (Double)); |
524 | createCol(prims, "RotationZ", typeof(Double)); | 523 | createCol(prims, "RotationZ", typeof (Double)); |
525 | createCol(prims, "RotationW", typeof(Double)); | 524 | createCol(prims, "RotationW", typeof (Double)); |
526 | // sit target | 525 | // sit target |
527 | createCol(prims, "SitTargetOffsetX", typeof(Double)); | 526 | createCol(prims, "SitTargetOffsetX", typeof (Double)); |
528 | createCol(prims, "SitTargetOffsetY", typeof(Double)); | 527 | createCol(prims, "SitTargetOffsetY", typeof (Double)); |
529 | createCol(prims, "SitTargetOffsetZ", typeof(Double)); | 528 | createCol(prims, "SitTargetOffsetZ", typeof (Double)); |
530 | 529 | ||
531 | createCol(prims, "SitTargetOrientW", typeof(Double)); | 530 | createCol(prims, "SitTargetOrientW", typeof (Double)); |
532 | createCol(prims, "SitTargetOrientX", typeof(Double)); | 531 | createCol(prims, "SitTargetOrientX", typeof (Double)); |
533 | createCol(prims, "SitTargetOrientY", typeof(Double)); | 532 | createCol(prims, "SitTargetOrientY", typeof (Double)); |
534 | createCol(prims, "SitTargetOrientZ", typeof(Double)); | 533 | createCol(prims, "SitTargetOrientZ", typeof (Double)); |
535 | 534 | ||
536 | 535 | ||
537 | // Add in contraints | 536 | // Add in contraints |
538 | prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; | 537 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; |
539 | 538 | ||
540 | return prims; | 539 | return prims; |
541 | } | 540 | } |
@@ -543,42 +542,42 @@ namespace OpenSim.Framework.Data.MySQL | |||
543 | private DataTable createLandTable() | 542 | private DataTable createLandTable() |
544 | { | 543 | { |
545 | DataTable land = new DataTable("land"); | 544 | DataTable land = new DataTable("land"); |
546 | createCol(land, "UUID", typeof(String)); | 545 | createCol(land, "UUID", typeof (String)); |
547 | createCol(land, "RegionUUID", typeof(String)); | 546 | createCol(land, "RegionUUID", typeof (String)); |
548 | createCol(land, "LocalLandID", typeof(Int32)); | 547 | createCol(land, "LocalLandID", typeof (Int32)); |
549 | 548 | ||
550 | // Bitmap is a byte[512] | 549 | // Bitmap is a byte[512] |
551 | createCol(land, "Bitmap", typeof(Byte[])); | 550 | createCol(land, "Bitmap", typeof (Byte[])); |
552 | 551 | ||
553 | createCol(land, "Name", typeof(String)); | 552 | createCol(land, "Name", typeof (String)); |
554 | createCol(land, "Description", typeof(String)); | 553 | createCol(land, "Description", typeof (String)); |
555 | createCol(land, "OwnerUUID", typeof(String)); | 554 | createCol(land, "OwnerUUID", typeof (String)); |
556 | createCol(land, "IsGroupOwned", typeof(Int32)); | 555 | createCol(land, "IsGroupOwned", typeof (Int32)); |
557 | createCol(land, "Area", typeof(Int32)); | 556 | createCol(land, "Area", typeof (Int32)); |
558 | createCol(land, "AuctionID", typeof(Int32)); //Unemplemented | 557 | createCol(land, "AuctionID", typeof (Int32)); //Unemplemented |
559 | createCol(land, "Category", typeof(Int32)); //Enum libsecondlife.Parcel.ParcelCategory | 558 | createCol(land, "Category", typeof (Int32)); //Enum libsecondlife.Parcel.ParcelCategory |
560 | createCol(land, "ClaimDate", typeof(Int32)); | 559 | createCol(land, "ClaimDate", typeof (Int32)); |
561 | createCol(land, "ClaimPrice", typeof(Int32)); | 560 | createCol(land, "ClaimPrice", typeof (Int32)); |
562 | createCol(land, "GroupUUID", typeof(String)); | 561 | createCol(land, "GroupUUID", typeof (String)); |
563 | createCol(land, "SalePrice", typeof(Int32)); | 562 | createCol(land, "SalePrice", typeof (Int32)); |
564 | createCol(land, "LandStatus", typeof(Int32)); //Enum. libsecondlife.Parcel.ParcelStatus | 563 | createCol(land, "LandStatus", typeof (Int32)); //Enum. libsecondlife.Parcel.ParcelStatus |
565 | createCol(land, "LandFlags", typeof(Int32)); | 564 | createCol(land, "LandFlags", typeof (Int32)); |
566 | createCol(land, "LandingType", typeof(Int32)); | 565 | createCol(land, "LandingType", typeof (Int32)); |
567 | createCol(land, "MediaAutoScale", typeof(Int32)); | 566 | createCol(land, "MediaAutoScale", typeof (Int32)); |
568 | createCol(land, "MediaTextureUUID", typeof(String)); | 567 | createCol(land, "MediaTextureUUID", typeof (String)); |
569 | createCol(land, "MediaURL", typeof(String)); | 568 | createCol(land, "MediaURL", typeof (String)); |
570 | createCol(land, "MusicURL", typeof(String)); | 569 | createCol(land, "MusicURL", typeof (String)); |
571 | createCol(land, "PassHours", typeof(Double)); | 570 | createCol(land, "PassHours", typeof (Double)); |
572 | createCol(land, "PassPrice", typeof(Int32)); | 571 | createCol(land, "PassPrice", typeof (Int32)); |
573 | createCol(land, "SnapshotUUID", typeof(String)); | 572 | createCol(land, "SnapshotUUID", typeof (String)); |
574 | createCol(land, "UserLocationX", typeof(Double)); | 573 | createCol(land, "UserLocationX", typeof (Double)); |
575 | createCol(land, "UserLocationY", typeof(Double)); | 574 | createCol(land, "UserLocationY", typeof (Double)); |
576 | createCol(land, "UserLocationZ", typeof(Double)); | 575 | createCol(land, "UserLocationZ", typeof (Double)); |
577 | createCol(land, "UserLookAtX", typeof(Double)); | 576 | createCol(land, "UserLookAtX", typeof (Double)); |
578 | createCol(land, "UserLookAtY", typeof(Double)); | 577 | createCol(land, "UserLookAtY", typeof (Double)); |
579 | createCol(land, "UserLookAtZ", typeof(Double)); | 578 | createCol(land, "UserLookAtZ", typeof (Double)); |
580 | 579 | ||
581 | land.PrimaryKey = new DataColumn[] { land.Columns["UUID"] }; | 580 | land.PrimaryKey = new DataColumn[] {land.Columns["UUID"]}; |
582 | 581 | ||
583 | return land; | 582 | return land; |
584 | } | 583 | } |
@@ -586,9 +585,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
586 | private DataTable createLandAccessListTable() | 585 | private DataTable createLandAccessListTable() |
587 | { | 586 | { |
588 | DataTable landaccess = new DataTable("landaccesslist"); | 587 | DataTable landaccess = new DataTable("landaccesslist"); |
589 | createCol(landaccess, "LandUUID", typeof(String)); | 588 | createCol(landaccess, "LandUUID", typeof (String)); |
590 | createCol(landaccess, "AccessUUID", typeof(String)); | 589 | createCol(landaccess, "AccessUUID", typeof (String)); |
591 | createCol(landaccess, "Flags", typeof(Int32)); | 590 | createCol(landaccess, "Flags", typeof (Int32)); |
592 | 591 | ||
593 | return landaccess; | 592 | return landaccess; |
594 | } | 593 | } |
@@ -596,38 +595,38 @@ namespace OpenSim.Framework.Data.MySQL | |||
596 | private DataTable createShapeTable() | 595 | private DataTable createShapeTable() |
597 | { | 596 | { |
598 | DataTable shapes = new DataTable("primshapes"); | 597 | DataTable shapes = new DataTable("primshapes"); |
599 | createCol(shapes, "UUID", typeof(String)); | 598 | createCol(shapes, "UUID", typeof (String)); |
600 | // shape is an enum | 599 | // shape is an enum |
601 | createCol(shapes, "Shape", typeof(Int32)); | 600 | createCol(shapes, "Shape", typeof (Int32)); |
602 | // vectors | 601 | // vectors |
603 | createCol(shapes, "ScaleX", typeof(Double)); | 602 | createCol(shapes, "ScaleX", typeof (Double)); |
604 | createCol(shapes, "ScaleY", typeof(Double)); | 603 | createCol(shapes, "ScaleY", typeof (Double)); |
605 | createCol(shapes, "ScaleZ", typeof(Double)); | 604 | createCol(shapes, "ScaleZ", typeof (Double)); |
606 | // paths | 605 | // paths |
607 | createCol(shapes, "PCode", typeof(Int32)); | 606 | createCol(shapes, "PCode", typeof (Int32)); |
608 | createCol(shapes, "PathBegin", typeof(Int32)); | 607 | createCol(shapes, "PathBegin", typeof (Int32)); |
609 | createCol(shapes, "PathEnd", typeof(Int32)); | 608 | createCol(shapes, "PathEnd", typeof (Int32)); |
610 | createCol(shapes, "PathScaleX", typeof(Int32)); | 609 | createCol(shapes, "PathScaleX", typeof (Int32)); |
611 | createCol(shapes, "PathScaleY", typeof(Int32)); | 610 | createCol(shapes, "PathScaleY", typeof (Int32)); |
612 | createCol(shapes, "PathShearX", typeof(Int32)); | 611 | createCol(shapes, "PathShearX", typeof (Int32)); |
613 | createCol(shapes, "PathShearY", typeof(Int32)); | 612 | createCol(shapes, "PathShearY", typeof (Int32)); |
614 | createCol(shapes, "PathSkew", typeof(Int32)); | 613 | createCol(shapes, "PathSkew", typeof (Int32)); |
615 | createCol(shapes, "PathCurve", typeof(Int32)); | 614 | createCol(shapes, "PathCurve", typeof (Int32)); |
616 | createCol(shapes, "PathRadiusOffset", typeof(Int32)); | 615 | createCol(shapes, "PathRadiusOffset", typeof (Int32)); |
617 | createCol(shapes, "PathRevolutions", typeof(Int32)); | 616 | createCol(shapes, "PathRevolutions", typeof (Int32)); |
618 | createCol(shapes, "PathTaperX", typeof(Int32)); | 617 | createCol(shapes, "PathTaperX", typeof (Int32)); |
619 | createCol(shapes, "PathTaperY", typeof(Int32)); | 618 | createCol(shapes, "PathTaperY", typeof (Int32)); |
620 | createCol(shapes, "PathTwist", typeof(Int32)); | 619 | createCol(shapes, "PathTwist", typeof (Int32)); |
621 | createCol(shapes, "PathTwistBegin", typeof(Int32)); | 620 | createCol(shapes, "PathTwistBegin", typeof (Int32)); |
622 | // profile | 621 | // profile |
623 | createCol(shapes, "ProfileBegin", typeof(Int32)); | 622 | createCol(shapes, "ProfileBegin", typeof (Int32)); |
624 | createCol(shapes, "ProfileEnd", typeof(Int32)); | 623 | createCol(shapes, "ProfileEnd", typeof (Int32)); |
625 | createCol(shapes, "ProfileCurve", typeof(Int32)); | 624 | createCol(shapes, "ProfileCurve", typeof (Int32)); |
626 | createCol(shapes, "ProfileHollow", typeof(Int32)); | 625 | createCol(shapes, "ProfileHollow", typeof (Int32)); |
627 | createCol(shapes, "Texture", typeof(Byte[])); | 626 | createCol(shapes, "Texture", typeof (Byte[])); |
628 | createCol(shapes, "ExtraParams", typeof(Byte[])); | 627 | createCol(shapes, "ExtraParams", typeof (Byte[])); |
629 | 628 | ||
630 | shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] }; | 629 | shapes.PrimaryKey = new DataColumn[] {shapes.Columns["UUID"]}; |
631 | 630 | ||
632 | return shapes; | 631 | return shapes; |
633 | } | 632 | } |
@@ -643,23 +642,23 @@ namespace OpenSim.Framework.Data.MySQL | |||
643 | private SceneObjectPart buildPrim(DataRow row) | 642 | private SceneObjectPart buildPrim(DataRow row) |
644 | { | 643 | { |
645 | SceneObjectPart prim = new SceneObjectPart(); | 644 | SceneObjectPart prim = new SceneObjectPart(); |
646 | prim.UUID = new LLUUID((String)row["UUID"]); | 645 | prim.UUID = new LLUUID((String) row["UUID"]); |
647 | // explicit conversion of integers is required, which sort | 646 | // explicit conversion of integers is required, which sort |
648 | // of sucks. No idea if there is a shortcut here or not. | 647 | // of sucks. No idea if there is a shortcut here or not. |
649 | prim.ParentID = Convert.ToUInt32(row["ParentID"]); | 648 | prim.ParentID = Convert.ToUInt32(row["ParentID"]); |
650 | prim.CreationDate = Convert.ToInt32(row["CreationDate"]); | 649 | prim.CreationDate = Convert.ToInt32(row["CreationDate"]); |
651 | prim.Name = (String)row["Name"]; | 650 | prim.Name = (String) row["Name"]; |
652 | // various text fields | 651 | // various text fields |
653 | prim.Text = (String)row["Text"]; | 652 | prim.Text = (String) row["Text"]; |
654 | prim.Description = (String)row["Description"]; | 653 | prim.Description = (String) row["Description"]; |
655 | prim.SitName = (String)row["SitName"]; | 654 | prim.SitName = (String) row["SitName"]; |
656 | prim.TouchName = (String)row["TouchName"]; | 655 | prim.TouchName = (String) row["TouchName"]; |
657 | // permissions | 656 | // permissions |
658 | prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); | 657 | prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); |
659 | prim.CreatorID = new LLUUID((String)row["CreatorID"]); | 658 | prim.CreatorID = new LLUUID((String) row["CreatorID"]); |
660 | prim.OwnerID = new LLUUID((String)row["OwnerID"]); | 659 | prim.OwnerID = new LLUUID((String) row["OwnerID"]); |
661 | prim.GroupID = new LLUUID((String)row["GroupID"]); | 660 | prim.GroupID = new LLUUID((String) row["GroupID"]); |
662 | prim.LastOwnerID = new LLUUID((String)row["LastOwnerID"]); | 661 | prim.LastOwnerID = new LLUUID((String) row["LastOwnerID"]); |
663 | prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); | 662 | prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); |
664 | prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); | 663 | prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); |
665 | prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); | 664 | prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); |
@@ -701,19 +700,27 @@ namespace OpenSim.Framework.Data.MySQL | |||
701 | try | 700 | try |
702 | { | 701 | { |
703 | prim.SetSitTargetLL(new LLVector3( | 702 | prim.SetSitTargetLL(new LLVector3( |
704 | Convert.ToSingle(row["SitTargetOffsetX"]), | 703 | Convert.ToSingle(row["SitTargetOffsetX"]), |
705 | Convert.ToSingle(row["SitTargetOffsetY"]), | 704 | Convert.ToSingle(row["SitTargetOffsetY"]), |
706 | Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion( | 705 | Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion( |
707 | Convert.ToSingle(row["SitTargetOrientX"]), | 706 | Convert.ToSingle( |
708 | Convert.ToSingle(row["SitTargetOrientY"]), | 707 | row["SitTargetOrientX"]), |
709 | Convert.ToSingle(row["SitTargetOrientZ"]), | 708 | Convert.ToSingle( |
710 | Convert.ToSingle(row["SitTargetOrientW"]))); | 709 | row["SitTargetOrientY"]), |
710 | Convert.ToSingle( | ||
711 | row["SitTargetOrientZ"]), | ||
712 | Convert.ToSingle( | ||
713 | row["SitTargetOrientW"]))); | ||
711 | } | 714 | } |
712 | catch (System.InvalidCastException) | 715 | catch (InvalidCastException) |
713 | { | 716 | { |
714 | // Database table was created before we got here and needs to be created! :P | 717 | // Database table was created before we got here and needs to be created! :P |
715 | 718 | ||
716 | using (MySqlCommand cmd = new MySqlCommand("ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;", m_connection)) | 719 | using ( |
720 | MySqlCommand cmd = | ||
721 | new MySqlCommand( | ||
722 | "ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;", | ||
723 | m_connection)) | ||
717 | { | 724 | { |
718 | cmd.ExecuteNonQuery(); | 725 | cmd.ExecuteNonQuery(); |
719 | } | 726 | } |
@@ -725,36 +732,42 @@ namespace OpenSim.Framework.Data.MySQL | |||
725 | { | 732 | { |
726 | LandData newData = new LandData(); | 733 | LandData newData = new LandData(); |
727 | 734 | ||
728 | newData.globalID = new LLUUID((String)row["UUID"]); | 735 | newData.globalID = new LLUUID((String) row["UUID"]); |
729 | newData.localID = Convert.ToInt32(row["LocalLandID"]); | 736 | newData.localID = Convert.ToInt32(row["LocalLandID"]); |
730 | 737 | ||
731 | // Bitmap is a byte[512] | 738 | // Bitmap is a byte[512] |
732 | newData.landBitmapByteArray = (Byte[])row["Bitmap"]; | 739 | newData.landBitmapByteArray = (Byte[]) row["Bitmap"]; |
733 | 740 | ||
734 | newData.landName = (String)row["Name"]; | 741 | newData.landName = (String) row["Name"]; |
735 | newData.landDesc = (String)row["Description"]; | 742 | newData.landDesc = (String) row["Description"]; |
736 | newData.ownerID = (String)row["OwnerUUID"]; | 743 | newData.ownerID = (String) row["OwnerUUID"]; |
737 | newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); | 744 | newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); |
738 | newData.area = Convert.ToInt32(row["Area"]); | 745 | newData.area = Convert.ToInt32(row["Area"]); |
739 | newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented | 746 | newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented |
740 | newData.category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]); //Enum libsecondlife.Parcel.ParcelCategory | 747 | newData.category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); |
748 | //Enum libsecondlife.Parcel.ParcelCategory | ||
741 | newData.claimDate = Convert.ToInt32(row["ClaimDate"]); | 749 | newData.claimDate = Convert.ToInt32(row["ClaimDate"]); |
742 | newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]); | 750 | newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]); |
743 | newData.groupID = new LLUUID((String)row["GroupUUID"]); | 751 | newData.groupID = new LLUUID((String) row["GroupUUID"]); |
744 | newData.salePrice = Convert.ToInt32(row["SalePrice"]); | 752 | newData.salePrice = Convert.ToInt32(row["SalePrice"]); |
745 | newData.landStatus = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]); //Enum. libsecondlife.Parcel.ParcelStatus | 753 | newData.landStatus = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); |
754 | //Enum. libsecondlife.Parcel.ParcelStatus | ||
746 | newData.landFlags = Convert.ToUInt32(row["LandFlags"]); | 755 | newData.landFlags = Convert.ToUInt32(row["LandFlags"]); |
747 | newData.landingType = Convert.ToByte(row["LandingType"]); | 756 | newData.landingType = Convert.ToByte(row["LandingType"]); |
748 | newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); | 757 | newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); |
749 | newData.mediaID = new LLUUID((String)row["MediaTextureUUID"]); | 758 | newData.mediaID = new LLUUID((String) row["MediaTextureUUID"]); |
750 | newData.mediaURL = (String)row["MediaURL"]; | 759 | newData.mediaURL = (String) row["MediaURL"]; |
751 | newData.musicURL = (String)row["MusicURL"]; | 760 | newData.musicURL = (String) row["MusicURL"]; |
752 | newData.passHours = Convert.ToSingle(row["PassHours"]); | 761 | newData.passHours = Convert.ToSingle(row["PassHours"]); |
753 | newData.passPrice = Convert.ToInt32(row["PassPrice"]); | 762 | newData.passPrice = Convert.ToInt32(row["PassPrice"]); |
754 | newData.snapshotID = (String)row["SnapshotUUID"]; | 763 | newData.snapshotID = (String) row["SnapshotUUID"]; |
755 | 764 | ||
756 | newData.userLocation = new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), Convert.ToSingle(row["UserLocationZ"])); | 765 | newData.userLocation = |
757 | newData.userLookAt = new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), Convert.ToSingle(row["UserLookAtZ"])); | 766 | new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), |
767 | Convert.ToSingle(row["UserLocationZ"])); | ||
768 | newData.userLookAt = | ||
769 | new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), | ||
770 | Convert.ToSingle(row["UserLookAtZ"])); | ||
758 | newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); | 771 | newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); |
759 | 772 | ||
760 | return newData; | 773 | return newData; |
@@ -763,7 +776,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
763 | private ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) | 776 | private ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) |
764 | { | 777 | { |
765 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 778 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
766 | entry.AgentID = new LLUUID((string)row["AccessUUID"]); | 779 | entry.AgentID = new LLUUID((string) row["AccessUUID"]); |
767 | entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]); | 780 | entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]); |
768 | entry.Time = new DateTime(); | 781 | entry.Time = new DateTime(); |
769 | return entry; | 782 | return entry; |
@@ -771,7 +784,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
771 | 784 | ||
772 | private Array serializeTerrain(double[,] val) | 785 | private Array serializeTerrain(double[,] val) |
773 | { | 786 | { |
774 | MemoryStream str = new MemoryStream(65536 * sizeof(double)); | 787 | MemoryStream str = new MemoryStream(65536*sizeof (double)); |
775 | BinaryWriter bw = new BinaryWriter(str); | 788 | BinaryWriter bw = new BinaryWriter(str); |
776 | 789 | ||
777 | // TODO: COMPATIBILITY - Add byte-order conversions | 790 | // TODO: COMPATIBILITY - Add byte-order conversions |
@@ -789,7 +802,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
789 | row["ParentID"] = prim.ParentID; | 802 | row["ParentID"] = prim.ParentID; |
790 | row["CreationDate"] = prim.CreationDate; | 803 | row["CreationDate"] = prim.CreationDate; |
791 | row["Name"] = prim.Name; | 804 | row["Name"] = prim.Name; |
792 | row["SceneGroupID"] = Util.ToRawUuidString(sceneGroupID); // the UUID of the root part for this SceneObjectGroup | 805 | row["SceneGroupID"] = Util.ToRawUuidString(sceneGroupID); |
806 | // the UUID of the root part for this SceneObjectGroup | ||
793 | // various text fields | 807 | // various text fields |
794 | row["Text"] = prim.Text; | 808 | row["Text"] = prim.Text; |
795 | row["Description"] = prim.Description; | 809 | row["Description"] = prim.Description; |
@@ -841,18 +855,20 @@ namespace OpenSim.Framework.Data.MySQL | |||
841 | row["SitTargetOrientX"] = sitTargetOrient.X; | 855 | row["SitTargetOrientX"] = sitTargetOrient.X; |
842 | row["SitTargetOrientY"] = sitTargetOrient.Y; | 856 | row["SitTargetOrientY"] = sitTargetOrient.Y; |
843 | row["SitTargetOrientZ"] = sitTargetOrient.Z; | 857 | row["SitTargetOrientZ"] = sitTargetOrient.Z; |
844 | } | 858 | } |
845 | catch (MySql.Data.MySqlClient.MySqlException) | 859 | catch (MySqlException) |
846 | { | 860 | { |
847 | // Database table was created before we got here and needs to be created! :P | 861 | // Database table was created before we got here and needs to be created! :P |
848 | 862 | ||
849 | using (MySqlCommand cmd = new MySqlCommand("ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;", m_connection)) | 863 | using ( |
864 | MySqlCommand cmd = | ||
865 | new MySqlCommand( | ||
866 | "ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;", | ||
867 | m_connection)) | ||
850 | { | 868 | { |
851 | cmd.ExecuteNonQuery(); | 869 | cmd.ExecuteNonQuery(); |
852 | } | 870 | } |
853 | } | 871 | } |
854 | |||
855 | |||
856 | } | 872 | } |
857 | 873 | ||
858 | private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) | 874 | private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) |
@@ -929,11 +945,11 @@ namespace OpenSim.Framework.Data.MySQL | |||
929 | s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); | 945 | s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); |
930 | s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); | 946 | s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); |
931 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); | 947 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); |
932 | 948 | ||
933 | byte[] textureEntry = (byte[])row["Texture"]; | 949 | byte[] textureEntry = (byte[]) row["Texture"]; |
934 | s.TextureEntry = textureEntry; | 950 | s.TextureEntry = textureEntry; |
935 | 951 | ||
936 | s.ExtraParams = (byte[])row["ExtraParams"]; | 952 | s.ExtraParams = (byte[]) row["ExtraParams"]; |
937 | 953 | ||
938 | return s; | 954 | return s; |
939 | } | 955 | } |
@@ -1146,7 +1162,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1146 | da.UpdateCommand = updateCommand; | 1162 | da.UpdateCommand = updateCommand; |
1147 | 1163 | ||
1148 | MySqlCommand delete = new MySqlCommand("delete from prims where UUID=?UUID"); | 1164 | MySqlCommand delete = new MySqlCommand("delete from prims where UUID=?UUID"); |
1149 | delete.Parameters.Add(createMySqlParameter("UUID", typeof(String))); | 1165 | delete.Parameters.Add(createMySqlParameter("UUID", typeof (String))); |
1150 | delete.Connection = conn; | 1166 | delete.Connection = conn; |
1151 | da.DeleteCommand = delete; | 1167 | da.DeleteCommand = delete; |
1152 | } | 1168 | } |
@@ -1181,7 +1197,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1181 | da.UpdateCommand.Connection = conn; | 1197 | da.UpdateCommand.Connection = conn; |
1182 | 1198 | ||
1183 | MySqlCommand delete = new MySqlCommand("delete from primshapes where UUID = ?UUID"); | 1199 | MySqlCommand delete = new MySqlCommand("delete from primshapes where UUID = ?UUID"); |
1184 | delete.Parameters.Add(createMySqlParameter("UUID", typeof(String))); | 1200 | delete.Parameters.Add(createMySqlParameter("UUID", typeof (String))); |
1185 | delete.Connection = conn; | 1201 | delete.Connection = conn; |
1186 | da.DeleteCommand = delete; | 1202 | da.DeleteCommand = delete; |
1187 | } | 1203 | } |
@@ -1337,27 +1353,27 @@ namespace OpenSim.Framework.Data.MySQL | |||
1337 | 1353 | ||
1338 | private DbType dbtypeFromType(Type type) | 1354 | private DbType dbtypeFromType(Type type) |
1339 | { | 1355 | { |
1340 | if (type == typeof(String)) | 1356 | if (type == typeof (String)) |
1341 | { | 1357 | { |
1342 | return DbType.String; | 1358 | return DbType.String; |
1343 | } | 1359 | } |
1344 | else if (type == typeof(Int32)) | 1360 | else if (type == typeof (Int32)) |
1345 | { | 1361 | { |
1346 | return DbType.Int32; | 1362 | return DbType.Int32; |
1347 | } | 1363 | } |
1348 | else if (type == typeof(Double)) | 1364 | else if (type == typeof (Double)) |
1349 | { | 1365 | { |
1350 | return DbType.Double; | 1366 | return DbType.Double; |
1351 | } | 1367 | } |
1352 | else if (type == typeof(Byte)) | 1368 | else if (type == typeof (Byte)) |
1353 | { | 1369 | { |
1354 | return DbType.Byte; | 1370 | return DbType.Byte; |
1355 | } | 1371 | } |
1356 | else if (type == typeof(Double)) | 1372 | else if (type == typeof (Double)) |
1357 | { | 1373 | { |
1358 | return DbType.Double; | 1374 | return DbType.Double; |
1359 | } | 1375 | } |
1360 | else if (type == typeof(Byte[])) | 1376 | else if (type == typeof (Byte[])) |
1361 | { | 1377 | { |
1362 | return DbType.Binary; | 1378 | return DbType.Binary; |
1363 | } | 1379 | } |
@@ -1371,19 +1387,19 @@ namespace OpenSim.Framework.Data.MySQL | |||
1371 | // slightly differently. | 1387 | // slightly differently. |
1372 | private string MySqlType(Type type) | 1388 | private string MySqlType(Type type) |
1373 | { | 1389 | { |
1374 | if (type == typeof(String)) | 1390 | if (type == typeof (String)) |
1375 | { | 1391 | { |
1376 | return "varchar(255)"; | 1392 | return "varchar(255)"; |
1377 | } | 1393 | } |
1378 | else if (type == typeof(Int32)) | 1394 | else if (type == typeof (Int32)) |
1379 | { | 1395 | { |
1380 | return "integer"; | 1396 | return "integer"; |
1381 | } | 1397 | } |
1382 | else if (type == typeof(Double)) | 1398 | else if (type == typeof (Double)) |
1383 | { | 1399 | { |
1384 | return "float"; | 1400 | return "float"; |
1385 | } | 1401 | } |
1386 | else if (type == typeof(Byte[])) | 1402 | else if (type == typeof (Byte[])) |
1387 | { | 1403 | { |
1388 | return "longblob"; | 1404 | return "longblob"; |
1389 | } | 1405 | } |
@@ -1393,4 +1409,4 @@ namespace OpenSim.Framework.Data.MySQL | |||
1393 | } | 1409 | } |
1394 | } | 1410 | } |
1395 | } | 1411 | } |
1396 | } | 1412 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs index 7843562..7cfac12 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Data; | 31 | using System.Data; |
32 | using System.Security.Cryptography; | 32 | using System.Security.Cryptography; |
33 | using System.Text; | 33 | using System.Text; |
34 | using System.Text.RegularExpressions; | ||
34 | using libsecondlife; | 35 | using libsecondlife; |
35 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
36 | 37 | ||
@@ -62,7 +63,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
62 | database = | 63 | database = |
63 | new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, | 64 | new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, |
64 | settingPort); | 65 | settingPort); |
65 | 66 | ||
66 | TestTables(); | 67 | TestTables(); |
67 | } | 68 | } |
68 | 69 | ||
@@ -80,7 +81,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
80 | 81 | ||
81 | UpgradeRegionsTable(tableList["regions"]); | 82 | UpgradeRegionsTable(tableList["regions"]); |
82 | } | 83 | } |
83 | 84 | ||
84 | /// <summary> | 85 | /// <summary> |
85 | /// Create or upgrade the table if necessary | 86 | /// Create or upgrade the table if necessary |
86 | /// </summary> | 87 | /// </summary> |
@@ -94,10 +95,10 @@ namespace OpenSim.Framework.Data.MySQL | |||
94 | database.ExecuteResourceSql("CreateRegionsTable.sql"); | 95 | database.ExecuteResourceSql("CreateRegionsTable.sql"); |
95 | return; | 96 | return; |
96 | } | 97 | } |
97 | } | 98 | } |
98 | 99 | ||
99 | #endregion | 100 | #endregion |
100 | 101 | ||
101 | /// <summary> | 102 | /// <summary> |
102 | /// Shuts down the grid interface | 103 | /// Shuts down the grid interface |
103 | /// </summary> | 104 | /// </summary> |
@@ -203,42 +204,41 @@ namespace OpenSim.Framework.Data.MySQL | |||
203 | return null; | 204 | return null; |
204 | } | 205 | } |
205 | } | 206 | } |
207 | |||
206 | /// <summary> | 208 | /// <summary> |
207 | /// // Returns a list of avatar and UUIDs that match the query | 209 | /// // Returns a list of avatar and UUIDs that match the query |
208 | /// </summary> | 210 | /// </summary> |
209 | |||
210 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 211 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
211 | { | 212 | { |
212 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); | 213 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); |
213 | 214 | ||
214 | System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]"); | 215 | Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]"); |
215 | 216 | ||
216 | string[] querysplit; | 217 | string[] querysplit; |
217 | querysplit = query.Split(' '); | 218 | querysplit = query.Split(' '); |
218 | if (querysplit.Length == 2) | 219 | if (querysplit.Length == 2) |
219 | { | 220 | { |
220 | Dictionary<string, string> param = new Dictionary<string, string>(); | 221 | Dictionary<string, string> param = new Dictionary<string, string>(); |
221 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0],"") + "%"; | 222 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], "") + "%"; |
222 | param["?second"] = objAlphaNumericPattern.Replace(querysplit[1], "") + "%"; | 223 | param["?second"] = objAlphaNumericPattern.Replace(querysplit[1], "") + "%"; |
223 | try | 224 | try |
224 | { | 225 | { |
225 | lock (database) | 226 | lock (database) |
226 | { | 227 | { |
227 | |||
228 | |||
229 | IDbCommand result = | 228 | IDbCommand result = |
230 | database.Query("SELECT UUID,username,surname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100", param); | 229 | database.Query( |
230 | "SELECT UUID,username,surname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100", | ||
231 | param); | ||
231 | IDataReader reader = result.ExecuteReader(); | 232 | IDataReader reader = result.ExecuteReader(); |
232 | 233 | ||
233 | 234 | ||
234 | while (reader.Read()) | 235 | while (reader.Read()) |
235 | { | 236 | { |
236 | AvatarPickerAvatar user = new AvatarPickerAvatar(); | 237 | AvatarPickerAvatar user = new AvatarPickerAvatar(); |
237 | user.AvatarID = new LLUUID((string)reader["UUID"]); | 238 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
238 | user.firstName = (string)reader["username"]; | 239 | user.firstName = (string) reader["username"]; |
239 | user.lastName = (string)reader["surname"]; | 240 | user.lastName = (string) reader["surname"]; |
240 | returnlist.Add(user); | 241 | returnlist.Add(user); |
241 | |||
242 | } | 242 | } |
243 | reader.Close(); | 243 | reader.Close(); |
244 | result.Dispose(); | 244 | result.Dispose(); |
@@ -250,33 +250,30 @@ namespace OpenSim.Framework.Data.MySQL | |||
250 | MainLog.Instance.Error(e.ToString()); | 250 | MainLog.Instance.Error(e.ToString()); |
251 | return returnlist; | 251 | return returnlist; |
252 | } | 252 | } |
253 | |||
254 | |||
255 | |||
256 | } | 253 | } |
257 | else if (querysplit.Length == 1) | 254 | else if (querysplit.Length == 1) |
258 | { | 255 | { |
259 | |||
260 | try | 256 | try |
261 | { | 257 | { |
262 | lock (database) | 258 | lock (database) |
263 | { | 259 | { |
264 | Dictionary<string, string> param = new Dictionary<string, string>(); | 260 | Dictionary<string, string> param = new Dictionary<string, string>(); |
265 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0],"") + "%"; | 261 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], "") + "%"; |
266 | 262 | ||
267 | IDbCommand result = | 263 | IDbCommand result = |
268 | database.Query("SELECT UUID,username,surname FROM users WHERE username like ?first OR lastname like ?second", param); | 264 | database.Query( |
265 | "SELECT UUID,username,surname FROM users WHERE username like ?first OR lastname like ?second", | ||
266 | param); | ||
269 | IDataReader reader = result.ExecuteReader(); | 267 | IDataReader reader = result.ExecuteReader(); |
270 | 268 | ||
271 | 269 | ||
272 | while (reader.Read()) | 270 | while (reader.Read()) |
273 | { | 271 | { |
274 | AvatarPickerAvatar user = new AvatarPickerAvatar(); | 272 | AvatarPickerAvatar user = new AvatarPickerAvatar(); |
275 | user.AvatarID = new LLUUID((string)reader["UUID"]); | 273 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
276 | user.firstName = (string)reader["username"]; | 274 | user.firstName = (string) reader["username"]; |
277 | user.lastName = (string)reader["surname"]; | 275 | user.lastName = (string) reader["surname"]; |
278 | returnlist.Add(user); | 276 | returnlist.Add(user); |
279 | |||
280 | } | 277 | } |
281 | reader.Close(); | 278 | reader.Close(); |
282 | result.Dispose(); | 279 | result.Dispose(); |
@@ -413,4 +410,4 @@ namespace OpenSim.Framework.Data.MySQL | |||
413 | } | 410 | } |
414 | } | 411 | } |
415 | } | 412 | } |
416 | } | 413 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs index a47a126..c317f4a 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | |||
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
232 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); | 232 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); |
233 | while (reader.Read()) | 233 | while (reader.Read()) |
234 | items.Add(readInventoryFolder(reader)); | 234 | items.Add(readInventoryFolder(reader)); |
235 | 235 | ||
236 | InventoryFolderBase rootFolder = null; | 236 | InventoryFolderBase rootFolder = null; |
237 | 237 | ||
238 | // There should only ever be one root folder for a user. However, if there's more | 238 | // There should only ever be one root folder for a user. However, if there's more |
@@ -637,4 +637,4 @@ namespace OpenSim.Framework.Data.MySQL | |||
637 | } | 637 | } |
638 | } | 638 | } |
639 | } | 639 | } |
640 | } | 640 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLLogData.cs b/OpenSim/Framework/Data.MySQL/MySQLLogData.cs index eda5cc5..d2605fa 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLLogData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLLogData.cs | |||
@@ -103,4 +103,4 @@ namespace OpenSim.Framework.Data.MySQL | |||
103 | return "0.1"; | 103 | return "0.1"; |
104 | } | 104 | } |
105 | } | 105 | } |
106 | } | 106 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index d652db8..96f0c4d 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs | |||
@@ -666,4 +666,4 @@ namespace OpenSim.Framework.Data.MySQL | |||
666 | return returnval; | 666 | return returnval; |
667 | } | 667 | } |
668 | } | 668 | } |
669 | } | 669 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs index 4b86d80..2d96f6e 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Text.RegularExpressions; | ||
31 | using libsecondlife; | 32 | using libsecondlife; |
32 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
33 | 34 | ||
@@ -61,7 +62,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
61 | database = | 62 | database = |
62 | new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, | 63 | new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, |
63 | settingPort); | 64 | settingPort); |
64 | 65 | ||
65 | TestTables(); | 66 | TestTables(); |
66 | } | 67 | } |
67 | 68 | ||
@@ -81,7 +82,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
81 | UpgradeAgentsTable(tableList["agents"]); | 82 | UpgradeAgentsTable(tableList["agents"]); |
82 | UpgradeUsersTable(tableList["users"]); | 83 | UpgradeUsersTable(tableList["users"]); |
83 | } | 84 | } |
84 | 85 | ||
85 | /// <summary> | 86 | /// <summary> |
86 | /// Create or upgrade the table if necessary | 87 | /// Create or upgrade the table if necessary |
87 | /// </summary> | 88 | /// </summary> |
@@ -95,8 +96,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
95 | database.ExecuteResourceSql("CreateAgentsTable.sql"); | 96 | database.ExecuteResourceSql("CreateAgentsTable.sql"); |
96 | return; | 97 | return; |
97 | } | 98 | } |
98 | } | 99 | } |
99 | 100 | ||
100 | /// <summary> | 101 | /// <summary> |
101 | /// Create or upgrade the table if necessary | 102 | /// Create or upgrade the table if necessary |
102 | /// </summary> | 103 | /// </summary> |
@@ -110,8 +111,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
110 | database.ExecuteResourceSql("CreateUsersTable.sql"); | 111 | database.ExecuteResourceSql("CreateUsersTable.sql"); |
111 | return; | 112 | return; |
112 | } | 113 | } |
113 | } | 114 | } |
114 | 115 | ||
115 | #endregion | 116 | #endregion |
116 | 117 | ||
117 | // see IUserData | 118 | // see IUserData |
@@ -144,11 +145,11 @@ namespace OpenSim.Framework.Data.MySQL | |||
144 | } | 145 | } |
145 | } | 146 | } |
146 | 147 | ||
147 | public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 148 | public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
148 | { | 149 | { |
149 | List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>(); | 150 | List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>(); |
150 | 151 | ||
151 | System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]"); | 152 | Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]"); |
152 | 153 | ||
153 | string[] querysplit; | 154 | string[] querysplit; |
154 | querysplit = query.Split(' '); | 155 | querysplit = query.Split(' '); |
@@ -161,21 +162,20 @@ namespace OpenSim.Framework.Data.MySQL | |||
161 | { | 162 | { |
162 | lock (database) | 163 | lock (database) |
163 | { | 164 | { |
164 | |||
165 | |||
166 | IDbCommand result = | 165 | IDbCommand result = |
167 | database.Query("SELECT UUID,username,lastname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100", param); | 166 | database.Query( |
167 | "SELECT UUID,username,lastname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100", | ||
168 | param); | ||
168 | IDataReader reader = result.ExecuteReader(); | 169 | IDataReader reader = result.ExecuteReader(); |
169 | 170 | ||
170 | 171 | ||
171 | while (reader.Read()) | 172 | while (reader.Read()) |
172 | { | 173 | { |
173 | OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar(); | 174 | Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); |
174 | user.AvatarID = new LLUUID((string)reader["UUID"]); | 175 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
175 | user.firstName = (string)reader["username"]; | 176 | user.firstName = (string) reader["username"]; |
176 | user.lastName = (string)reader["lastname"]; | 177 | user.lastName = (string) reader["lastname"]; |
177 | returnlist.Add(user); | 178 | returnlist.Add(user); |
178 | |||
179 | } | 179 | } |
180 | reader.Close(); | 180 | reader.Close(); |
181 | result.Dispose(); | 181 | result.Dispose(); |
@@ -187,13 +187,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
187 | MainLog.Instance.Error(e.ToString()); | 187 | MainLog.Instance.Error(e.ToString()); |
188 | return returnlist; | 188 | return returnlist; |
189 | } | 189 | } |
190 | |||
191 | |||
192 | |||
193 | } | 190 | } |
194 | else if (querysplit.Length == 1) | 191 | else if (querysplit.Length == 1) |
195 | { | 192 | { |
196 | |||
197 | try | 193 | try |
198 | { | 194 | { |
199 | lock (database) | 195 | lock (database) |
@@ -202,18 +198,19 @@ namespace OpenSim.Framework.Data.MySQL | |||
202 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], "") + "%"; | 198 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], "") + "%"; |
203 | 199 | ||
204 | IDbCommand result = | 200 | IDbCommand result = |
205 | database.Query("SELECT UUID,username,lastname FROM users WHERE username like ?first OR lastname like ?first LIMIT 100", param); | 201 | database.Query( |
202 | "SELECT UUID,username,lastname FROM users WHERE username like ?first OR lastname like ?first LIMIT 100", | ||
203 | param); | ||
206 | IDataReader reader = result.ExecuteReader(); | 204 | IDataReader reader = result.ExecuteReader(); |
207 | 205 | ||
208 | 206 | ||
209 | while (reader.Read()) | 207 | while (reader.Read()) |
210 | { | 208 | { |
211 | OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar(); | 209 | Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); |
212 | user.AvatarID = new LLUUID((string)reader["UUID"]); | 210 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
213 | user.firstName = (string)reader["username"]; | 211 | user.firstName = (string) reader["username"]; |
214 | user.lastName = (string)reader["lastname"]; | 212 | user.lastName = (string) reader["lastname"]; |
215 | returnlist.Add(user); | 213 | returnlist.Add(user); |
216 | |||
217 | } | 214 | } |
218 | reader.Close(); | 215 | reader.Close(); |
219 | result.Dispose(); | 216 | result.Dispose(); |
@@ -402,4 +399,4 @@ namespace OpenSim.Framework.Data.MySQL | |||
402 | return "0.1"; | 399 | return "0.1"; |
403 | } | 400 | } |
404 | } | 401 | } |
405 | } | 402 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs index 3723343..462c433 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | |||
@@ -313,4 +313,4 @@ namespace OpenSim.Framework.Data.SQLite | |||
313 | 313 | ||
314 | #endregion | 314 | #endregion |
315 | } | 315 | } |
316 | } | 316 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteBase.cs b/OpenSim/Framework/Data.SQLite/SQLiteBase.cs index d9aaa97..2e8d341 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteBase.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteBase.cs | |||
@@ -263,4 +263,4 @@ namespace OpenSim.Framework.Data.SQLite | |||
263 | } | 263 | } |
264 | } | 264 | } |
265 | } | 265 | } |
266 | } | 266 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs index dddc085..4b790c3 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs | |||
@@ -130,16 +130,17 @@ namespace OpenSim.Framework.Data.SQLite | |||
130 | 130 | ||
131 | return row; | 131 | return row; |
132 | } | 132 | } |
133 | |||
133 | /// <summary> | 134 | /// <summary> |
134 | /// // Returns a list of avatar and UUIDs that match the query | 135 | /// // Returns a list of avatar and UUIDs that match the query |
135 | /// </summary> | 136 | /// </summary> |
136 | |||
137 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 137 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
138 | { | 138 | { |
139 | //Do nothing yet | 139 | //Do nothing yet |
140 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); | 140 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); |
141 | return returnlist; | 141 | return returnlist; |
142 | } | 142 | } |
143 | |||
143 | /// <summary> | 144 | /// <summary> |
144 | /// Adds a new specified region to the database | 145 | /// Adds a new specified region to the database |
145 | /// </summary> | 146 | /// </summary> |
@@ -201,4 +202,4 @@ namespace OpenSim.Framework.Data.SQLite | |||
201 | return null; | 202 | return null; |
202 | } | 203 | } |
203 | } | 204 | } |
204 | } | 205 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs index c696259..64a27f0 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |||
@@ -159,6 +159,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
159 | 159 | ||
160 | invFoldersDa.Update(ds, "inventoryfolders"); | 160 | invFoldersDa.Update(ds, "inventoryfolders"); |
161 | } | 161 | } |
162 | |||
162 | private void addItem(InventoryItemBase item) | 163 | private void addItem(InventoryItemBase item) |
163 | { | 164 | { |
164 | DataTable inventoryItemTable = ds.Tables["inventoryitems"]; | 165 | DataTable inventoryItemTable = ds.Tables["inventoryitems"]; |
@@ -248,7 +249,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
248 | { | 249 | { |
249 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 250 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
250 | DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; | 251 | DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; |
251 | string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" + Util.ToRawUuidString(LLUUID.Zero) + "'"; | 252 | string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" + |
253 | Util.ToRawUuidString(LLUUID.Zero) + "'"; | ||
252 | DataRow[] rows = inventoryFolderTable.Select(selectExp); | 254 | DataRow[] rows = inventoryFolderTable.Select(selectExp); |
253 | foreach (DataRow row in rows) | 255 | foreach (DataRow row in rows) |
254 | { | 256 | { |
@@ -627,4 +629,4 @@ namespace OpenSim.Framework.Data.SQLite | |||
627 | return true; | 629 | return true; |
628 | } | 630 | } |
629 | } | 631 | } |
630 | } | 632 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs index cac37d4..a97b146 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs | |||
@@ -275,4 +275,4 @@ namespace OpenSim.Framework.Data.SQLite | |||
275 | return returnval; | 275 | return returnval; |
276 | } | 276 | } |
277 | } | 277 | } |
278 | } | 278 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index 811e0fa..a719fa2 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | |||
@@ -30,7 +30,6 @@ using System.Collections.Generic; | |||
30 | using System.Data; | 30 | using System.Data; |
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | using Mono.Data.SqliteClient; | 32 | using Mono.Data.SqliteClient; |
33 | using OpenSim.Framework; | ||
34 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
35 | 34 | ||
36 | namespace OpenSim.Framework.Data.SQLite | 35 | namespace OpenSim.Framework.Data.SQLite |
@@ -38,7 +37,6 @@ namespace OpenSim.Framework.Data.SQLite | |||
38 | /// <summary> | 37 | /// <summary> |
39 | /// A User storage interface for the SQLite database system | 38 | /// A User storage interface for the SQLite database system |
40 | /// </summary> | 39 | /// </summary> |
41 | |||
42 | public class SQLiteUserData : SQLiteBase, IUserData | 40 | public class SQLiteUserData : SQLiteBase, IUserData |
43 | { | 41 | { |
44 | /// <summary> | 42 | /// <summary> |
@@ -119,46 +117,46 @@ namespace OpenSim.Framework.Data.SQLite | |||
119 | } | 117 | } |
120 | } | 118 | } |
121 | 119 | ||
122 | public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 120 | public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
123 | { | 121 | { |
124 | List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>(); | 122 | List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>(); |
125 | string[] querysplit; | 123 | string[] querysplit; |
126 | querysplit = query.Split(' '); | 124 | querysplit = query.Split(' '); |
127 | if (querysplit.Length == 2) | 125 | if (querysplit.Length == 2) |
128 | { | 126 | { |
129 | string select = "username like '" + querysplit[0] + "%' and surname like '" + querysplit[1] + "%'"; | 127 | string select = "username like '" + querysplit[0] + "%' and surname like '" + querysplit[1] + "%'"; |
130 | lock(ds) | 128 | lock (ds) |
131 | { | 129 | { |
132 | DataRow[] rows = ds.Tables["users"].Select(select); | 130 | DataRow[] rows = ds.Tables["users"].Select(select); |
133 | if (rows.Length > 0) | 131 | if (rows.Length > 0) |
134 | { | 132 | { |
135 | for (int i = 0; i < rows.Length; i++) | 133 | for (int i = 0; i < rows.Length; i++) |
136 | { | 134 | { |
137 | OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar(); | 135 | Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); |
138 | DataRow row = rows[i]; | 136 | DataRow row = rows[i]; |
139 | user.AvatarID = new LLUUID((string)row["UUID"]); | 137 | user.AvatarID = new LLUUID((string) row["UUID"]); |
140 | user.firstName = (string)row["username"]; | 138 | user.firstName = (string) row["username"]; |
141 | user.lastName = (string)row["surname"]; | 139 | user.lastName = (string) row["surname"]; |
142 | returnlist.Add(user); | 140 | returnlist.Add(user); |
143 | } | 141 | } |
144 | } | 142 | } |
145 | } | 143 | } |
146 | } | 144 | } |
147 | else if (querysplit.Length == 1) | 145 | else if (querysplit.Length == 1) |
148 | { | 146 | { |
149 | |||
150 | string select = "username like '" + querysplit[0] + "%' OR surname like '" + querysplit[0] + "%'"; | 147 | string select = "username like '" + querysplit[0] + "%' OR surname like '" + querysplit[0] + "%'"; |
151 | lock(ds) | 148 | lock (ds) |
152 | { | 149 | { |
153 | DataRow[] rows = ds.Tables["users"].Select(select); | 150 | DataRow[] rows = ds.Tables["users"].Select(select); |
154 | if (rows.Length > 0) | 151 | if (rows.Length > 0) |
155 | { | 152 | { |
156 | for (int i = 0;i<rows.Length;i++) { | 153 | for (int i = 0; i < rows.Length; i++) |
157 | OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar(); | 154 | { |
155 | Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); | ||
158 | DataRow row = rows[i]; | 156 | DataRow row = rows[i]; |
159 | user.AvatarID = new LLUUID((string)row[0]); | 157 | user.AvatarID = new LLUUID((string) row[0]); |
160 | user.firstName = (string)row[1]; | 158 | user.firstName = (string) row[1]; |
161 | user.lastName = (string)row[2]; | 159 | user.lastName = (string) row[2]; |
162 | returnlist.Add(user); | 160 | returnlist.Add(user); |
163 | } | 161 | } |
164 | } | 162 | } |
@@ -166,6 +164,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
166 | } | 164 | } |
167 | return returnlist; | 165 | return returnlist; |
168 | } | 166 | } |
167 | |||
169 | /// <summary> | 168 | /// <summary> |
170 | /// Returns a user by UUID direct | 169 | /// Returns a user by UUID direct |
171 | /// </summary> | 170 | /// </summary> |
@@ -263,7 +262,6 @@ namespace OpenSim.Framework.Data.SQLite | |||
263 | } | 262 | } |
264 | else | 263 | else |
265 | { | 264 | { |
266 | |||
267 | row.Delete(); | 265 | row.Delete(); |
268 | ua.AcceptChanges(); | 266 | ua.AcceptChanges(); |
269 | } | 267 | } |
@@ -595,4 +593,4 @@ namespace OpenSim.Framework.Data.SQLite | |||
595 | return true; | 593 | return true; |
596 | } | 594 | } |
597 | } | 595 | } |
598 | } | 596 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data/GridData.cs b/OpenSim/Framework/Data/GridData.cs index 7864dda..6072600 100644 --- a/OpenSim/Framework/Data/GridData.cs +++ b/OpenSim/Framework/Data/GridData.cs | |||
@@ -25,8 +25,8 @@ | |||
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 | */ |
28 | using libsecondlife; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using libsecondlife; | ||
30 | 30 | ||
31 | namespace OpenSim.Framework.Data | 31 | namespace OpenSim.Framework.Data |
32 | { | 32 | { |
@@ -35,10 +35,12 @@ namespace OpenSim.Framework.Data | |||
35 | public LLUUID AvatarID; | 35 | public LLUUID AvatarID; |
36 | public string firstName; | 36 | public string firstName; |
37 | public string lastName; | 37 | public string lastName; |
38 | |||
38 | public AvatarPickerAvatar() | 39 | public AvatarPickerAvatar() |
39 | { | 40 | { |
40 | } | 41 | } |
41 | } | 42 | } |
43 | |||
42 | public enum DataResponse | 44 | public enum DataResponse |
43 | { | 45 | { |
44 | RESPONSE_OK, | 46 | RESPONSE_OK, |
@@ -78,6 +80,7 @@ namespace OpenSim.Framework.Data | |||
78 | 80 | ||
79 | 81 | ||
80 | List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); | 82 | List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); |
83 | |||
81 | /// <summary> | 84 | /// <summary> |
82 | /// Authenticates a sim by use of its recv key. | 85 | /// Authenticates a sim by use of its recv key. |
83 | /// WARNING: Insecure | 86 | /// WARNING: Insecure |
@@ -119,4 +122,4 @@ namespace OpenSim.Framework.Data | |||
119 | 122 | ||
120 | ReservationData GetReservationAtPoint(uint x, uint y); | 123 | ReservationData GetReservationAtPoint(uint x, uint y); |
121 | } | 124 | } |
122 | } | 125 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data/ILogData.cs b/OpenSim/Framework/Data/ILogData.cs index 2c05f4f..8765b5c 100644 --- a/OpenSim/Framework/Data/ILogData.cs +++ b/OpenSim/Framework/Data/ILogData.cs | |||
@@ -88,4 +88,4 @@ namespace OpenSim.Framework.Data | |||
88 | /// <returns>A string containing the plugin version</returns> | 88 | /// <returns>A string containing the plugin version</returns> |
89 | string getVersion(); | 89 | string getVersion(); |
90 | } | 90 | } |
91 | } | 91 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data/IniConfig.cs b/OpenSim/Framework/Data/IniConfig.cs index 6b02553..6af9770 100644 --- a/OpenSim/Framework/Data/IniConfig.cs +++ b/OpenSim/Framework/Data/IniConfig.cs | |||
@@ -95,4 +95,4 @@ namespace OpenSim.Framework.Data | |||
95 | 95 | ||
96 | private string _iniFileName; | 96 | private string _iniFileName; |
97 | } | 97 | } |
98 | } | 98 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data/RegionProfileData.cs b/OpenSim/Framework/Data/RegionProfileData.cs index a1fe901..ec50baa 100644 --- a/OpenSim/Framework/Data/RegionProfileData.cs +++ b/OpenSim/Framework/Data/RegionProfileData.cs | |||
@@ -198,4 +198,4 @@ namespace OpenSim.Framework.Data | |||
198 | return simData; | 198 | return simData; |
199 | } | 199 | } |
200 | } | 200 | } |
201 | } | 201 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data/ReservationData.cs b/OpenSim/Framework/Data/ReservationData.cs index acab400..285f9ca 100644 --- a/OpenSim/Framework/Data/ReservationData.cs +++ b/OpenSim/Framework/Data/ReservationData.cs | |||
@@ -44,4 +44,4 @@ namespace OpenSim.Framework.Data | |||
44 | public string gridSendKey = ""; | 44 | public string gridSendKey = ""; |
45 | public string gridRecvKey = ""; | 45 | public string gridRecvKey = ""; |
46 | } | 46 | } |
47 | } | 47 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index b95ca83..8c9d7f4 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -482,7 +482,7 @@ namespace OpenSim.Framework | |||
482 | // I don't think there is a reason that this actually | 482 | // I don't think there is a reason that this actually |
483 | // needs to be written back to the estate settings | 483 | // needs to be written back to the estate settings |
484 | // file. | 484 | // file. |
485 | 485 | ||
486 | // configMember.forceSetConfigurationOption("terrain_image_id", m_terrainImageID.ToString()); | 486 | // configMember.forceSetConfigurationOption("terrain_image_id", m_terrainImageID.ToString()); |
487 | } | 487 | } |
488 | } | 488 | } |
@@ -708,4 +708,4 @@ namespace OpenSim.Framework | |||
708 | return true; | 708 | return true; |
709 | } | 709 | } |
710 | } | 710 | } |
711 | } | 711 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs index 799be46..8821010 100644 --- a/OpenSim/Framework/GridConfig.cs +++ b/OpenSim/Framework/GridConfig.cs | |||
@@ -93,7 +93,8 @@ namespace OpenSim.Framework | |||
93 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 93 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
94 | "Http Listener port", DefaultHttpPort.ToString(), false); | 94 | "Http Listener port", DefaultHttpPort.ToString(), false); |
95 | 95 | ||
96 | configMember.addConfigurationOption("allow_forceful_banlines", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 96 | configMember.addConfigurationOption("allow_forceful_banlines", |
97 | ConfigurationOption.ConfigurationTypes.TYPE_STRING, | ||
97 | "Allow Forceful Banlines", "TRUE", true); | 98 | "Allow Forceful Banlines", "TRUE", true); |
98 | } | 99 | } |
99 | 100 | ||
@@ -135,7 +136,7 @@ namespace OpenSim.Framework | |||
135 | HttpPort = (uint) configuration_result; | 136 | HttpPort = (uint) configuration_result; |
136 | break; | 137 | break; |
137 | case "allow_forceful_banlines": | 138 | case "allow_forceful_banlines": |
138 | AllowForcefulBanlines = (string)configuration_result; | 139 | AllowForcefulBanlines = (string) configuration_result; |
139 | break; | 140 | break; |
140 | } | 141 | } |
141 | 142 | ||
diff --git a/OpenSim/Framework/IAssetServer.cs b/OpenSim/Framework/IAssetServer.cs index 2fa77a0..afd3687 100644 --- a/OpenSim/Framework/IAssetServer.cs +++ b/OpenSim/Framework/IAssetServer.cs | |||
@@ -60,4 +60,4 @@ namespace OpenSim.Framework | |||
60 | { | 60 | { |
61 | IAssetServer GetAssetServer(); | 61 | IAssetServer GetAssetServer(); |
62 | } | 62 | } |
63 | } | 63 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 18ecd92..8ef5576 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -229,7 +229,8 @@ namespace OpenSim.Framework | |||
229 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); | 229 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); |
230 | 230 | ||
231 | public delegate void ModifyTerrain( | 231 | public delegate void ModifyTerrain( |
232 | float height, float seconds, byte size, byte action, float north, float west, float south, float east, IClientAPI remoteClient); | 232 | float height, float seconds, byte size, byte action, float north, float west, float south, float east, |
233 | IClientAPI remoteClient); | ||
233 | 234 | ||
234 | public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); | 235 | public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); |
235 | 236 | ||
@@ -269,7 +270,8 @@ namespace OpenSim.Framework | |||
269 | 270 | ||
270 | public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); | 271 | public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); |
271 | 272 | ||
272 | public delegate void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID); | 273 | public delegate void RequestObjectPropertiesFamily( |
274 | IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID); | ||
273 | 275 | ||
274 | public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); | 276 | public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); |
275 | 277 | ||
@@ -297,13 +299,17 @@ namespace OpenSim.Framework | |||
297 | 299 | ||
298 | public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID); | 300 | public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID); |
299 | 301 | ||
300 | public delegate void AvatarPickerRequest(IClientAPI remoteClient, LLUUID agentdata, LLUUID queryID, string UserQuery); | 302 | public delegate void AvatarPickerRequest(IClientAPI remoteClient, LLUUID agentdata, LLUUID queryID, string UserQuery |
303 | ); | ||
301 | 304 | ||
302 | public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient); | 305 | public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient); |
303 | 306 | ||
304 | public delegate void ParcelAccessListRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID,IClientAPI remote_client); | 307 | public delegate void ParcelAccessListRequest( |
305 | 308 | LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client); | |
306 | public delegate void ParcelAccessListUpdateRequest(LLUUID agentID, LLUUID sessionID,uint flags, int landLocalID, List<libsecondlife.ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client); | 309 | |
310 | public delegate void ParcelAccessListUpdateRequest( | ||
311 | LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries, | ||
312 | IClientAPI remote_client); | ||
307 | 313 | ||
308 | public delegate void ParcelPropertiesRequest( | 314 | public delegate void ParcelPropertiesRequest( |
309 | int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); | 315 | int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); |
@@ -330,13 +336,14 @@ namespace OpenSim.Framework | |||
330 | 336 | ||
331 | public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client); | 337 | public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client); |
332 | 338 | ||
333 | public delegate void GodKickUser(LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason); | 339 | public delegate void GodKickUser( |
340 | LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason); | ||
334 | 341 | ||
335 | public delegate void CreateInventoryFolder( | 342 | public delegate void CreateInventoryFolder( |
336 | IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID); | 343 | IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID); |
337 | 344 | ||
338 | public delegate void UpdateInventoryFolder( | 345 | public delegate void UpdateInventoryFolder( |
339 | IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID); | 346 | IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID); |
340 | 347 | ||
341 | public delegate void MoveInventoryFolder( | 348 | public delegate void MoveInventoryFolder( |
342 | IClientAPI remoteClient, LLUUID folderID, LLUUID parentID); | 349 | IClientAPI remoteClient, LLUUID folderID, LLUUID parentID); |
@@ -360,7 +367,8 @@ namespace OpenSim.Framework | |||
360 | uint nextOwnerMask); | 367 | uint nextOwnerMask); |
361 | 368 | ||
362 | public delegate void CopyInventoryItem( | 369 | public delegate void CopyInventoryItem( |
363 | IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID, string newName); | 370 | IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID, |
371 | string newName); | ||
364 | 372 | ||
365 | public delegate void MoveInventoryItem( | 373 | public delegate void MoveInventoryItem( |
366 | IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, string newName); | 374 | IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, string newName); |
@@ -372,15 +380,18 @@ namespace OpenSim.Framework | |||
372 | public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID); | 380 | public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID); |
373 | 381 | ||
374 | public delegate void UDPAssetUploadRequest( | 382 | public delegate void UDPAssetUploadRequest( |
375 | IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal, bool tempFile); | 383 | IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal, |
384 | bool tempFile); | ||
376 | 385 | ||
377 | public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); | 386 | public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); |
378 | 387 | ||
379 | public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName); | 388 | public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName); |
380 | 389 | ||
381 | public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID); | 390 | public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID); |
382 | 391 | ||
383 | public delegate void ObjectPermissions(IClientAPI remoteClinet, LLUUID AgentID, LLUUID SessionID, List<ObjectPermissionsPacket.ObjectDataBlock> permChanges); | 392 | public delegate void ObjectPermissions( |
393 | IClientAPI remoteClinet, LLUUID AgentID, LLUUID SessionID, | ||
394 | List<ObjectPermissionsPacket.ObjectDataBlock> permChanges); | ||
384 | 395 | ||
385 | public interface IClientAPI | 396 | public interface IClientAPI |
386 | { | 397 | { |
@@ -472,19 +483,19 @@ namespace OpenSim.Framework | |||
472 | event EstateOwnerMessageRequest OnEstateOwnerMessage; | 483 | event EstateOwnerMessageRequest OnEstateOwnerMessage; |
473 | event RegionInfoRequest OnRegionInfoRequest; | 484 | event RegionInfoRequest OnRegionInfoRequest; |
474 | event EstateCovenantRequest OnEstateCovenantRequest; | 485 | event EstateCovenantRequest OnEstateCovenantRequest; |
475 | 486 | ||
476 | LLVector3 StartPos { get; set; } | 487 | LLVector3 StartPos { get; set; } |
477 | 488 | ||
478 | LLUUID AgentId { get; } | 489 | LLUUID AgentId { get; } |
479 | 490 | ||
480 | LLUUID SessionId { get; } | 491 | LLUUID SessionId { get; } |
481 | 492 | ||
482 | LLUUID SecureSessionId { get; } | 493 | LLUUID SecureSessionId { get; } |
483 | 494 | ||
484 | string FirstName { get; } | 495 | string FirstName { get; } |
485 | 496 | ||
486 | string LastName { get; } | 497 | string LastName { get; } |
487 | 498 | ||
488 | /// <summary> | 499 | /// <summary> |
489 | /// Returns the full name of the agent/avatar represented by this client | 500 | /// Returns the full name of the agent/avatar represented by this client |
490 | /// </summary> | 501 | /// </summary> |
@@ -536,26 +547,29 @@ namespace OpenSim.Framework | |||
536 | 547 | ||
537 | void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); | 548 | void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); |
538 | void SetChildAgentThrottle(byte[] throttle); | 549 | void SetChildAgentThrottle(byte[] throttle); |
550 | |||
539 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 551 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, |
540 | LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, | 552 | LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, |
541 | uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction); | 553 | uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction); |
542 | 554 | ||
543 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 555 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, |
544 | LLQuaternion rotation); | 556 | LLQuaternion rotation); |
557 | |||
545 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 558 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, |
546 | LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity); | 559 | LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity); |
547 | 560 | ||
548 | void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, | 561 | void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, |
549 | List<InventoryFolderBase> folders, bool fetchFolders, | 562 | List<InventoryFolderBase> folders, bool fetchFolders, |
550 | bool fetchItems); | 563 | bool fetchItems); |
564 | |||
551 | void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); | 565 | void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); |
552 | 566 | ||
553 | /// <summary> | 567 | /// <summary> |
554 | /// Tell the client that we have created the item it requested. | 568 | /// Tell the client that we have created the item it requested. |
555 | /// </summary> | 569 | /// </summary> |
556 | /// <param name="Item"></param> | 570 | /// <param name="Item"></param> |
557 | void SendInventoryItemCreateUpdate(InventoryItemBase Item); | 571 | void SendInventoryItemCreateUpdate(InventoryItemBase Item); |
558 | 572 | ||
559 | void SendRemoveInventoryItem(LLUUID itemID); | 573 | void SendRemoveInventoryItem(LLUUID itemID); |
560 | void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); | 574 | void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); |
561 | void SendXferPacket(ulong xferID, uint packet, byte[] data); | 575 | void SendXferPacket(ulong xferID, uint packet, byte[] data); |
@@ -566,7 +580,7 @@ namespace OpenSim.Framework | |||
566 | 580 | ||
567 | void SendNameReply(LLUUID profileId, string firstname, string lastname); | 581 | void SendNameReply(LLUUID profileId, string firstname, string lastname); |
568 | void SendAlertMessage(string message); | 582 | void SendAlertMessage(string message); |
569 | 583 | ||
570 | void SendAgentAlertMessage(string message, bool modal); | 584 | void SendAgentAlertMessage(string message, bool modal); |
571 | void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); | 585 | void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); |
572 | bool AddMoney(int debit); | 586 | bool AddMoney(int debit); |
@@ -587,4 +601,4 @@ namespace OpenSim.Framework | |||
587 | event Action<IClientAPI> OnConnectionClosed; | 601 | event Action<IClientAPI> OnConnectionClosed; |
588 | void SendLogoutPacket(); | 602 | void SendLogoutPacket(); |
589 | } | 603 | } |
590 | } | 604 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/IGenericConfig.cs b/OpenSim/Framework/IGenericConfig.cs index cf742cc..0c9689c 100644 --- a/OpenSim/Framework/IGenericConfig.cs +++ b/OpenSim/Framework/IGenericConfig.cs | |||
@@ -37,4 +37,4 @@ namespace OpenSim.Framework | |||
37 | void Commit(); | 37 | void Commit(); |
38 | void Close(); | 38 | void Close(); |
39 | } | 39 | } |
40 | } | 40 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/IRegionCommsListener.cs b/OpenSim/Framework/IRegionCommsListener.cs index 363ab27..19608c8 100644 --- a/OpenSim/Framework/IRegionCommsListener.cs +++ b/OpenSim/Framework/IRegionCommsListener.cs | |||
@@ -51,8 +51,6 @@ namespace OpenSim.Framework | |||
51 | public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData); | 51 | public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData); |
52 | 52 | ||
53 | 53 | ||
54 | |||
55 | |||
56 | public interface IRegionCommsListener | 54 | public interface IRegionCommsListener |
57 | { | 55 | { |
58 | event ExpectUserDelegate OnExpectUser; | 56 | event ExpectUserDelegate OnExpectUser; |
@@ -66,6 +64,5 @@ namespace OpenSim.Framework | |||
66 | event CloseAgentConnection OnCloseAgentConnection; | 64 | event CloseAgentConnection OnCloseAgentConnection; |
67 | event RegionUp OnRegionUp; | 65 | event RegionUp OnRegionUp; |
68 | event ChildAgentUpdate OnChildAgentUpdate; | 66 | event ChildAgentUpdate OnChildAgentUpdate; |
69 | |||
70 | } | 67 | } |
71 | } | 68 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/IRegionLoader.cs b/OpenSim/Framework/IRegionLoader.cs index fe74737..f3e0a23 100644 --- a/OpenSim/Framework/IRegionLoader.cs +++ b/OpenSim/Framework/IRegionLoader.cs | |||
@@ -26,11 +26,8 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | using OpenSim.Framework; | ||
33 | using Nini.Config; | 29 | using Nini.Config; |
30 | |||
34 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
35 | { | 32 | { |
36 | public interface IRegionLoader | 33 | public interface IRegionLoader |
@@ -38,4 +35,4 @@ namespace OpenSim.Framework | |||
38 | void SetIniConfigSource(IniConfigSource configSource); | 35 | void SetIniConfigSource(IniConfigSource configSource); |
39 | RegionInfo[] LoadRegions(); | 36 | RegionInfo[] LoadRegions(); |
40 | } | 37 | } |
41 | } | 38 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index 4b6e9a5..7b9eced 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs | |||
@@ -29,7 +29,8 @@ using libsecondlife; | |||
29 | 29 | ||
30 | namespace OpenSim.Framework | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | public delegate void restart( RegionInfo thisRegion ); | 32 | public delegate void restart(RegionInfo thisRegion); |
33 | |||
33 | //public delegate void regionup ( RegionInfo thisRegion ); | 34 | //public delegate void regionup ( RegionInfo thisRegion ); |
34 | 35 | ||
35 | public enum RegionStatus : int | 36 | public enum RegionStatus : int |
@@ -38,7 +39,7 @@ namespace OpenSim.Framework | |||
38 | Up = 1, | 39 | Up = 1, |
39 | Crashed = 2, | 40 | Crashed = 2, |
40 | Starting = 3 | 41 | Starting = 3 |
41 | }; | 42 | } ; |
42 | 43 | ||
43 | public interface IScene | 44 | public interface IScene |
44 | { | 45 | { |
@@ -58,4 +59,4 @@ namespace OpenSim.Framework | |||
58 | 59 | ||
59 | ClientManager ClientManager { get; } | 60 | ClientManager ClientManager { get; } |
60 | } | 61 | } |
61 | } | 62 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/IUserData.cs b/OpenSim/Framework/IUserData.cs index 0679a68..d06784c 100644 --- a/OpenSim/Framework/IUserData.cs +++ b/OpenSim/Framework/IUserData.cs | |||
@@ -25,8 +25,8 @@ | |||
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 | */ |
28 | using libsecondlife; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using libsecondlife; | ||
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
@@ -50,7 +50,7 @@ namespace OpenSim.Framework | |||
50 | /// <returns>The user data profile</returns> | 50 | /// <returns>The user data profile</returns> |
51 | UserProfileData GetUserByName(string fname, string lname); | 51 | UserProfileData GetUserByName(string fname, string lname); |
52 | 52 | ||
53 | List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); | 53 | List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Returns the current agent for a user searching by it's UUID | 56 | /// Returns the current agent for a user searching by it's UUID |
@@ -127,13 +127,15 @@ namespace OpenSim.Framework | |||
127 | /// </summary> | 127 | /// </summary> |
128 | void Initialise(); | 128 | void Initialise(); |
129 | } | 129 | } |
130 | |||
130 | public class AvatarPickerAvatar | 131 | public class AvatarPickerAvatar |
131 | { | 132 | { |
132 | public LLUUID AvatarID; | 133 | public LLUUID AvatarID; |
133 | public string firstName; | 134 | public string firstName; |
134 | public string lastName; | 135 | public string lastName; |
136 | |||
135 | public AvatarPickerAvatar() | 137 | public AvatarPickerAvatar() |
136 | { | 138 | { |
137 | } | 139 | } |
138 | } | 140 | } |
139 | } | 141 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/IUserService.cs b/OpenSim/Framework/IUserService.cs index 3440e30..2b08582 100644 --- a/OpenSim/Framework/IUserService.cs +++ b/OpenSim/Framework/IUserService.cs | |||
@@ -25,8 +25,8 @@ | |||
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 | */ |
28 | using libsecondlife; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using libsecondlife; | ||
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
@@ -48,4 +48,4 @@ namespace OpenSim.Framework | |||
48 | /// <param name="user"></param> | 48 | /// <param name="user"></param> |
49 | LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); | 49 | LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); |
50 | } | 50 | } |
51 | } | 51 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index 8cb3e73..c60fb01 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs | |||
@@ -291,4 +291,4 @@ namespace OpenSim.Framework | |||
291 | 291 | ||
292 | [XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root; | 292 | [XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root; |
293 | } | 293 | } |
294 | } | 294 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index 1a94cfd..885545d 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs | |||
@@ -25,8 +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 | */ |
28 | using libsecondlife; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using libsecondlife; | ||
30 | |||
30 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
31 | { | 32 | { |
32 | public class LandData | 33 | public class LandData |
@@ -53,7 +54,7 @@ namespace OpenSim.Framework | |||
53 | public int simwideArea = 0; | 54 | public int simwideArea = 0; |
54 | public int salePrice = 0; //Unemeplemented. Parcels price. | 55 | public int salePrice = 0; //Unemeplemented. Parcels price. |
55 | public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased; | 56 | public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased; |
56 | 57 | ||
57 | public uint landFlags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark | | 58 | public uint landFlags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark | |
58 | (uint) Parcel.ParcelFlags.AllowAllObjectEntry | | 59 | (uint) Parcel.ParcelFlags.AllowAllObjectEntry | |
59 | (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform | | 60 | (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform | |
@@ -133,4 +134,4 @@ namespace OpenSim.Framework | |||
133 | return landData; | 134 | return landData; |
134 | } | 135 | } |
135 | } | 136 | } |
136 | } | 137 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Login.cs b/OpenSim/Framework/Login.cs index 1da0a2b..5228fe9 100644 --- a/OpenSim/Framework/Login.cs +++ b/OpenSim/Framework/Login.cs | |||
@@ -47,4 +47,4 @@ namespace OpenSim.Framework | |||
47 | StartPos = new LLVector3(128, 128, 70); | 47 | StartPos = new LLVector3(128, 128, 70); |
48 | } | 48 | } |
49 | } | 49 | } |
50 | } | 50 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/NeighbourInfo.cs b/OpenSim/Framework/NeighbourInfo.cs index ca98cd1..ddf9df6 100644 --- a/OpenSim/Framework/NeighbourInfo.cs +++ b/OpenSim/Framework/NeighbourInfo.cs | |||
@@ -39,4 +39,4 @@ namespace OpenSim.Framework | |||
39 | public string sim_ip; | 39 | public string sim_ip; |
40 | public uint sim_port; | 40 | public uint sim_port; |
41 | } | 41 | } |
42 | } | 42 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/NetworkServersInfo.cs b/OpenSim/Framework/NetworkServersInfo.cs index 6f8ff7d..cf1457d 100644 --- a/OpenSim/Framework/NetworkServersInfo.cs +++ b/OpenSim/Framework/NetworkServersInfo.cs | |||
@@ -80,8 +80,10 @@ namespace OpenSim.Framework | |||
80 | m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000); | 80 | m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000); |
81 | m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000); | 81 | m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000); |
82 | 82 | ||
83 | HttpListenerPort = (uint) config.Configs["Network"].GetInt("http_listener_port", (int) DefaultHttpListenerPort); | 83 | HttpListenerPort = |
84 | RemotingListenerPort = (uint) config.Configs["Network"].GetInt("remoting_listener_port", (int) RemotingListenerPort); | 84 | (uint) config.Configs["Network"].GetInt("http_listener_port", (int) DefaultHttpListenerPort); |
85 | RemotingListenerPort = | ||
86 | (uint) config.Configs["Network"].GetInt("remoting_listener_port", (int) RemotingListenerPort); | ||
85 | GridURL = | 87 | GridURL = |
86 | config.Configs["Network"].GetString("grid_server_url", | 88 | config.Configs["Network"].GetString("grid_server_url", |
87 | "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString()); | 89 | "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString()); |
@@ -98,4 +100,4 @@ namespace OpenSim.Framework | |||
98 | InventoryConfig.DefaultHttpPort.ToString()); | 100 | InventoryConfig.DefaultHttpPort.ToString()); |
99 | } | 101 | } |
100 | } | 102 | } |
101 | } | 103 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 98e583e..c29b973 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -26,9 +26,9 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Xml.Serialization; | 30 | using System.Xml.Serialization; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using System; | ||
32 | 32 | ||
33 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
34 | { | 34 | { |
@@ -91,32 +91,21 @@ namespace OpenSim.Framework | |||
91 | public sbyte PathTwist; | 91 | public sbyte PathTwist; |
92 | public sbyte PathTwistBegin; | 92 | public sbyte PathTwistBegin; |
93 | 93 | ||
94 | [XmlIgnore] | 94 | [XmlIgnore] |
95 | public LLObject.TextureEntry Textures | 95 | public LLObject.TextureEntry Textures |
96 | { | 96 | { |
97 | get | 97 | get { return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); } |
98 | { | ||
99 | return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); | ||
100 | } | ||
101 | 98 | ||
102 | set | 99 | set { m_textureEntry = value.ToBytes(); } |
103 | { | ||
104 | m_textureEntry = value.ToBytes(); | ||
105 | } | ||
106 | } | 100 | } |
107 | 101 | ||
108 | private byte[] m_textureEntry; | 102 | private byte[] m_textureEntry; |
103 | |||
109 | public byte[] TextureEntry | 104 | public byte[] TextureEntry |
110 | { | 105 | { |
111 | get | 106 | get { return m_textureEntry; } |
112 | { | ||
113 | return m_textureEntry; | ||
114 | } | ||
115 | 107 | ||
116 | set | 108 | set { m_textureEntry = value; } |
117 | { | ||
118 | m_textureEntry = value; | ||
119 | } | ||
120 | } | 109 | } |
121 | 110 | ||
122 | public byte[] ExtraParams; | 111 | public byte[] ExtraParams; |
@@ -134,11 +123,11 @@ namespace OpenSim.Framework | |||
134 | [XmlIgnore] | 123 | [XmlIgnore] |
135 | public HollowShape HollowShape | 124 | public HollowShape HollowShape |
136 | { | 125 | { |
137 | get { return (HollowShape)(ProfileCurve & 0xf0); } | 126 | get { return (HollowShape) (ProfileCurve & 0xf0); } |
138 | set | 127 | set |
139 | { | 128 | { |
140 | byte oldValueMasked = (byte)(ProfileCurve & 0x0f); | 129 | byte oldValueMasked = (byte) (ProfileCurve & 0x0f); |
141 | ProfileCurve = (byte)(oldValueMasked | (byte)value); | 130 | ProfileCurve = (byte) (oldValueMasked | (byte) value); |
142 | } | 131 | } |
143 | } | 132 | } |
144 | 133 | ||
@@ -147,7 +136,6 @@ namespace OpenSim.Framework | |||
147 | get { return Scale; } | 136 | get { return Scale; } |
148 | } | 137 | } |
149 | 138 | ||
150 | |||
151 | 139 | ||
152 | static PrimitiveBaseShape() | 140 | static PrimitiveBaseShape() |
153 | { | 141 | { |
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs index a146778..9472a9e 100644 --- a/OpenSim/Framework/RegionCommsListener.cs +++ b/OpenSim/Framework/RegionCommsListener.cs | |||
@@ -44,10 +44,10 @@ namespace OpenSim.Framework | |||
44 | public event CloseAgentConnection OnCloseAgentConnection; | 44 | public event CloseAgentConnection OnCloseAgentConnection; |
45 | public event RegionUp OnRegionUp; | 45 | public event RegionUp OnRegionUp; |
46 | public event ChildAgentUpdate OnChildAgentUpdate; | 46 | public event ChildAgentUpdate OnChildAgentUpdate; |
47 | |||
48 | 47 | ||
49 | public string debugRegionName=""; | 48 | |
50 | 49 | public string debugRegionName = ""; | |
50 | |||
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// | 53 | /// |
@@ -66,7 +66,6 @@ namespace OpenSim.Framework | |||
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
69 | |||
70 | public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData) | 69 | public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData) |
71 | { | 70 | { |
72 | if (OnExpectUser != null) | 71 | if (OnExpectUser != null) |
@@ -107,7 +106,9 @@ namespace OpenSim.Framework | |||
107 | } | 106 | } |
108 | return false; | 107 | return false; |
109 | } | 108 | } |
110 | public virtual bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | 109 | |
110 | public virtual bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, | ||
111 | bool isPhysical) | ||
111 | { | 112 | { |
112 | if (OnPrimCrossingIntoRegion != null) | 113 | if (OnPrimCrossingIntoRegion != null) |
113 | { | 114 | { |
@@ -178,4 +179,4 @@ namespace OpenSim.Framework | |||
178 | return false; | 179 | return false; |
179 | } | 180 | } |
180 | } | 181 | } |
181 | } | 182 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index c4557f8..8c25603 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -26,16 +26,11 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Globalization; | ||
30 | using System.Net; | 29 | using System.Net; |
31 | using System.Xml; | ||
32 | using System.Net.Sockets; | 30 | using System.Net.Sockets; |
33 | using Nini.Config; | 31 | using System.Xml; |
34 | using libsecondlife; | 32 | using libsecondlife; |
35 | using OpenSim.Framework.Console; | 33 | using Nini.Config; |
36 | using OpenSim.Framework; | ||
37 | |||
38 | |||
39 | 34 | ||
40 | namespace OpenSim.Framework | 35 | namespace OpenSim.Framework |
41 | { | 36 | { |
@@ -64,6 +59,7 @@ namespace OpenSim.Framework | |||
64 | 59 | ||
65 | m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); | 60 | m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); |
66 | } | 61 | } |
62 | |||
67 | public SimpleRegionInfo(RegionInfo ConvertFrom) | 63 | public SimpleRegionInfo(RegionInfo ConvertFrom) |
68 | { | 64 | { |
69 | m_regionLocX = ConvertFrom.RegionLocX; | 65 | m_regionLocX = ConvertFrom.RegionLocX; |
@@ -78,16 +74,11 @@ namespace OpenSim.Framework | |||
78 | public LLUUID RegionID = LLUUID.Zero; | 74 | public LLUUID RegionID = LLUUID.Zero; |
79 | 75 | ||
80 | public uint m_remotingPort; | 76 | public uint m_remotingPort; |
77 | |||
81 | public uint RemotingPort | 78 | public uint RemotingPort |
82 | { | 79 | { |
83 | get | 80 | get { return m_remotingPort; } |
84 | { | 81 | set { m_remotingPort = value; } |
85 | return m_remotingPort; | ||
86 | } | ||
87 | set | ||
88 | { | ||
89 | m_remotingPort = value; | ||
90 | } | ||
91 | } | 82 | } |
92 | 83 | ||
93 | public string RemotingAddress; | 84 | public string RemotingAddress; |
@@ -123,73 +114,47 @@ namespace OpenSim.Framework | |||
123 | return new IPEndPoint(ia, m_internalEndPoint.Port); | 114 | return new IPEndPoint(ia, m_internalEndPoint.Port); |
124 | } | 115 | } |
125 | 116 | ||
126 | set | 117 | set { m_externalHostName = value.ToString(); } |
127 | { | ||
128 | m_externalHostName = value.ToString(); | ||
129 | } | ||
130 | } | 118 | } |
131 | 119 | ||
132 | protected string m_externalHostName; | 120 | protected string m_externalHostName; |
121 | |||
133 | public string ExternalHostName | 122 | public string ExternalHostName |
134 | { | 123 | { |
135 | get | 124 | get { return m_externalHostName; } |
136 | { | 125 | set { m_externalHostName = value; } |
137 | return m_externalHostName; | ||
138 | } | ||
139 | set | ||
140 | { | ||
141 | m_externalHostName = value; | ||
142 | } | ||
143 | } | 126 | } |
144 | 127 | ||
145 | protected IPEndPoint m_internalEndPoint; | 128 | protected IPEndPoint m_internalEndPoint; |
129 | |||
146 | public IPEndPoint InternalEndPoint | 130 | public IPEndPoint InternalEndPoint |
147 | { | 131 | { |
148 | get | 132 | get { return m_internalEndPoint; } |
149 | { | 133 | set { m_internalEndPoint = value; } |
150 | return m_internalEndPoint; | ||
151 | } | ||
152 | set | ||
153 | { | ||
154 | m_internalEndPoint = value; | ||
155 | } | ||
156 | } | 134 | } |
157 | 135 | ||
158 | protected uint? m_regionLocX; | 136 | protected uint? m_regionLocX; |
137 | |||
159 | public uint RegionLocX | 138 | public uint RegionLocX |
160 | { | 139 | { |
161 | get | 140 | get { return m_regionLocX.Value; } |
162 | { | 141 | set { m_regionLocX = value; } |
163 | return m_regionLocX.Value; | ||
164 | } | ||
165 | set | ||
166 | { | ||
167 | m_regionLocX = value; | ||
168 | } | ||
169 | } | 142 | } |
170 | 143 | ||
171 | protected uint? m_regionLocY; | 144 | protected uint? m_regionLocY; |
145 | |||
172 | public uint RegionLocY | 146 | public uint RegionLocY |
173 | { | 147 | { |
174 | get | 148 | get { return m_regionLocY.Value; } |
175 | { | 149 | set { m_regionLocY = value; } |
176 | return m_regionLocY.Value; | ||
177 | } | ||
178 | set | ||
179 | { | ||
180 | m_regionLocY = value; | ||
181 | } | ||
182 | } | 150 | } |
183 | 151 | ||
184 | public ulong RegionHandle | 152 | public ulong RegionHandle |
185 | { | 153 | { |
186 | get | 154 | get { return Util.UIntsToLong((RegionLocX*256), (RegionLocY*256)); } |
187 | { | ||
188 | return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); | ||
189 | } | ||
190 | } | 155 | } |
191 | } | 156 | } |
192 | 157 | ||
193 | public class RegionInfo : SimpleRegionInfo | 158 | public class RegionInfo : SimpleRegionInfo |
194 | { | 159 | { |
195 | public string RegionName = ""; | 160 | public string RegionName = ""; |
@@ -206,15 +171,16 @@ namespace OpenSim.Framework | |||
206 | 171 | ||
207 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. | 172 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. |
208 | private static EstateSettings m_estateSettings; | 173 | private static EstateSettings m_estateSettings; |
174 | |||
209 | public EstateSettings EstateSettings | 175 | public EstateSettings EstateSettings |
210 | { | 176 | { |
211 | get | 177 | get |
212 | { | 178 | { |
213 | if( m_estateSettings == null ) | 179 | if (m_estateSettings == null) |
214 | { | 180 | { |
215 | m_estateSettings = new EstateSettings(); | 181 | m_estateSettings = new EstateSettings(); |
216 | } | 182 | } |
217 | 183 | ||
218 | return m_estateSettings; | 184 | return m_estateSettings; |
219 | } | 185 | } |
220 | } | 186 | } |
@@ -223,14 +189,18 @@ namespace OpenSim.Framework | |||
223 | 189 | ||
224 | public RegionInfo(string description, string filename) | 190 | public RegionInfo(string description, string filename) |
225 | { | 191 | { |
226 | configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); | 192 | configMember = |
193 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); | ||
227 | configMember.performConfigurationRetrieve(); | 194 | configMember.performConfigurationRetrieve(); |
228 | } | 195 | } |
196 | |||
229 | public RegionInfo(string description, XmlNode xmlNode) | 197 | public RegionInfo(string description, XmlNode xmlNode) |
230 | { | 198 | { |
231 | configMember = new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration); | 199 | configMember = |
200 | new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration); | ||
232 | configMember.performConfigurationRetrieve(); | 201 | configMember.performConfigurationRetrieve(); |
233 | } | 202 | } |
203 | |||
234 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) : | 204 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) : |
235 | base(regionLocX, regionLocY, internalEndPoint, externalUri) | 205 | base(regionLocX, regionLocY, internalEndPoint, externalUri) |
236 | { | 206 | { |
@@ -239,6 +209,7 @@ namespace OpenSim.Framework | |||
239 | public RegionInfo() | 209 | public RegionInfo() |
240 | { | 210 | { |
241 | } | 211 | } |
212 | |||
242 | public RegionInfo(SearializableRegionInfo ConvertFrom) | 213 | public RegionInfo(SearializableRegionInfo ConvertFrom) |
243 | { | 214 | { |
244 | m_regionLocX = ConvertFrom.RegionLocX; | 215 | m_regionLocX = ConvertFrom.RegionLocX; |
@@ -249,6 +220,7 @@ namespace OpenSim.Framework | |||
249 | RemotingAddress = ConvertFrom.RemotingAddress; | 220 | RemotingAddress = ConvertFrom.RemotingAddress; |
250 | RegionID = LLUUID.Zero; | 221 | RegionID = LLUUID.Zero; |
251 | } | 222 | } |
223 | |||
252 | public RegionInfo(SimpleRegionInfo ConvertFrom) | 224 | public RegionInfo(SimpleRegionInfo ConvertFrom) |
253 | { | 225 | { |
254 | m_regionLocX = ConvertFrom.RegionLocX; | 226 | m_regionLocX = ConvertFrom.RegionLocX; |
@@ -259,47 +231,49 @@ namespace OpenSim.Framework | |||
259 | RemotingAddress = ConvertFrom.RemotingAddress; | 231 | RemotingAddress = ConvertFrom.RemotingAddress; |
260 | RegionID = LLUUID.Zero; | 232 | RegionID = LLUUID.Zero; |
261 | } | 233 | } |
234 | |||
262 | //not in use, should swap to nini though. | 235 | //not in use, should swap to nini though. |
263 | public void LoadFromNiniSource(IConfigSource source) | 236 | public void LoadFromNiniSource(IConfigSource source) |
264 | { | 237 | { |
265 | this.LoadFromNiniSource(source, "RegionInfo"); | 238 | LoadFromNiniSource(source, "RegionInfo"); |
266 | } | 239 | } |
267 | 240 | ||
268 | //not in use, should swap to nini though. | 241 | //not in use, should swap to nini though. |
269 | public void LoadFromNiniSource(IConfigSource source, string sectionName) | 242 | public void LoadFromNiniSource(IConfigSource source, string sectionName) |
270 | { | 243 | { |
271 | string errorMessage = ""; | 244 | string errorMessage = ""; |
272 | this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToString())); | 245 | RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToString())); |
273 | this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); | 246 | RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); |
274 | this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); | 247 | m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); |
275 | this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); | 248 | m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); |
276 | // this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db"); | 249 | // this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db"); |
277 | 250 | ||
278 | string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0"); | 251 | string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0"); |
279 | IPAddress ipAddressResult; | 252 | IPAddress ipAddressResult; |
280 | if (IPAddress.TryParse(ipAddress, out ipAddressResult)) | 253 | if (IPAddress.TryParse(ipAddress, out ipAddressResult)) |
281 | { | 254 | { |
282 | this.m_internalEndPoint = new IPEndPoint(ipAddressResult, 0); | 255 | m_internalEndPoint = new IPEndPoint(ipAddressResult, 0); |
283 | } | 256 | } |
284 | else | 257 | else |
285 | { | 258 | { |
286 | errorMessage = "needs an IP Address (IPAddress)"; | 259 | errorMessage = "needs an IP Address (IPAddress)"; |
287 | } | 260 | } |
288 | this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", (int) NetworkServersInfo.DefaultHttpListenerPort); | 261 | m_internalEndPoint.Port = |
262 | source.Configs[sectionName].GetInt("internal_ip_port", (int) NetworkServersInfo.DefaultHttpListenerPort); | ||
289 | 263 | ||
290 | string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); | 264 | string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); |
291 | if (externalHost != "SYSTEMIP") | 265 | if (externalHost != "SYSTEMIP") |
292 | { | 266 | { |
293 | this.m_externalHostName = externalHost; | 267 | m_externalHostName = externalHost; |
294 | } | 268 | } |
295 | else | 269 | else |
296 | { | 270 | { |
297 | this.m_externalHostName = Util.GetLocalHost().ToString(); | 271 | m_externalHostName = Util.GetLocalHost().ToString(); |
298 | } | 272 | } |
299 | 273 | ||
300 | this.MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test"); | 274 | MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test"); |
301 | this.MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User"); | 275 | MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User"); |
302 | this.MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test"); | 276 | MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test"); |
303 | 277 | ||
304 | if (errorMessage != "") | 278 | if (errorMessage != "") |
305 | { | 279 | { |
@@ -309,19 +283,45 @@ namespace OpenSim.Framework | |||
309 | 283 | ||
310 | public void loadConfigurationOptions() | 284 | public void loadConfigurationOptions() |
311 | { | 285 | { |
312 | configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Region (Default is recommended, random UUID)", LLUUID.Random().ToString(), true); | 286 | configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, |
313 | configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Region Name", "OpenSim Test", false); | 287 | "UUID of Region (Default is recommended, random UUID)", |
314 | configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false); | 288 | LLUUID.Random().ToString(), true); |
315 | configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false); | 289 | configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
290 | "Region Name", "OpenSim Test", false); | ||
291 | configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | ||
292 | "Grid Location (X Axis)", "1000", false); | ||
293 | configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | ||
294 | "Grid Location (Y Axis)", "1000", false); | ||
316 | //configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false); | 295 | //configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false); |
317 | configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false); | 296 | configMember.addConfigurationOption("internal_ip_address", |
318 | configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); | 297 | ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, |
319 | configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); | 298 | "Internal IP Address for incoming UDP client connections", "0.0.0.0", |
320 | configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToString(), true); | 299 | false); |
321 | configMember.addConfigurationOption("estate_covanant_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", LLUUID.Zero.ToString(), true); | 300 | configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
322 | configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false,(ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); | 301 | "Internal IP Port for incoming UDP client connections", |
323 | configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); | 302 | NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); |
324 | configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); | 303 | configMember.addConfigurationOption("external_host_name", |
304 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | ||
305 | "External Host Name", "127.0.0.1", false); | ||
306 | configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, | ||
307 | "Master Avatar UUID", LLUUID.Zero.ToString(), true); | ||
308 | configMember.addConfigurationOption("estate_covanant_uuid", | ||
309 | ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", | ||
310 | LLUUID.Zero.ToString(), true); | ||
311 | configMember.addConfigurationOption("master_avatar_first", | ||
312 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | ||
313 | "First Name of Master Avatar", "Test", false, | ||
314 | (ConfigurationOption.ConfigurationOptionShouldBeAsked) | ||
315 | shouldMasterAvatarDetailsBeAsked); | ||
316 | configMember.addConfigurationOption("master_avatar_last", | ||
317 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | ||
318 | "Last Name of Master Avatar", "User", false, | ||
319 | (ConfigurationOption.ConfigurationOptionShouldBeAsked) | ||
320 | shouldMasterAvatarDetailsBeAsked); | ||
321 | configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | ||
322 | "(Sandbox Mode Only)Password for Master Avatar account", "test", false, | ||
323 | (ConfigurationOption.ConfigurationOptionShouldBeAsked) | ||
324 | shouldMasterAvatarDetailsBeAsked); | ||
325 | } | 325 | } |
326 | 326 | ||
327 | public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) | 327 | public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) |
@@ -338,58 +338,57 @@ namespace OpenSim.Framework | |||
338 | switch (configuration_key) | 338 | switch (configuration_key) |
339 | { | 339 | { |
340 | case "sim_UUID": | 340 | case "sim_UUID": |
341 | this.RegionID = (LLUUID)configuration_result; | 341 | RegionID = (LLUUID) configuration_result; |
342 | break; | 342 | break; |
343 | case "sim_name": | 343 | case "sim_name": |
344 | this.RegionName = (string)configuration_result; | 344 | RegionName = (string) configuration_result; |
345 | break; | 345 | break; |
346 | case "sim_location_x": | 346 | case "sim_location_x": |
347 | this.m_regionLocX = (uint)configuration_result; | 347 | m_regionLocX = (uint) configuration_result; |
348 | break; | 348 | break; |
349 | case "sim_location_y": | 349 | case "sim_location_y": |
350 | this.m_regionLocY = (uint)configuration_result; | 350 | m_regionLocY = (uint) configuration_result; |
351 | break; | 351 | break; |
352 | case "datastore": | 352 | case "datastore": |
353 | this.DataStore = (string)configuration_result; | 353 | DataStore = (string) configuration_result; |
354 | break; | 354 | break; |
355 | case "internal_ip_address": | 355 | case "internal_ip_address": |
356 | IPAddress address = (IPAddress)configuration_result; | 356 | IPAddress address = (IPAddress) configuration_result; |
357 | this.m_internalEndPoint = new IPEndPoint(address, 0); | 357 | m_internalEndPoint = new IPEndPoint(address, 0); |
358 | break; | 358 | break; |
359 | case "internal_ip_port": | 359 | case "internal_ip_port": |
360 | this.m_internalEndPoint.Port = (int)configuration_result; | 360 | m_internalEndPoint.Port = (int) configuration_result; |
361 | break; | 361 | break; |
362 | case "external_host_name": | 362 | case "external_host_name": |
363 | if ((string)configuration_result != "SYSTEMIP") | 363 | if ((string) configuration_result != "SYSTEMIP") |
364 | { | 364 | { |
365 | this.m_externalHostName = (string)configuration_result; | 365 | m_externalHostName = (string) configuration_result; |
366 | } | 366 | } |
367 | else | 367 | else |
368 | { | 368 | { |
369 | this.m_externalHostName = Util.GetLocalHost().ToString(); | 369 | m_externalHostName = Util.GetLocalHost().ToString(); |
370 | } | 370 | } |
371 | break; | 371 | break; |
372 | case "master_avatar_uuid": | 372 | case "master_avatar_uuid": |
373 | this.MasterAvatarAssignedUUID = (LLUUID)configuration_result; | 373 | MasterAvatarAssignedUUID = (LLUUID) configuration_result; |
374 | break; | 374 | break; |
375 | case "estate_covanant_uuid": | 375 | case "estate_covanant_uuid": |
376 | this.CovenantID = (LLUUID)configuration_result; | 376 | CovenantID = (LLUUID) configuration_result; |
377 | break; | 377 | break; |
378 | 378 | ||
379 | case "master_avatar_first": | 379 | case "master_avatar_first": |
380 | this.MasterAvatarFirstName = (string)configuration_result; | 380 | MasterAvatarFirstName = (string) configuration_result; |
381 | break; | 381 | break; |
382 | case "master_avatar_last": | 382 | case "master_avatar_last": |
383 | this.MasterAvatarLastName = (string)configuration_result; | 383 | MasterAvatarLastName = (string) configuration_result; |
384 | break; | 384 | break; |
385 | case "master_avatar_pass": | 385 | case "master_avatar_pass": |
386 | string tempMD5Passwd = (string)configuration_result; | 386 | string tempMD5Passwd = (string) configuration_result; |
387 | this.MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); | 387 | MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); |
388 | break; | 388 | break; |
389 | } | 389 | } |
390 | 390 | ||
391 | return true; | 391 | return true; |
392 | } | 392 | } |
393 | |||
394 | } | 393 | } |
395 | } | 394 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs index fb50171..a710f50 100644 --- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs +++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs | |||
@@ -25,12 +25,8 @@ | |||
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 | */ |
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using Nini.Config; | ||
32 | using OpenSim.Framework; | ||
33 | using System.IO; | 28 | using System.IO; |
29 | using Nini.Config; | ||
34 | 30 | ||
35 | namespace OpenSim.Framework.RegionLoader.Filesystem | 31 | namespace OpenSim.Framework.RegionLoader.Filesystem |
36 | { | 32 | { |
@@ -67,4 +63,4 @@ namespace OpenSim.Framework.RegionLoader.Filesystem | |||
67 | return regionInfos; | 63 | return regionInfos; |
68 | } | 64 | } |
69 | } | 65 | } |
70 | } | 66 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs index ec7059a..1625fa6 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | |||
@@ -25,48 +25,46 @@ | |||
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 | */ |
28 | using System; | ||
29 | using System.Net; | ||
30 | using System.IO; | 28 | using System.IO; |
29 | using System.Net; | ||
31 | using System.Xml; | 30 | using System.Xml; |
32 | using System.Collections.Generic; | ||
33 | using System.Text; | ||
34 | using Nini.Config; | 31 | using Nini.Config; |
35 | using OpenSim.Framework; | 32 | using OpenSim.Framework.Console; |
36 | 33 | ||
37 | namespace OpenSim.Framework.RegionLoader.Web | 34 | namespace OpenSim.Framework.RegionLoader.Web |
38 | { | 35 | { |
39 | public class RegionLoaderWebServer : IRegionLoader | 36 | public class RegionLoaderWebServer : IRegionLoader |
40 | { | 37 | { |
41 | private IniConfigSource m_configSouce; | 38 | private IniConfigSource m_configSouce; |
39 | |||
42 | public void SetIniConfigSource(IniConfigSource configSource) | 40 | public void SetIniConfigSource(IniConfigSource configSource) |
43 | { | 41 | { |
44 | m_configSouce = configSource; | 42 | m_configSouce = configSource; |
45 | } | 43 | } |
44 | |||
46 | public RegionInfo[] LoadRegions() | 45 | public RegionInfo[] LoadRegions() |
47 | { | 46 | { |
48 | if (m_configSouce == null) | 47 | if (m_configSouce == null) |
49 | { | 48 | { |
50 | Console.MainLog.Instance.Error("WEBLOADER", "Unable to load configuration source!"); | 49 | MainLog.Instance.Error("WEBLOADER", "Unable to load configuration source!"); |
51 | return null; | 50 | return null; |
52 | } | 51 | } |
53 | else | 52 | else |
54 | { | 53 | { |
55 | IniConfig startupConfig = (IniConfig)m_configSouce.Configs["Startup"]; | 54 | IniConfig startupConfig = (IniConfig) m_configSouce.Configs["Startup"]; |
56 | string url = startupConfig.GetString("regionload_webserver_url","").Trim(); | 55 | string url = startupConfig.GetString("regionload_webserver_url", "").Trim(); |
57 | if (url == "") | 56 | if (url == "") |
58 | { | 57 | { |
59 | Console.MainLog.Instance.Error("WEBLOADER", "Unable to load webserver URL - URL was empty."); | 58 | MainLog.Instance.Error("WEBLOADER", "Unable to load webserver URL - URL was empty."); |
60 | return null; | 59 | return null; |
61 | } | 60 | } |
62 | else | 61 | else |
63 | { | 62 | { |
64 | 63 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); | |
65 | HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); | ||
66 | webRequest.Timeout = 30000; //30 Second Timeout | 64 | webRequest.Timeout = 30000; //30 Second Timeout |
67 | Console.MainLog.Instance.Debug("WEBLOADER", "Sending Download Request..."); | 65 | MainLog.Instance.Debug("WEBLOADER", "Sending Download Request..."); |
68 | HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse(); | 66 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); |
69 | Console.MainLog.Instance.Debug("WEBLOADER", "Downloading Region Information From Remote Server..."); | 67 | MainLog.Instance.Debug("WEBLOADER", "Downloading Region Information From Remote Server..."); |
70 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); | 68 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); |
71 | string xmlSource = ""; | 69 | string xmlSource = ""; |
72 | string tempStr = reader.ReadLine(); | 70 | string tempStr = reader.ReadLine(); |
@@ -75,7 +73,9 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
75 | xmlSource = xmlSource + tempStr; | 73 | xmlSource = xmlSource + tempStr; |
76 | tempStr = reader.ReadLine(); | 74 | tempStr = reader.ReadLine(); |
77 | } | 75 | } |
78 | Console.MainLog.Instance.Debug("WEBLOADER", "Done downloading region information from server. Total Bytes: " + xmlSource.Length); | 76 | MainLog.Instance.Debug("WEBLOADER", |
77 | "Done downloading region information from server. Total Bytes: " + | ||
78 | xmlSource.Length); | ||
79 | XmlDocument xmlDoc = new XmlDocument(); | 79 | XmlDocument xmlDoc = new XmlDocument(); |
80 | xmlDoc.LoadXml(xmlSource); | 80 | xmlDoc.LoadXml(xmlSource); |
81 | if (xmlDoc.FirstChild.Name == "Regions") | 81 | if (xmlDoc.FirstChild.Name == "Regions") |
@@ -84,8 +84,9 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
84 | int i; | 84 | int i; |
85 | for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) | 85 | for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) |
86 | { | 86 | { |
87 | Console.MainLog.Instance.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); | 87 | MainLog.Instance.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); |
88 | regionInfos[i] = new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i]); | 88 | regionInfos[i] = |
89 | new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i]); | ||
89 | } | 90 | } |
90 | 91 | ||
91 | return regionInfos; | 92 | return regionInfos; |
@@ -95,4 +96,4 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
95 | } | 96 | } |
96 | } | 97 | } |
97 | } | 98 | } |
98 | } | 99 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Remoting.cs b/OpenSim/Framework/Remoting.cs index 9cf0d11..ddc1cfb 100644 --- a/OpenSim/Framework/Remoting.cs +++ b/OpenSim/Framework/Remoting.cs | |||
@@ -131,4 +131,4 @@ namespace OpenSim.Framework | |||
131 | return c; | 131 | return c; |
132 | } | 132 | } |
133 | } | 133 | } |
134 | } | 134 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/SerializableRegionInfo.cs b/OpenSim/Framework/SerializableRegionInfo.cs index 5df22cd..18a3829 100644 --- a/OpenSim/Framework/SerializableRegionInfo.cs +++ b/OpenSim/Framework/SerializableRegionInfo.cs | |||
@@ -26,15 +26,10 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Globalization; | ||
30 | using System.Net; | 29 | using System.Net; |
31 | using System.Xml; | ||
32 | using System.Net.Sockets; | 30 | using System.Net.Sockets; |
33 | using libsecondlife; | 31 | using libsecondlife; |
34 | 32 | ||
35 | |||
36 | |||
37 | |||
38 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
39 | { | 34 | { |
40 | [Serializable] | 35 | [Serializable] |
@@ -46,7 +41,8 @@ namespace OpenSim.Framework | |||
46 | public SearializableRegionInfo() | 41 | public SearializableRegionInfo() |
47 | { | 42 | { |
48 | } | 43 | } |
49 | public SearializableRegionInfo(RegionInfo ConvertFrom) | 44 | |
45 | public SearializableRegionInfo(RegionInfo ConvertFrom) | ||
50 | { | 46 | { |
51 | m_regionLocX = ConvertFrom.RegionLocX; | 47 | m_regionLocX = ConvertFrom.RegionLocX; |
52 | m_regionLocY = ConvertFrom.RegionLocY; | 48 | m_regionLocY = ConvertFrom.RegionLocY; |
@@ -55,9 +51,9 @@ namespace OpenSim.Framework | |||
55 | m_remotingPort = ConvertFrom.RemotingPort; | 51 | m_remotingPort = ConvertFrom.RemotingPort; |
56 | RemotingAddress = ConvertFrom.RemotingAddress; | 52 | RemotingAddress = ConvertFrom.RemotingAddress; |
57 | } | 53 | } |
54 | |||
58 | public SearializableRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) | 55 | public SearializableRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) |
59 | { | 56 | { |
60 | |||
61 | m_regionLocX = regionLocX; | 57 | m_regionLocX = regionLocX; |
62 | m_regionLocY = regionLocY; | 58 | m_regionLocY = regionLocY; |
63 | 59 | ||
@@ -78,16 +74,11 @@ namespace OpenSim.Framework | |||
78 | public Guid RegionID = LLUUID.Zero.UUID; | 74 | public Guid RegionID = LLUUID.Zero.UUID; |
79 | 75 | ||
80 | public uint m_remotingPort; | 76 | public uint m_remotingPort; |
77 | |||
81 | public uint RemotingPort | 78 | public uint RemotingPort |
82 | { | 79 | { |
83 | get | 80 | get { return m_remotingPort; } |
84 | { | 81 | set { m_remotingPort = value; } |
85 | return m_remotingPort; | ||
86 | } | ||
87 | set | ||
88 | { | ||
89 | m_remotingPort = value; | ||
90 | } | ||
91 | } | 82 | } |
92 | 83 | ||
93 | public string RemotingAddress; | 84 | public string RemotingAddress; |
@@ -120,77 +111,49 @@ namespace OpenSim.Framework | |||
120 | ia = Adr; | 111 | ia = Adr; |
121 | break; | 112 | break; |
122 | } | 113 | } |
123 | |||
124 | } | 114 | } |
125 | 115 | ||
126 | return new IPEndPoint(ia, m_internalEndPoint.Port); | 116 | return new IPEndPoint(ia, m_internalEndPoint.Port); |
127 | } | 117 | } |
128 | 118 | ||
129 | set | 119 | set { m_externalHostName = value.ToString(); } |
130 | { | ||
131 | m_externalHostName = value.ToString(); | ||
132 | } | ||
133 | } | 120 | } |
134 | 121 | ||
135 | protected string m_externalHostName; | 122 | protected string m_externalHostName; |
123 | |||
136 | public string ExternalHostName | 124 | public string ExternalHostName |
137 | { | 125 | { |
138 | get | 126 | get { return m_externalHostName; } |
139 | { | 127 | set { m_externalHostName = value; } |
140 | return m_externalHostName; | ||
141 | } | ||
142 | set | ||
143 | { | ||
144 | m_externalHostName = value; | ||
145 | } | ||
146 | } | 128 | } |
147 | 129 | ||
148 | protected IPEndPoint m_internalEndPoint; | 130 | protected IPEndPoint m_internalEndPoint; |
131 | |||
149 | public IPEndPoint InternalEndPoint | 132 | public IPEndPoint InternalEndPoint |
150 | { | 133 | { |
151 | get | 134 | get { return m_internalEndPoint; } |
152 | { | 135 | set { m_internalEndPoint = value; } |
153 | return m_internalEndPoint; | ||
154 | } | ||
155 | set | ||
156 | { | ||
157 | m_internalEndPoint = value; | ||
158 | } | ||
159 | } | 136 | } |
160 | 137 | ||
161 | protected uint? m_regionLocX; | 138 | protected uint? m_regionLocX; |
139 | |||
162 | public uint RegionLocX | 140 | public uint RegionLocX |
163 | { | 141 | { |
164 | get | 142 | get { return m_regionLocX.Value; } |
165 | { | 143 | set { m_regionLocX = value; } |
166 | return m_regionLocX.Value; | ||
167 | } | ||
168 | set | ||
169 | { | ||
170 | m_regionLocX = value; | ||
171 | } | ||
172 | } | 144 | } |
173 | 145 | ||
174 | protected uint? m_regionLocY; | 146 | protected uint? m_regionLocY; |
147 | |||
175 | public uint RegionLocY | 148 | public uint RegionLocY |
176 | { | 149 | { |
177 | get | 150 | get { return m_regionLocY.Value; } |
178 | { | 151 | set { m_regionLocY = value; } |
179 | return m_regionLocY.Value; | ||
180 | } | ||
181 | set | ||
182 | { | ||
183 | m_regionLocY = value; | ||
184 | } | ||
185 | } | 152 | } |
186 | 153 | ||
187 | public ulong RegionHandle | 154 | public ulong RegionHandle |
188 | { | 155 | { |
189 | get | 156 | get { return Util.UIntsToLong((RegionLocX*256), (RegionLocY*256)); } |
190 | { | ||
191 | return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); | ||
192 | } | ||
193 | } | 157 | } |
194 | } | 158 | } |
195 | 159 | } \ No newline at end of file | |
196 | } | ||
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index d865ae8..7af1716 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Servers | |||
97 | 97 | ||
98 | HttpListenerRequest request = context.Request; | 98 | HttpListenerRequest request = context.Request; |
99 | HttpListenerResponse response = context.Response; | 99 | HttpListenerResponse response = context.Response; |
100 | 100 | ||
101 | 101 | ||
102 | response.KeepAlive = false; | 102 | response.KeepAlive = false; |
103 | response.SendChunked = false; | 103 | response.SendChunked = false; |
@@ -192,15 +192,12 @@ namespace OpenSim.Framework.Servers | |||
192 | MainLog.Instance.Error("XML", responseString); | 192 | MainLog.Instance.Error("XML", responseString); |
193 | string[] querystringkeys = request.QueryString.AllKeys; | 193 | string[] querystringkeys = request.QueryString.AllKeys; |
194 | string[] rHeaders = request.Headers.AllKeys; | 194 | string[] rHeaders = request.Headers.AllKeys; |
195 | |||
196 | |||
197 | 195 | ||
198 | 196 | ||
199 | foreach (string queryname in querystringkeys) | 197 | foreach (string queryname in querystringkeys) |
200 | { | 198 | { |
201 | keysvals.Add(queryname, request.QueryString[queryname]); | 199 | keysvals.Add(queryname, request.QueryString[queryname]); |
202 | MainLog.Instance.Warn("HTTP", queryname + "=" + request.QueryString[queryname]); | 200 | MainLog.Instance.Warn("HTTP", queryname + "=" + request.QueryString[queryname]); |
203 | |||
204 | } | 201 | } |
205 | foreach (string headername in rHeaders) | 202 | foreach (string headername in rHeaders) |
206 | { | 203 | { |
@@ -218,7 +215,6 @@ namespace OpenSim.Framework.Servers | |||
218 | string methodName = xmlRprcRequest.MethodName; | 215 | string methodName = xmlRprcRequest.MethodName; |
219 | if (methodName != null) | 216 | if (methodName != null) |
220 | { | 217 | { |
221 | |||
222 | XmlRpcResponse xmlRpcResponse; | 218 | XmlRpcResponse xmlRpcResponse; |
223 | 219 | ||
224 | XmlRpcMethod method; | 220 | XmlRpcMethod method; |
@@ -241,8 +237,8 @@ namespace OpenSim.Framework.Servers | |||
241 | } | 237 | } |
242 | else | 238 | else |
243 | { | 239 | { |
244 | System.Console.WriteLine("Handler not found for http request " +request.RawUrl); | 240 | System.Console.WriteLine("Handler not found for http request " + request.RawUrl); |
245 | responseString = "Error"; | 241 | responseString = "Error"; |
246 | } | 242 | } |
247 | } | 243 | } |
248 | 244 | ||
@@ -266,7 +262,8 @@ namespace OpenSim.Framework.Servers | |||
266 | response.OutputStream.Close(); | 262 | response.OutputStream.Close(); |
267 | } | 263 | } |
268 | } | 264 | } |
269 | public void HandleHTTPRequest(Hashtable keysvals, HttpListenerRequest request, HttpListenerResponse response) | 265 | |
266 | public void HandleHTTPRequest(Hashtable keysvals, HttpListenerRequest request, HttpListenerResponse response) | ||
270 | { | 267 | { |
271 | // This is a test. There's a workable alternative.. as this way sucks. | 268 | // This is a test. There's a workable alternative.. as this way sucks. |
272 | // We'd like to put this into a text file parhaps that's easily editable. | 269 | // We'd like to put this into a text file parhaps that's easily editable. |
@@ -280,12 +277,14 @@ namespace OpenSim.Framework.Servers | |||
280 | // to display the form, or process it. | 277 | // to display the form, or process it. |
281 | // a better way would be nifty. | 278 | // a better way would be nifty. |
282 | 279 | ||
283 | if ((string)keysvals["show_login_form"] == "TRUE") | 280 | if ((string) keysvals["show_login_form"] == "TRUE") |
284 | { | 281 | { |
285 | string responseString = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; | 282 | string responseString = |
283 | "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; | ||
286 | responseString = responseString + "<html xmlns=\"http://www.w3.org/1999/xhtml\">"; | 284 | responseString = responseString + "<html xmlns=\"http://www.w3.org/1999/xhtml\">"; |
287 | responseString = responseString + "<head>"; | 285 | responseString = responseString + "<head>"; |
288 | responseString = responseString + "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"; | 286 | responseString = responseString + |
287 | "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"; | ||
289 | responseString = responseString + "<meta http-equiv=\"cache-control\" content=\"no-cache\">"; | 288 | responseString = responseString + "<meta http-equiv=\"cache-control\" content=\"no-cache\">"; |
290 | responseString = responseString + "<meta http-equiv=\"Pragma\" content=\"no-cache\">"; | 289 | responseString = responseString + "<meta http-equiv=\"Pragma\" content=\"no-cache\">"; |
291 | responseString = responseString + "<title>Second Life Login</title>"; | 290 | responseString = responseString + "<title>Second Life Login</title>"; |
@@ -299,37 +298,50 @@ namespace OpenSim.Framework.Servers | |||
299 | responseString = responseString + "</div>"; | 298 | responseString = responseString + "</div>"; |
300 | responseString = responseString + "<fieldset id=\"firstname\">"; | 299 | responseString = responseString + "<fieldset id=\"firstname\">"; |
301 | responseString = responseString + "<legend>First Name:</legend>"; | 300 | responseString = responseString + "<legend>First Name:</legend>"; |
302 | responseString = responseString + "<input type=\"text\" id=\"firstname_input\" size=\"15\" maxlength=\"100\" name=\"username\" value=\"" + keysvals["username"] + "\" />"; | 301 | responseString = responseString + |
302 | "<input type=\"text\" id=\"firstname_input\" size=\"15\" maxlength=\"100\" name=\"username\" value=\"" + | ||
303 | keysvals["username"] + "\" />"; | ||
303 | responseString = responseString + "</fieldset>"; | 304 | responseString = responseString + "</fieldset>"; |
304 | responseString = responseString + "<fieldset id=\"lastname\">"; | 305 | responseString = responseString + "<fieldset id=\"lastname\">"; |
305 | responseString = responseString + "<legend>Last Name:</legend>"; | 306 | responseString = responseString + "<legend>Last Name:</legend>"; |
306 | responseString = responseString + "<input type=\"text\" size=\"15\" maxlength=\"100\" name=\"lastname\" value=\"" + keysvals["lastname"] + "\" />"; | 307 | responseString = responseString + |
308 | "<input type=\"text\" size=\"15\" maxlength=\"100\" name=\"lastname\" value=\"" + | ||
309 | keysvals["lastname"] + "\" />"; | ||
307 | responseString = responseString + "</fieldset>"; | 310 | responseString = responseString + "</fieldset>"; |
308 | responseString = responseString + "<fieldset id=\"password\">"; | 311 | responseString = responseString + "<fieldset id=\"password\">"; |
309 | responseString = responseString + "<legend>Password:</legend>"; | 312 | responseString = responseString + "<legend>Password:</legend>"; |
310 | responseString = responseString + "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"; | 313 | responseString = responseString + "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"; |
311 | responseString = responseString + "<tr>"; | 314 | responseString = responseString + "<tr>"; |
312 | responseString = responseString + "<td colspan=\"2\"><input type=\"password\" size=\"15\" maxlength=\"100\" name=\"password\" value=\"" + keysvals["password"] + "\" /></td>"; | 315 | responseString = responseString + |
316 | "<td colspan=\"2\"><input type=\"password\" size=\"15\" maxlength=\"100\" name=\"password\" value=\"" + | ||
317 | keysvals["password"] + "\" /></td>"; | ||
313 | responseString = responseString + "</tr>"; | 318 | responseString = responseString + "</tr>"; |
314 | responseString = responseString + "<tr>"; | 319 | responseString = responseString + "<tr>"; |
315 | responseString = responseString + "<td valign=\"middle\"><input type=\"checkbox\" name=\"remember_password\" id=\"remember_password\" value=\"" + keysvals["remember_password"] + "\" checked style=\"margin-left:0px;\"/></td>"; | 320 | responseString = responseString + |
321 | "<td valign=\"middle\"><input type=\"checkbox\" name=\"remember_password\" id=\"remember_password\" value=\"" + | ||
322 | keysvals["remember_password"] + "\" checked style=\"margin-left:0px;\"/></td>"; | ||
316 | responseString = responseString + "<td><label for=\"remember_password\">Remember password</label></td>"; | 323 | responseString = responseString + "<td><label for=\"remember_password\">Remember password</label></td>"; |
317 | responseString = responseString + "</tr>"; | 324 | responseString = responseString + "</tr>"; |
318 | responseString = responseString + "</table>"; | 325 | responseString = responseString + "</table>"; |
319 | responseString = responseString + "</fieldset>"; | 326 | responseString = responseString + "</fieldset>"; |
320 | responseString = responseString + "<input type=\"hidden\" name=\"show_login_form\" value=\"FALSE\" />"; | 327 | responseString = responseString + "<input type=\"hidden\" name=\"show_login_form\" value=\"FALSE\" />"; |
321 | responseString = responseString + "<input type=\"hidden\" id=\"grid\" name=\"grid\" value=\"" + keysvals["grid"] + "\" />"; | 328 | responseString = responseString + "<input type=\"hidden\" id=\"grid\" name=\"grid\" value=\"" + |
329 | keysvals["grid"] + "\" />"; | ||
322 | responseString = responseString + "<div id=\"submitbtn\">"; | 330 | responseString = responseString + "<div id=\"submitbtn\">"; |
323 | responseString = responseString + "<input class=\"input_over\" type=\"submit\" value=\"Connect\" />"; | 331 | responseString = responseString + "<input class=\"input_over\" type=\"submit\" value=\"Connect\" />"; |
324 | responseString = responseString + "</div>"; | 332 | responseString = responseString + "</div>"; |
325 | responseString = responseString + "<div id=\"connecting\" style=\"visibility:hidden\"><img src=\"/_img/sl_logo_rotate_black.gif\" align=\"absmiddle\"> Connecting...</div>"; | 333 | responseString = responseString + |
334 | "<div id=\"connecting\" style=\"visibility:hidden\"><img src=\"/_img/sl_logo_rotate_black.gif\" align=\"absmiddle\"> Connecting...</div>"; | ||
326 | 335 | ||
327 | responseString = responseString + "<div id=\"helplinks\">"; | 336 | responseString = responseString + "<div id=\"helplinks\">"; |
328 | responseString = responseString + "<a href=\"http://www.secondlife.com/join/index.php\" target=\"_blank\">Create new account</a> | "; | 337 | responseString = responseString + |
329 | responseString = responseString + "<a href=\"http://www.secondlife.com/account/request.php\" target=\"_blank\">Forgot password?</a>"; | 338 | "<a href=\"http://www.secondlife.com/join/index.php\" target=\"_blank\">Create new account</a> | "; |
339 | responseString = responseString + | ||
340 | "<a href=\"http://www.secondlife.com/account/request.php\" target=\"_blank\">Forgot password?</a>"; | ||
330 | responseString = responseString + "</div>"; | 341 | responseString = responseString + "</div>"; |
331 | 342 | ||
332 | responseString = responseString + "<div id=\"channelinfo\"> " + keysvals["channel"] + " | " + keysvals["version"] + "=" + keysvals["lang"] + "</div>"; | 343 | responseString = responseString + "<div id=\"channelinfo\"> " + keysvals["channel"] + " | " + |
344 | keysvals["version"] + "=" + keysvals["lang"] + "</div>"; | ||
333 | responseString = responseString + "</form>"; | 345 | responseString = responseString + "</form>"; |
334 | responseString = responseString + "<script language=\"JavaScript\">"; | 346 | responseString = responseString + "<script language=\"JavaScript\">"; |
335 | responseString = responseString + "document.getElementById('firstname_input').focus();"; | 347 | responseString = responseString + "document.getElementById('firstname_input').focus();"; |
@@ -359,7 +371,7 @@ namespace OpenSim.Framework.Servers | |||
359 | } | 371 | } |
360 | } // show_login_form == "TRUE" | 372 | } // show_login_form == "TRUE" |
361 | else | 373 | else |
362 | { | 374 | { |
363 | // show_login_form is present but FALSE | 375 | // show_login_form is present but FALSE |
364 | // | 376 | // |
365 | // The idea here is that we're telling the client to log in immediately here using the following information | 377 | // The idea here is that we're telling the client to log in immediately here using the following information |
@@ -371,12 +383,14 @@ namespace OpenSim.Framework.Servers | |||
371 | // | 383 | // |
372 | 384 | ||
373 | response.StatusCode = 301; | 385 | response.StatusCode = 301; |
374 | response.RedirectLocation = "secondlife:///app/login?first_name=" + keysvals["username"] + "&last_name=" + keysvals["lastname"] + "&location=home&grid=Other&web_login_key=796f2b2a-0131-41e4-af12-00f60c24c458"; | 386 | response.RedirectLocation = "secondlife:///app/login?first_name=" + keysvals["username"] + "&last_name=" + |
375 | 387 | keysvals["lastname"] + | |
388 | "&location=home&grid=Other&web_login_key=796f2b2a-0131-41e4-af12-00f60c24c458"; | ||
389 | |||
376 | response.OutputStream.Close(); | 390 | response.OutputStream.Close(); |
377 | } // show_login_form == "FALSE" | 391 | } // show_login_form == "FALSE" |
378 | |||
379 | } | 392 | } |
393 | |||
380 | public void Start() | 394 | public void Start() |
381 | { | 395 | { |
382 | MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server"); | 396 | MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server"); |
@@ -422,4 +436,4 @@ namespace OpenSim.Framework.Servers | |||
422 | m_streamHandlers.Remove(GetHandlerKey(httpMethod, path)); | 436 | m_streamHandlers.Remove(GetHandlerKey(httpMethod, path)); |
423 | } | 437 | } |
424 | } | 438 | } |
425 | } | 439 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs index e3a5df3..47b3f24 100644 --- a/OpenSim/Framework/Servers/CheckSumServer.cs +++ b/OpenSim/Framework/Servers/CheckSumServer.cs | |||
@@ -124,4 +124,4 @@ namespace OpenSim.Framework.Servers | |||
124 | } | 124 | } |
125 | * } | 125 | * } |
126 | */ | 126 | */ |
127 | } | 127 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/RestMethod.cs b/OpenSim/Framework/Servers/RestMethod.cs index 34e2669..ce2239b 100644 --- a/OpenSim/Framework/Servers/RestMethod.cs +++ b/OpenSim/Framework/Servers/RestMethod.cs | |||
@@ -28,4 +28,4 @@ | |||
28 | namespace OpenSim.Framework.Servers | 28 | namespace OpenSim.Framework.Servers |
29 | { | 29 | { |
30 | public delegate string RestMethod(string request, string path, string param); | 30 | public delegate string RestMethod(string request, string path, string param); |
31 | } | 31 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/RestObjectPoster.cs b/OpenSim/Framework/Servers/RestObjectPoster.cs index b1565f1..212361c 100644 --- a/OpenSim/Framework/Servers/RestObjectPoster.cs +++ b/OpenSim/Framework/Servers/RestObjectPoster.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -44,7 +44,7 @@ namespace OpenSim.Framework.Servers | |||
44 | 44 | ||
45 | public static void BeginPostObject<TRequest>(string verb, string requestUrl, TRequest obj) | 45 | public static void BeginPostObject<TRequest>(string verb, string requestUrl, TRequest obj) |
46 | { | 46 | { |
47 | Type type = typeof(TRequest); | 47 | Type type = typeof (TRequest); |
48 | 48 | ||
49 | WebRequest request = WebRequest.Create(requestUrl); | 49 | WebRequest request = WebRequest.Create(requestUrl); |
50 | request.Method = verb; | 50 | request.Method = verb; |
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Servers | |||
62 | writer.Flush(); | 62 | writer.Flush(); |
63 | } | 63 | } |
64 | 64 | ||
65 | int length = (int)buffer.Length; | 65 | int length = (int) buffer.Length; |
66 | request.ContentLength = length; | 66 | request.ContentLength = length; |
67 | 67 | ||
68 | Stream requestStream = request.GetRequestStream(); | 68 | Stream requestStream = request.GetRequestStream(); |
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Servers | |||
72 | 72 | ||
73 | private static void AsyncCallback(IAsyncResult result) | 73 | private static void AsyncCallback(IAsyncResult result) |
74 | { | 74 | { |
75 | WebRequest request = (WebRequest)result.AsyncState; | 75 | WebRequest request = (WebRequest) result.AsyncState; |
76 | using (WebResponse resp = request.EndGetResponse(result)) | 76 | using (WebResponse resp = request.EndGetResponse(result)) |
77 | { | 77 | { |
78 | } | 78 | } |
diff --git a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs index 9d1f819..2961e04 100644 --- a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs +++ b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -48,7 +48,7 @@ namespace OpenSim.Framework.Servers | |||
48 | 48 | ||
49 | public void BeginPostObject<TRequest>(string verb, string requestUrl, TRequest obj) | 49 | public void BeginPostObject<TRequest>(string verb, string requestUrl, TRequest obj) |
50 | { | 50 | { |
51 | Type type = typeof(TRequest); | 51 | Type type = typeof (TRequest); |
52 | 52 | ||
53 | WebRequest request = WebRequest.Create(requestUrl); | 53 | WebRequest request = WebRequest.Create(requestUrl); |
54 | request.Method = verb; | 54 | request.Method = verb; |
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Servers | |||
66 | writer.Flush(); | 66 | writer.Flush(); |
67 | } | 67 | } |
68 | 68 | ||
69 | int length = (int)buffer.Length; | 69 | int length = (int) buffer.Length; |
70 | request.ContentLength = length; | 70 | request.ContentLength = length; |
71 | 71 | ||
72 | Stream requestStream = request.GetRequestStream(); | 72 | Stream requestStream = request.GetRequestStream(); |
@@ -76,12 +76,12 @@ namespace OpenSim.Framework.Servers | |||
76 | 76 | ||
77 | private void AsyncCallback(IAsyncResult result) | 77 | private void AsyncCallback(IAsyncResult result) |
78 | { | 78 | { |
79 | WebRequest request = (WebRequest)result.AsyncState; | 79 | WebRequest request = (WebRequest) result.AsyncState; |
80 | using (WebResponse resp = request.EndGetResponse(result)) | 80 | using (WebResponse resp = request.EndGetResponse(result)) |
81 | { | 81 | { |
82 | TResponse deserial; | 82 | TResponse deserial; |
83 | XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); | 83 | XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); |
84 | deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream()); | 84 | deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); |
85 | 85 | ||
86 | if (deserial != null && ResponseCallback != null) | 86 | if (deserial != null && ResponseCallback != null) |
87 | { | 87 | { |
@@ -90,4 +90,4 @@ namespace OpenSim.Framework.Servers | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | } | 92 | } |
93 | } | 93 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs index 6338531..cfb585b 100644 --- a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs +++ b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -39,7 +39,7 @@ namespace OpenSim.Framework.Servers | |||
39 | { | 39 | { |
40 | public static TResponse BeginPostObject<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) | 40 | public static TResponse BeginPostObject<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) |
41 | { | 41 | { |
42 | Type type = typeof(TRequest); | 42 | Type type = typeof (TRequest); |
43 | 43 | ||
44 | WebRequest request = WebRequest.Create(requestUrl); | 44 | WebRequest request = WebRequest.Create(requestUrl); |
45 | request.Method = verb; | 45 | request.Method = verb; |
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Servers | |||
57 | writer.Flush(); | 57 | writer.Flush(); |
58 | } | 58 | } |
59 | 59 | ||
60 | int length = (int)buffer.Length; | 60 | int length = (int) buffer.Length; |
61 | request.ContentLength = length; | 61 | request.ContentLength = length; |
62 | 62 | ||
63 | Stream requestStream = request.GetRequestStream(); | 63 | Stream requestStream = request.GetRequestStream(); |
@@ -65,12 +65,10 @@ namespace OpenSim.Framework.Servers | |||
65 | TResponse deserial = default(TResponse); | 65 | TResponse deserial = default(TResponse); |
66 | using (WebResponse resp = request.GetResponse()) | 66 | using (WebResponse resp = request.GetResponse()) |
67 | { | 67 | { |
68 | 68 | XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); | |
69 | XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); | 69 | deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); |
70 | deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream()); | ||
71 | } | 70 | } |
72 | return deserial; | 71 | return deserial; |
73 | } | 72 | } |
74 | |||
75 | } | 73 | } |
76 | } | 74 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/XmlRpcMethod.cs b/OpenSim/Framework/Servers/XmlRpcMethod.cs index e4993e3..b156cdd 100644 --- a/OpenSim/Framework/Servers/XmlRpcMethod.cs +++ b/OpenSim/Framework/Servers/XmlRpcMethod.cs | |||
@@ -30,4 +30,4 @@ using Nwc.XmlRpc; | |||
30 | namespace OpenSim.Framework.Servers | 30 | namespace OpenSim.Framework.Servers |
31 | { | 31 | { |
32 | public delegate XmlRpcResponse XmlRpcMethod(XmlRpcRequest request); | 32 | public delegate XmlRpcResponse XmlRpcMethod(XmlRpcRequest request); |
33 | } | 33 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs index 39b1599..7ca2512 100644 --- a/OpenSim/Framework/UserConfig.cs +++ b/OpenSim/Framework/UserConfig.cs | |||
@@ -76,7 +76,8 @@ namespace OpenSim.Framework | |||
76 | configMember.addConfigurationOption("default_inventory_server", | 76 | configMember.addConfigurationOption("default_inventory_server", |
77 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 77 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
78 | "Default Inventory Server URI", | 78 | "Default Inventory Server URI", |
79 | "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString() + "/", false); | 79 | "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString() + "/", |
80 | false); | ||
80 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 81 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
81 | "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); | 82 | "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); |
82 | 83 | ||
@@ -107,7 +108,7 @@ namespace OpenSim.Framework | |||
107 | GridRecvKey = (string) configuration_result; | 108 | GridRecvKey = (string) configuration_result; |
108 | break; | 109 | break; |
109 | case "default_inventory_server": | 110 | case "default_inventory_server": |
110 | InventoryUrl = (string)configuration_result; | 111 | InventoryUrl = (string) configuration_result; |
111 | break; | 112 | break; |
112 | case "database_provider": | 113 | case "database_provider": |
113 | DatabaseProvider = (string) configuration_result; | 114 | DatabaseProvider = (string) configuration_result; |
@@ -116,13 +117,13 @@ namespace OpenSim.Framework | |||
116 | HttpPort = (uint) configuration_result; | 117 | HttpPort = (uint) configuration_result; |
117 | break; | 118 | break; |
118 | case "http_ssl": | 119 | case "http_ssl": |
119 | HttpSSL = (bool)configuration_result; | 120 | HttpSSL = (bool) configuration_result; |
120 | break; | 121 | break; |
121 | case "default_X": | 122 | case "default_X": |
122 | DefaultX = (uint)configuration_result; | 123 | DefaultX = (uint) configuration_result; |
123 | break; | 124 | break; |
124 | case "default_Y": | 125 | case "default_Y": |
125 | DefaultY = (uint)configuration_result; | 126 | DefaultY = (uint) configuration_result; |
126 | break; | 127 | break; |
127 | } | 128 | } |
128 | 129 | ||
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index 40a3d78..4df1ebd 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs | |||
@@ -150,14 +150,13 @@ namespace OpenSim.Framework | |||
150 | /// </summary> | 150 | /// </summary> |
151 | //public class AvatarPickerAvatar | 151 | //public class AvatarPickerAvatar |
152 | //{ | 152 | //{ |
153 | //public LLUUID AvatarID; | 153 | //public LLUUID AvatarID; |
154 | //public string firstName; | 154 | //public string firstName; |
155 | //public string lastName; | 155 | //public string lastName; |
156 | //public AvatarPickerAvatar() | 156 | //public AvatarPickerAvatar() |
157 | //{ | 157 | //{ |
158 | //} | 158 | //} |
159 | //} | 159 | //} |
160 | |||
161 | /// <summary> | 160 | /// <summary> |
162 | /// Information about a users session | 161 | /// Information about a users session |
163 | /// </summary> | 162 | /// </summary> |
@@ -224,4 +223,4 @@ namespace OpenSim.Framework | |||
224 | /// </summary> | 223 | /// </summary> |
225 | public LLVector3 currentPos; | 224 | public LLVector3 currentPos; |
226 | } | 225 | } |
227 | } | 226 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 1c8f273..3654a7d 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -46,12 +46,13 @@ namespace OpenSim.Framework | |||
46 | private static object XferLock = new object(); | 46 | private static object XferLock = new object(); |
47 | private static Dictionary<LLUUID, string> capsURLS = new Dictionary<LLUUID, string>(); | 47 | private static Dictionary<LLUUID, string> capsURLS = new Dictionary<LLUUID, string>(); |
48 | 48 | ||
49 | public static double GetDistanceTo(LLVector3 a, LLVector3 b) { | 49 | public static double GetDistanceTo(LLVector3 a, LLVector3 b) |
50 | float dx = a.X - b.X; | 50 | { |
51 | float dy = a.Y - b.Y; | 51 | float dx = a.X - b.X; |
52 | float dz = a.Z - b.Z; | 52 | float dy = a.Y - b.Y; |
53 | return Math.Sqrt(dx * dx + dy * dy + dz * dz); | 53 | float dz = a.Z - b.Z; |
54 | } | 54 | return Math.Sqrt(dx*dx + dy*dy + dz*dz); |
55 | } | ||
55 | 56 | ||
56 | public static ulong UIntsToLong(uint X, uint Y) | 57 | public static ulong UIntsToLong(uint X, uint Y) |
57 | { | 58 | { |
@@ -383,7 +384,7 @@ namespace OpenSim.Framework | |||
383 | { | 384 | { |
384 | return Math.Min(Math.Max(x, min), max); | 385 | return Math.Min(Math.Max(x, min), max); |
385 | } | 386 | } |
386 | 387 | ||
387 | /// <summary> | 388 | /// <summary> |
388 | /// Convert an LLUUID to a raw uuid string. Right now this is a string without hyphens. | 389 | /// Convert an LLUUID to a raw uuid string. Right now this is a string without hyphens. |
389 | /// </summary> | 390 | /// </summary> |
@@ -394,4 +395,4 @@ namespace OpenSim.Framework | |||
394 | return lluuid.UUID.ToString("n"); | 395 | return lluuid.UUID.ToString("n"); |
395 | } | 396 | } |
396 | } | 397 | } |
397 | } | 398 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/sLLVector3.cs b/OpenSim/Framework/sLLVector3.cs index e74378d..2e2c005 100644 --- a/OpenSim/Framework/sLLVector3.cs +++ b/OpenSim/Framework/sLLVector3.cs | |||
@@ -29,7 +29,6 @@ | |||
29 | using System; | 29 | using System; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | 31 | ||
32 | |||
33 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
34 | { | 33 | { |
35 | [Serializable] | 34 | [Serializable] |
@@ -37,17 +36,17 @@ namespace OpenSim.Framework | |||
37 | { | 36 | { |
38 | public sLLVector3() | 37 | public sLLVector3() |
39 | { | 38 | { |
40 | |||
41 | } | 39 | } |
40 | |||
42 | public sLLVector3(LLVector3 v) | 41 | public sLLVector3(LLVector3 v) |
43 | { | 42 | { |
44 | x = v.X; | 43 | x = v.X; |
45 | y = v.Y; | 44 | y = v.Y; |
46 | z = v.Z; | 45 | z = v.Z; |
47 | } | 46 | } |
47 | |||
48 | public float x; | 48 | public float x; |
49 | public float y; | 49 | public float y; |
50 | public float z; | 50 | public float z; |
51 | } | 51 | } |
52 | 52 | } \ No newline at end of file | |
53 | } | ||