aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs19
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs75
5 files changed, 92 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index d3bb0bc..8db4e67 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -331,14 +331,22 @@ namespace OpenSim.Region.ClientStack.Linden
331 } 331 }
332 } 332 }
333 333
334 /// <summary>
335 /// Handle a request from the client for a Uri to upload a baked texture.
336 /// </summary>
337 /// <param name="request"></param>
338 /// <param name="path"></param>
339 /// <param name="param"></param>
340 /// <param name="httpRequest"></param>
341 /// <param name="httpResponse"></param>
342 /// <returns>The upload response if the request is successful, null otherwise.</returns>
334 public string UploadBakedTexture(string request, string path, 343 public string UploadBakedTexture(string request, string path,
335 string param, OSHttpRequest httpRequest, 344 string param, OSHttpRequest httpRequest,
336 OSHttpResponse httpResponse) 345 OSHttpResponse httpResponse)
337 { 346 {
338 try 347 try
339 { 348 {
340 // m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + 349// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + m_regionName);
341 // m_regionName);
342 350
343 string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath; 351 string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
344 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); 352 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
@@ -374,6 +382,11 @@ namespace OpenSim.Region.ClientStack.Linden
374 return null; 382 return null;
375 } 383 }
376 384
385 /// <summary>
386 /// Called when a baked texture has been successfully uploaded by a client.
387 /// </summary>
388 /// <param name="assetID"></param>
389 /// <param name="data"></param>
377 public void BakedTextureUploaded(UUID assetID, byte[] data) 390 public void BakedTextureUploaded(UUID assetID, byte[] data)
378 { 391 {
379 // m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString()); 392 // m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
@@ -687,7 +700,7 @@ namespace OpenSim.Region.ClientStack.Linden
687 item.CurrentPermissions = (uint)PermissionMask.All; 700 item.CurrentPermissions = (uint)PermissionMask.All;
688 item.BasePermissions = (uint)PermissionMask.All; 701 item.BasePermissions = (uint)PermissionMask.All;
689 item.EveryOnePermissions = 0; 702 item.EveryOnePermissions = 0;
690 item.NextPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer); 703 item.NextPermissions = (uint)PermissionMask.All;
691 item.CreationDate = Util.UnixTimeSinceEpoch(); 704 item.CreationDate = Util.UnixTimeSinceEpoch();
692 705
693 if (AddNewInventoryItem != null) 706 if (AddNewInventoryItem != null)
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
index c9d7ae1..29a9199 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Region.ClientStack.Linden
124 124
125 private Hashtable MeshUploadFlag(Hashtable mDhttpMethod) 125 private Hashtable MeshUploadFlag(Hashtable mDhttpMethod)
126 { 126 {
127 m_log.DebugFormat("[SIMULATOR FEATURES MODULE]: MeshUploadFlag request"); 127// m_log.DebugFormat("[MESH UPLOAD FLAG MODULE]: MeshUploadFlag request");
128 128
129 OSDMap data = new OSDMap(); 129 OSDMap data = new OSDMap();
130 ScenePresence sp = m_scene.GetScenePresence(m_agentID); 130 ScenePresence sp = m_scene.GetScenePresence(m_agentID);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
index b7e79cc..b2f04f9 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
@@ -160,8 +160,6 @@ namespace OpenSim.Region.ClientStack.Linden
160 } 160 }
161 } 161 }
162 // } 162 // }
163
164
165 163
166 string assetName = llsdRequest.name; 164 string assetName = llsdRequest.name;
167 string assetDes = llsdRequest.description; 165 string assetDes = llsdRequest.description;
@@ -208,12 +206,10 @@ namespace OpenSim.Region.ClientStack.Linden
208 return uploadResponse; 206 return uploadResponse;
209 } 207 }
210 208
211
212 public void UploadCompleteHandler(string assetName, string assetDescription, UUID assetID, 209 public void UploadCompleteHandler(string assetName, string assetDescription, UUID assetID,
213 UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType, 210 UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType,
214 string assetType,UUID AgentID) 211 string assetType,UUID AgentID)
215 { 212 {
216
217 sbyte assType = 0; 213 sbyte assType = 0;
218 sbyte inType = 0; 214 sbyte inType = 0;
219 215
@@ -266,10 +262,10 @@ namespace OpenSim.Region.ClientStack.Linden
266 item.CurrentPermissions = (uint)PermissionMask.All; 262 item.CurrentPermissions = (uint)PermissionMask.All;
267 item.BasePermissions = (uint)PermissionMask.All; 263 item.BasePermissions = (uint)PermissionMask.All;
268 item.EveryOnePermissions = 0; 264 item.EveryOnePermissions = 0;
269 item.NextPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer); 265 item.NextPermissions = (uint)PermissionMask.All;
270 item.CreationDate = Util.UnixTimeSinceEpoch(); 266 item.CreationDate = Util.UnixTimeSinceEpoch();
271 m_scene.AddInventoryItem(item); 267 m_scene.AddInventoryItem(item);
272 268
273 } 269 }
274 } 270 }
275} 271} \ No newline at end of file
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index 15ed3b3..8189518 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -129,7 +129,7 @@ namespace OpenSim.Region.ClientStack.Linden
129 129
130 130
131 /// <summary> 131 /// <summary>
132 /// Parses ad request 132 /// Parses add request
133 /// </summary> 133 /// </summary>
134 /// <param name="request"></param> 134 /// <param name="request"></param>
135 /// <param name="AgentId"></param> 135 /// <param name="AgentId"></param>
@@ -312,11 +312,11 @@ namespace OpenSim.Region.ClientStack.Linden
312 primFace.RepeatV = face.ScaleT; 312 primFace.RepeatV = face.ScaleT;
313 primFace.TexMapType = (MappingType) (face.MediaFlags & 6); 313 primFace.TexMapType = (MappingType) (face.MediaFlags & 6);
314 } 314 }
315
315 pbs.TextureEntry = tmp.GetBytes(); 316 pbs.TextureEntry = tmp.GetBytes();
316 prim.Shape = pbs; 317 prim.Shape = pbs;
317 prim.Scale = obj.Scale; 318 prim.Scale = obj.Scale;
318 319
319
320 SceneObjectGroup grp = new SceneObjectGroup(); 320 SceneObjectGroup grp = new SceneObjectGroup();
321 321
322 grp.SetRootPart(prim); 322 grp.SetRootPart(prim);
@@ -339,8 +339,8 @@ namespace OpenSim.Region.ClientStack.Linden
339 m_scene.AddSceneObject(grp); 339 m_scene.AddSceneObject(grp);
340 grp.AbsolutePosition = obj.Position; 340 grp.AbsolutePosition = obj.Position;
341 } 341 }
342
342 allparts[i] = grp; 343 allparts[i] = grp;
343
344 } 344 }
345 345
346 for (int j = 1; j < allparts.Length; j++) 346 for (int j = 1; j < allparts.Length; j++)
@@ -351,7 +351,9 @@ namespace OpenSim.Region.ClientStack.Linden
351 } 351 }
352 352
353 rootGroup.ScheduleGroupForFullUpdate(); 353 rootGroup.ScheduleGroupForFullUpdate();
354 pos = m_scene.GetNewRezLocation(Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale(), false); 354 pos
355 = m_scene.GetNewRezLocation(
356 Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false);
355 357
356 responsedata["int_response_code"] = 200; //501; //410; //404; 358 responsedata["int_response_code"] = 200; //501; //410; //404;
357 responsedata["content_type"] = "text/plain"; 359 responsedata["content_type"] = "text/plain";
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index c176c2b..a34ad62 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -574,22 +574,42 @@ namespace OpenSim.Region.ClientStack.LindenUDP
574 return result; 574 return result;
575 } 575 }
576 576
577 /// <summary>
578 /// Add a handler for the given packet type.
579 /// </summary>
580 /// <remarks>The packet is handled on its own thread. If packets must be handled in the order in which thye
581 /// are received then please us ethe synchronous version of this method.</remarks>
582 /// <param name="packetType"></param>
583 /// <param name="handler"></param>
584 /// <returns>true if the handler was added. This is currently always the case.</returns>
577 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler) 585 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler)
578 { 586 {
579 return AddLocalPacketHandler(packetType, handler, true); 587 return AddLocalPacketHandler(packetType, handler, true);
580 } 588 }
581 589
582 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool async) 590 /// <summary>
591 /// Add a handler for the given packet type.
592 /// </summary>
593 /// <param name="packetType"></param>
594 /// <param name="handler"></param>
595 /// <param name="doAsync">
596 /// If true, when the packet is received it is handled on its own thread rather than on the main inward bound
597 /// packet handler thread. This vastly increases respnosiveness but some packets need to be handled
598 /// synchronously.
599 /// </param>
600 /// <returns>true if the handler was added. This is currently always the case.</returns>
601 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool doAsync)
583 { 602 {
584 bool result = false; 603 bool result = false;
585 lock (m_packetHandlers) 604 lock (m_packetHandlers)
586 { 605 {
587 if (!m_packetHandlers.ContainsKey(packetType)) 606 if (!m_packetHandlers.ContainsKey(packetType))
588 { 607 {
589 m_packetHandlers.Add(packetType, new PacketProcessor() { method = handler, Async = async }); 608 m_packetHandlers.Add(packetType, new PacketProcessor() { method = handler, Async = doAsync });
590 result = true; 609 result = true;
591 } 610 }
592 } 611 }
612
593 return result; 613 return result;
594 } 614 }
595 615
@@ -11200,8 +11220,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11200 protected bool HandleMultipleObjUpdate(IClientAPI simClient, Packet packet) 11220 protected bool HandleMultipleObjUpdate(IClientAPI simClient, Packet packet)
11201 { 11221 {
11202 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; 11222 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
11203 if (multipleupdate.AgentData.SessionID != SessionId) return false; 11223
11204 // m_log.Debug("new multi update packet " + multipleupdate.ToString()); 11224 if (multipleupdate.AgentData.SessionID != SessionId)
11225 return false;
11226
11227// m_log.DebugFormat(
11228// "[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
11229
11205 Scene tScene = (Scene)m_scene; 11230 Scene tScene = (Scene)m_scene;
11206 11231
11207 for (int i = 0; i < multipleupdate.ObjectData.Length; i++) 11232 for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
@@ -11222,7 +11247,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11222 } 11247 }
11223 else 11248 else
11224 { 11249 {
11225 // UUID partId = part.UUID; 11250// m_log.DebugFormat(
11251// "[CLIENT]: Processing block {0} type {1} for {2} {3}",
11252// i, block.Type, part.Name, part.LocalId);
11253
11254// // Do this once since fetch parts creates a new array.
11255// SceneObjectPart[] parts = part.ParentGroup.Parts;
11256// for (int j = 0; j < parts.Length; j++)
11257// {
11258// part.StoreUndoState();
11259// parts[j].IgnoreUndoUpdate = true;
11260// }
11261
11226 UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; 11262 UpdatePrimGroupRotation handlerUpdatePrimGroupRotation;
11227 11263
11228 switch (block.Type) 11264 switch (block.Type)
@@ -11237,6 +11273,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11237 handlerUpdatePrimSinglePosition(localId, pos1, this); 11273 handlerUpdatePrimSinglePosition(localId, pos1, this);
11238 } 11274 }
11239 break; 11275 break;
11276
11240 case 2: 11277 case 2:
11241 Quaternion rot1 = new Quaternion(block.Data, 0, true); 11278 Quaternion rot1 = new Quaternion(block.Data, 0, true);
11242 11279
@@ -11247,6 +11284,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11247 handlerUpdatePrimSingleRotation(localId, rot1, this); 11284 handlerUpdatePrimSingleRotation(localId, rot1, this);
11248 } 11285 }
11249 break; 11286 break;
11287
11250 case 3: 11288 case 3:
11251 Vector3 rotPos = new Vector3(block.Data, 0); 11289 Vector3 rotPos = new Vector3(block.Data, 0);
11252 Quaternion rot2 = new Quaternion(block.Data, 12, true); 11290 Quaternion rot2 = new Quaternion(block.Data, 12, true);
@@ -11259,6 +11297,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11259 handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this); 11297 handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this);
11260 } 11298 }
11261 break; 11299 break;
11300
11262 case 4: 11301 case 4:
11263 case 20: 11302 case 20:
11264 Vector3 scale4 = new Vector3(block.Data, 0); 11303 Vector3 scale4 = new Vector3(block.Data, 0);
@@ -11270,8 +11309,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11270 handlerUpdatePrimScale(localId, scale4, this); 11309 handlerUpdatePrimScale(localId, scale4, this);
11271 } 11310 }
11272 break; 11311 break;
11273 case 5:
11274 11312
11313 case 5:
11275 Vector3 scale1 = new Vector3(block.Data, 12); 11314 Vector3 scale1 = new Vector3(block.Data, 12);
11276 Vector3 pos11 = new Vector3(block.Data, 0); 11315 Vector3 pos11 = new Vector3(block.Data, 0);
11277 11316
@@ -11288,6 +11327,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11288 } 11327 }
11289 } 11328 }
11290 break; 11329 break;
11330
11291 case 9: 11331 case 9:
11292 Vector3 pos2 = new Vector3(block.Data, 0); 11332 Vector3 pos2 = new Vector3(block.Data, 0);
11293 11333
@@ -11295,10 +11335,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11295 11335
11296 if (handlerUpdateVector != null) 11336 if (handlerUpdateVector != null)
11297 { 11337 {
11298
11299 handlerUpdateVector(localId, pos2, this); 11338 handlerUpdateVector(localId, pos2, this);
11300 } 11339 }
11301 break; 11340 break;
11341
11302 case 10: 11342 case 10:
11303 Quaternion rot3 = new Quaternion(block.Data, 0, true); 11343 Quaternion rot3 = new Quaternion(block.Data, 0, true);
11304 11344
@@ -11309,6 +11349,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11309 handlerUpdatePrimRotation(localId, rot3, this); 11349 handlerUpdatePrimRotation(localId, rot3, this);
11310 } 11350 }
11311 break; 11351 break;
11352
11312 case 11: 11353 case 11:
11313 Vector3 pos3 = new Vector3(block.Data, 0); 11354 Vector3 pos3 = new Vector3(block.Data, 0);
11314 Quaternion rot4 = new Quaternion(block.Data, 12, true); 11355 Quaternion rot4 = new Quaternion(block.Data, 12, true);
@@ -11332,6 +11373,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11332 handlerUpdatePrimGroupScale(localId, scale7, this); 11373 handlerUpdatePrimGroupScale(localId, scale7, this);
11333 } 11374 }
11334 break; 11375 break;
11376
11335 case 13: 11377 case 13:
11336 Vector3 scale2 = new Vector3(block.Data, 12); 11378 Vector3 scale2 = new Vector3(block.Data, 12);
11337 Vector3 pos4 = new Vector3(block.Data, 0); 11379 Vector3 pos4 = new Vector3(block.Data, 0);
@@ -11351,6 +11393,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11351 } 11393 }
11352 } 11394 }
11353 break; 11395 break;
11396
11354 case 29: 11397 case 29:
11355 Vector3 scale5 = new Vector3(block.Data, 12); 11398 Vector3 scale5 = new Vector3(block.Data, 12);
11356 Vector3 pos5 = new Vector3(block.Data, 0); 11399 Vector3 pos5 = new Vector3(block.Data, 0);
@@ -11359,6 +11402,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11359 if (handlerUpdatePrimGroupScale != null) 11402 if (handlerUpdatePrimGroupScale != null)
11360 { 11403 {
11361 // m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 11404 // m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
11405 part.StoreUndoState(true);
11406 part.IgnoreUndoUpdate = true;
11362 handlerUpdatePrimGroupScale(localId, scale5, this); 11407 handlerUpdatePrimGroupScale(localId, scale5, this);
11363 handlerUpdateVector = OnUpdatePrimGroupPosition; 11408 handlerUpdateVector = OnUpdatePrimGroupPosition;
11364 11409
@@ -11366,8 +11411,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11366 { 11411 {
11367 handlerUpdateVector(localId, pos5, this); 11412 handlerUpdateVector(localId, pos5, this);
11368 } 11413 }
11414
11415 part.IgnoreUndoUpdate = false;
11369 } 11416 }
11417
11370 break; 11418 break;
11419
11371 case 21: 11420 case 21:
11372 Vector3 scale6 = new Vector3(block.Data, 12); 11421 Vector3 scale6 = new Vector3(block.Data, 12);
11373 Vector3 pos6 = new Vector3(block.Data, 0); 11422 Vector3 pos6 = new Vector3(block.Data, 0);
@@ -11375,6 +11424,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11375 handlerUpdatePrimScale = OnUpdatePrimScale; 11424 handlerUpdatePrimScale = OnUpdatePrimScale;
11376 if (handlerUpdatePrimScale != null) 11425 if (handlerUpdatePrimScale != null)
11377 { 11426 {
11427 part.StoreUndoState(false);
11428 part.IgnoreUndoUpdate = true;
11429
11378 // m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 11430 // m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
11379 handlerUpdatePrimScale(localId, scale6, this); 11431 handlerUpdatePrimScale(localId, scale6, this);
11380 handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; 11432 handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
@@ -11382,15 +11434,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11382 { 11434 {
11383 handlerUpdatePrimSinglePosition(localId, pos6, this); 11435 handlerUpdatePrimSinglePosition(localId, pos6, this);
11384 } 11436 }
11437
11438 part.IgnoreUndoUpdate = false;
11385 } 11439 }
11386 break; 11440 break;
11441
11387 default: 11442 default:
11388 m_log.Debug("[CLIENT] MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); 11443 m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type));
11389 break; 11444 break;
11390 } 11445 }
11446
11447// for (int j = 0; j < parts.Length; j++)
11448// parts[j].IgnoreUndoUpdate = false;
11391 } 11449 }
11392 } 11450 }
11393 } 11451 }
11452
11394 return true; 11453 return true;
11395 } 11454 }
11396 11455