aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorMelanie2011-10-12 00:10:15 +0200
committerMelanie2011-10-12 00:10:15 +0200
commit1c2b5d99c9601a3d301f4bc0f53389cca831ee04 (patch)
tree97fa9c758f429d5dee64234e442f2c83cd1b9994 /OpenSim/Region/ClientStack/Linden
parentMerge branch 'careminster-presence-refactor' into bigmerge (diff)
parentMerge commit '92c88121c72386f85472c6cf4891eca8b62b9867' into bigmerge (diff)
downloadopensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.zip
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.gz
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.bz2
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.xz
Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs31
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs17
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs22
3 files changed, 33 insertions, 37 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index 139d8b8..8d0c7a1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -179,9 +179,10 @@ namespace OpenSim.Region.ClientStack.Linden
179 { 179 {
180 Queue<OSD> queue = GetQueue(avatarID); 180 Queue<OSD> queue = GetQueue(avatarID);
181 if (queue != null) 181 if (queue != null)
182 queue.Enqueue(ev); 182 lock (queue)
183 queue.Enqueue(ev);
183 } 184 }
184 catch(NullReferenceException e) 185 catch (NullReferenceException e)
185 { 186 {
186 m_log.Error("[EVENTQUEUE] Caught exception: " + e); 187 m_log.Error("[EVENTQUEUE] Caught exception: " + e);
187 return false; 188 return false;
@@ -338,12 +339,8 @@ namespace OpenSim.Region.ClientStack.Linden
338 Queue<OSD> queue = GetQueue(agentID); 339 Queue<OSD> queue = GetQueue(agentID);
339 if (queue != null) 340 if (queue != null)
340 lock (queue) 341 lock (queue)
341 { 342 return queue.Count > 0;
342 if (queue.Count > 0) 343
343 return true;
344 else
345 return false;
346 }
347 return false; 344 return false;
348 } 345 }
349 346
@@ -358,8 +355,6 @@ namespace OpenSim.Region.ClientStack.Linden
358 element = queue.Dequeue(); // 15s timeout 355 element = queue.Dequeue(); // 15s timeout
359 } 356 }
360 357
361
362
363 int thisID = 0; 358 int thisID = 0;
364 lock (m_ids) 359 lock (m_ids)
365 thisID = m_ids[pAgentId]; 360 thisID = m_ids[pAgentId];
@@ -431,7 +426,10 @@ namespace OpenSim.Region.ClientStack.Linden
431// } 426// }
432 427
433 Queue<OSD> queue = TryGetQueue(agentID); 428 Queue<OSD> queue = TryGetQueue(agentID);
434 OSD element = queue.Dequeue(); // 15s timeout 429 OSD element;
430
431 lock (queue)
432 element = queue.Dequeue(); // 15s timeout
435 433
436 Hashtable responsedata = new Hashtable(); 434 Hashtable responsedata = new Hashtable();
437 435
@@ -470,10 +468,14 @@ namespace OpenSim.Region.ClientStack.Linden
470 else 468 else
471 { 469 {
472 array.Add(element); 470 array.Add(element);
473 while (queue.Count > 0) 471
472 lock (queue)
474 { 473 {
475 array.Add(queue.Dequeue()); 474 while (queue.Count > 0)
476 thisID++; 475 {
476 array.Add(queue.Dequeue());
477 thisID++;
478 }
477 } 479 }
478 } 480 }
479 481
@@ -520,6 +522,7 @@ namespace OpenSim.Region.ClientStack.Linden
520 AvatarID = m_QueueUUIDAvatarMapping[capUUID]; 522 AvatarID = m_QueueUUIDAvatarMapping[capUUID];
521 } 523 }
522 } 524 }
525
523 if (AvatarID != UUID.Zero) 526 if (AvatarID != UUID.Zero)
524 { 527 {
525 return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID)); 528 return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID));
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index db81fea..575e5a2 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -232,7 +232,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
232 public event ScriptReset OnScriptReset; 232 public event ScriptReset OnScriptReset;
233 public event GetScriptRunning OnGetScriptRunning; 233 public event GetScriptRunning OnGetScriptRunning;
234 public event SetScriptRunning OnSetScriptRunning; 234 public event SetScriptRunning OnSetScriptRunning;
235 public event Action<Vector3, bool> OnAutoPilotGo; 235 public event Action<Vector3, bool, bool> OnAutoPilotGo;
236 public event TerrainUnacked OnUnackedTerrain; 236 public event TerrainUnacked OnUnackedTerrain;
237 public event ActivateGesture OnActivateGesture; 237 public event ActivateGesture OnActivateGesture;
238 public event DeactivateGesture OnDeactivateGesture; 238 public event DeactivateGesture OnDeactivateGesture;
@@ -4173,8 +4173,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4173 while (updatesThisCall < m_maxUpdates) 4173 while (updatesThisCall < m_maxUpdates)
4174 { 4174 {
4175 lock (m_entityProps.SyncRoot) 4175 lock (m_entityProps.SyncRoot)
4176 if (!m_entityProps.TryDequeue(out iupdate, out timeinqueue)) 4176 if (!m_entityProps.TryDequeue(out iupdate, out timeinqueue))
4177 break; 4177 break;
4178 4178
4179 ObjectPropertyUpdate update = (ObjectPropertyUpdate)iupdate; 4179 ObjectPropertyUpdate update = (ObjectPropertyUpdate)iupdate;
4180 if (update.SendFamilyProps) 4180 if (update.SendFamilyProps)
@@ -6145,9 +6145,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6145 RezMultipleAttachmentsFromInv handlerRezMultipleAttachments = OnRezMultipleAttachmentsFromInv; 6145 RezMultipleAttachmentsFromInv handlerRezMultipleAttachments = OnRezMultipleAttachmentsFromInv;
6146 if (handlerRezMultipleAttachments != null) 6146 if (handlerRezMultipleAttachments != null)
6147 { 6147 {
6148 RezMultipleAttachmentsFromInvPacket rez = (RezMultipleAttachmentsFromInvPacket)Pack; 6148 List<KeyValuePair<UUID, uint>> rezlist = new List<KeyValuePair<UUID, uint>>();
6149 handlerRezMultipleAttachments(this, rez.HeaderData, 6149 foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in ((RezMultipleAttachmentsFromInvPacket)Pack).ObjectData)
6150 rez.ObjectData); 6150 rezlist.Add(new KeyValuePair<UUID, uint>(obj.ItemID, obj.AttachmentPt));
6151 handlerRezMultipleAttachments(this, rezlist);
6151 } 6152 }
6152 6153
6153 return true; 6154 return true;
@@ -11756,9 +11757,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11756 locy = Convert.ToSingle(args[1]) - (float)regionY; 11757 locy = Convert.ToSingle(args[1]) - (float)regionY;
11757 locz = Convert.ToSingle(args[2]); 11758 locz = Convert.ToSingle(args[2]);
11758 11759
11759 Action<Vector3, bool> handlerAutoPilotGo = OnAutoPilotGo; 11760 Action<Vector3, bool, bool> handlerAutoPilotGo = OnAutoPilotGo;
11760 if (handlerAutoPilotGo != null) 11761 if (handlerAutoPilotGo != null)
11761 handlerAutoPilotGo(new Vector3(locx, locy, locz), false); 11762 handlerAutoPilotGo(new Vector3(locx, locy, locz), false, false);
11762 } 11763 }
11763 11764
11764 /// <summary> 11765 /// <summary>
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index fead4d9..d5b061b 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -929,25 +929,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
929 UUID sessionID = useCircuitCode.CircuitCode.SessionID; 929 UUID sessionID = useCircuitCode.CircuitCode.SessionID;
930 uint circuitCode = useCircuitCode.CircuitCode.Code; 930 uint circuitCode = useCircuitCode.CircuitCode.Code;
931 931
932 if (m_scene.RegionStatus != RegionStatus.SlaveScene) 932 AuthenticateResponse sessionInfo;
933 if (IsClientAuthorized(useCircuitCode, out sessionInfo))
933 { 934 {
934 AuthenticateResponse sessionInfo; 935 AddClient(circuitCode, agentID, sessionID, remoteEndPoint, sessionInfo);
935 if (IsClientAuthorized(useCircuitCode, out sessionInfo))
936 {
937 AddClient(circuitCode, agentID, sessionID, remoteEndPoint, sessionInfo);
938 }
939 else
940 {
941 // Don't create circuits for unauthorized clients
942 m_log.WarnFormat(
943 "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}",
944 useCircuitCode.CircuitCode.ID, useCircuitCode.CircuitCode.Code, remoteEndPoint);
945 }
946 } 936 }
947 else 937 else
948 { 938 {
949 // Slave regions don't accept new clients 939 // Don't create circuits for unauthorized clients
950 m_log.Debug("[LLUDPSERVER]: Slave region " + m_scene.RegionInfo.RegionName + " ignoring UseCircuitCode packet"); 940 m_log.WarnFormat(
941 "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}",
942 useCircuitCode.CircuitCode.ID, useCircuitCode.CircuitCode.Code, remoteEndPoint);
951 } 943 }
952 } 944 }
953 945