aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common
diff options
context:
space:
mode:
authorMW2007-06-24 15:24:02 +0000
committerMW2007-06-24 15:24:02 +0000
commit38a800400ae8c61eef0770b8c49aa6e637478e58 (patch)
tree2d53e3c67a0990bf199e8594240cdee8dc1a8494 /Common
parentMore work on CAPS handler. (diff)
downloadopensim-SC-38a800400ae8c61eef0770b8c49aa6e637478e58.zip
opensim-SC-38a800400ae8c61eef0770b8c49aa6e637478e58.tar.gz
opensim-SC-38a800400ae8c61eef0770b8c49aa6e637478e58.tar.bz2
opensim-SC-38a800400ae8c61eef0770b8c49aa6e637478e58.tar.xz
Disabled the CheckSum Server as it seems that isn't used by viewer 1.18.
Started to add support for asset uploads over CAPS (the asset is uploaded but seems to come out corrupt). Started to cleanup/rewrite the AssetCache. Fixed bug in MapBlock requests, where data for some regions wasn't being sent. Renamed PrimData's Texture to TextureEntry. most likely a few other small changes.
Diffstat (limited to 'Common')
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs2
-rw-r--r--Common/OpenSim.Framework/Types/PrimData.cs14
-rw-r--r--Common/OpenSim.Servers/BaseHttpServer.cs20
-rw-r--r--Common/OpenSim.Servers/CheckSumServer.cs7
4 files changed, 31 insertions, 12 deletions
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
index ea38f06..9028d8d 100644
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Framework.Interfaces
144 void SendTeleportCancel(); 144 void SendTeleportCancel();
145 void SendTeleportLocationStart(); 145 void SendTeleportLocationStart();
146 146
147 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos); 147 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry);
148 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity); 148 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity);
149 149
150 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); 150 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
diff --git a/Common/OpenSim.Framework/Types/PrimData.cs b/Common/OpenSim.Framework/Types/PrimData.cs
index 56d41b3..f84ae3e 100644
--- a/Common/OpenSim.Framework/Types/PrimData.cs
+++ b/Common/OpenSim.Framework/Types/PrimData.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Framework.Types
58 public sbyte PathTaperY; 58 public sbyte PathTaperY;
59 public sbyte PathTwist; 59 public sbyte PathTwist;
60 public sbyte PathTwistBegin; 60 public sbyte PathTwistBegin;
61 public byte[] Texture; 61 public byte[] TextureEntry; // a LL textureEntry in byte[] format
62 62
63 public Int32 CreationDate; 63 public Int32 CreationDate;
64 public uint OwnerMask = FULL_MASK_PERMISSIONS; 64 public uint OwnerMask = FULL_MASK_PERMISSIONS;
@@ -105,8 +105,8 @@ namespace OpenSim.Framework.Types
105 this.PathTwist = (sbyte)data[i++]; 105 this.PathTwist = (sbyte)data[i++];
106 this.PathTwistBegin = (sbyte)data[i++]; 106 this.PathTwistBegin = (sbyte)data[i++];
107 ushort length = (ushort)(data[i++] + (data[i++] << 8)); 107 ushort length = (ushort)(data[i++] + (data[i++] << 8));
108 this.Texture = new byte[length]; 108 this.TextureEntry = new byte[length];
109 Array.Copy(data, i, Texture, 0, length); i += length; 109 Array.Copy(data, i, TextureEntry, 0, length); i += length;
110 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 110 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
111 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 111 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
112 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 112 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
@@ -123,7 +123,7 @@ namespace OpenSim.Framework.Types
123 public byte[] ToBytes() 123 public byte[] ToBytes()
124 { 124 {
125 int i = 0; 125 int i = 0;
126 byte[] bytes = new byte[126 + Texture.Length]; 126 byte[] bytes = new byte[126 + TextureEntry.Length];
127 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16; 127 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
128 bytes[i++] = this.PCode; 128 bytes[i++] = this.PCode;
129 bytes[i++] = (byte)(this.PathBegin % 256); 129 bytes[i++] = (byte)(this.PathBegin % 256);
@@ -154,9 +154,9 @@ namespace OpenSim.Framework.Types
154 bytes[i++] = ((byte)this.PathTaperY); 154 bytes[i++] = ((byte)this.PathTaperY);
155 bytes[i++] = ((byte)this.PathTwist); 155 bytes[i++] = ((byte)this.PathTwist);
156 bytes[i++] = ((byte)this.PathTwistBegin); 156 bytes[i++] = ((byte)this.PathTwistBegin);
157 bytes[i++] = (byte)(Texture.Length % 256); 157 bytes[i++] = (byte)(TextureEntry.Length % 256);
158 bytes[i++] = (byte)((Texture.Length >> 8) % 256); 158 bytes[i++] = (byte)((TextureEntry.Length >> 8) % 256);
159 Array.Copy(Texture, 0, bytes, i, Texture.Length); i += Texture.Length; 159 Array.Copy(TextureEntry, 0, bytes, i, TextureEntry.Length); i += TextureEntry.Length;
160 bytes[i++] = (byte)(this.CreationDate % 256); 160 bytes[i++] = (byte)(this.CreationDate % 256);
161 bytes[i++] = (byte)((this.CreationDate >> 8) % 256); 161 bytes[i++] = (byte)((this.CreationDate >> 8) % 256);
162 bytes[i++] = (byte)((this.CreationDate >> 16) % 256); 162 bytes[i++] = (byte)((this.CreationDate >> 16) % 256);
diff --git a/Common/OpenSim.Servers/BaseHttpServer.cs b/Common/OpenSim.Servers/BaseHttpServer.cs
index 1071692..55826f6 100644
--- a/Common/OpenSim.Servers/BaseHttpServer.cs
+++ b/Common/OpenSim.Servers/BaseHttpServer.cs
@@ -88,6 +88,17 @@ namespace OpenSim.Servers
88 return false; 88 return false;
89 } 89 }
90 90
91 public bool RemoveRestHandler(string method, string path)
92 {
93 string methodKey = String.Format("{0}: {1}", method, path);
94 if (this.m_restHandlers.ContainsKey(methodKey))
95 {
96 this.m_restHandlers.Remove(methodKey);
97 return true;
98 }
99 return false;
100 }
101
91 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) 102 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler)
92 { 103 {
93 if (!this.m_rpcHandlers.ContainsKey(method)) 104 if (!this.m_rpcHandlers.ContainsKey(method))
@@ -213,7 +224,7 @@ namespace OpenSim.Servers
213 //Console.WriteLine(requestBody); 224 //Console.WriteLine(requestBody);
214 225
215 string responseString = ""; 226 string responseString = "";
216 //Console.WriteLine("new request " + request.ContentType); 227 Console.WriteLine("new request " + request.ContentType +" at "+ request.RawUrl);
217 switch (request.ContentType) 228 switch (request.ContentType)
218 { 229 {
219 case "text/xml": 230 case "text/xml":
@@ -232,6 +243,13 @@ namespace OpenSim.Servers
232 response.AddHeader("Content-type", "application/xml"); 243 response.AddHeader("Content-type", "application/xml");
233 break; 244 break;
234 245
246 case "application/octet-stream":
247 // probably LLSD we hope, otherwise it should be ignored by the parser
248 // responseString = ParseLLSDXML(requestBody);
249 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
250 response.AddHeader("Content-type", "application/xml");
251 break;
252
235 case "application/x-www-form-urlencoded": 253 case "application/x-www-form-urlencoded":
236 // a form data POST so send to the REST parser 254 // a form data POST so send to the REST parser
237 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); 255 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
diff --git a/Common/OpenSim.Servers/CheckSumServer.cs b/Common/OpenSim.Servers/CheckSumServer.cs
index 14ac11b..a359205 100644
--- a/Common/OpenSim.Servers/CheckSumServer.cs
+++ b/Common/OpenSim.Servers/CheckSumServer.cs
@@ -42,7 +42,7 @@ using OpenSim.Framework.Console;
42 42
43namespace OpenSim.Servers 43namespace OpenSim.Servers
44{ 44{
45 public class CheckSumServer : UDPServerBase 45/* public class CheckSumServer : UDPServerBase
46 { 46 {
47 //protected ConsoleBase m_log; 47 //protected ConsoleBase m_log;
48 48
@@ -79,7 +79,7 @@ namespace OpenSim.Servers
79 SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket(); 79 SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket();
80 checkrequest.TokenBlock.Token = checksum.TokenBlock.Token; 80 checkrequest.TokenBlock.Token = checksum.TokenBlock.Token;
81 this.SendPacket(checkrequest, epSender); 81 this.SendPacket(checkrequest, epSender);
82 */ 82
83 } 83 }
84 else if (packet.Type == PacketType.TemplateChecksumReply) 84 else if (packet.Type == PacketType.TemplateChecksumReply)
85 { 85 {
@@ -136,5 +136,6 @@ namespace OpenSim.Servers
136 { 136 {
137 this.Server.SendTo(buffer, size, flags, endp); 137 this.Server.SendTo(buffer, size, flags, endp);
138 } 138 }
139 } 139 *
140 }*/
140} \ No newline at end of file 141} \ No newline at end of file