aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2008-02-16 11:55:09 +0000
committerMW2008-02-16 11:55:09 +0000
commit694dff3b7007760039c9eea95fe9b1a89df68432 (patch)
treee4bd10fd3657dbbaea025b7ebe99e1d8030c7507 /OpenSim
parentUpdate svn properties. (diff)
downloadopensim-SC_OLD-694dff3b7007760039c9eea95fe9b1a89df68432.zip
opensim-SC_OLD-694dff3b7007760039c9eea95fe9b1a89df68432.tar.gz
opensim-SC_OLD-694dff3b7007760039c9eea95fe9b1a89df68432.tar.bz2
opensim-SC_OLD-694dff3b7007760039c9eea95fe9b1a89df68432.tar.xz
Some changes to remove some of the direct calls to CommsManager from Scene, so that they now go through the SceneCommunicationService. As a small step towards the day we can kill the CommsManager (YAY!)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs3
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs40
5 files changed, 51 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index a7e0c22..0a301b5 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -199,7 +199,8 @@ namespace OpenSim.Region.ClientStack
199 199
200 try 200 try
201 { 201 {
202 packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer); 202 packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
203
203 } 204 }
204 catch (Exception e) 205 catch (Exception e)
205 { 206 {
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 53748ab..e6a9621 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -138,7 +138,7 @@ namespace OpenSim.Region.Communications.Local
138 response.SimAddress = reg.ExternalEndPoint.Address.ToString(); 138 response.SimAddress = reg.ExternalEndPoint.Address.ToString();
139 response.SimPort = (uint) reg.ExternalEndPoint.Port; 139 response.SimPort = (uint) reg.ExternalEndPoint.Port;
140 response.RegionX = reg.RegionLocX; 140 response.RegionX = reg.RegionLocX;
141 response.RegionY = reg.RegionLocY; 141 response.RegionY = reg.RegionLocY ;
142 142
143 response.SeedCapability = "http://" + reg.ExternalHostName + ":" + 143 response.SeedCapability = "http://" + reg.ExternalHostName + ":" +
144 serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; 144 serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/";
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 5071f9b..7c0cd77 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Scenes
183 //EventManager.TriggerAvatarPickerRequest(); 183 //EventManager.TriggerAvatarPickerRequest();
184 184
185 List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>(); 185 List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>();
186 AvatarResponses = CommsManager.GenerateAgentPickerRequestResponse(RequestID, query); 186 AvatarResponses = m_sceneGridService.GenerateAgentPickerRequestResponse(RequestID, query);
187 187
188 AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply); 188 AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply);
189 // TODO: don't create new blocks if recycling an old packet 189 // TODO: don't create new blocks if recycling an old packet
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index d8cb11c..b534b4d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -900,7 +900,7 @@ namespace OpenSim.Region.Environment.Scenes
900 public void ExportWorldMap(string fileName) 900 public void ExportWorldMap(string fileName)
901 { 901 {
902 List<MapBlockData> mapBlocks = 902 List<MapBlockData> mapBlocks =
903 CommsManager.GridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9), 903 m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9),
904 (int)(RegionInfo.RegionLocY - 9), 904 (int)(RegionInfo.RegionLocY - 9),
905 (int)(RegionInfo.RegionLocX + 9), 905 (int)(RegionInfo.RegionLocX + 9),
906 (int)(RegionInfo.RegionLocY + 9)); 906 (int)(RegionInfo.RegionLocY + 9));
@@ -1461,7 +1461,7 @@ namespace OpenSim.Region.Environment.Scenes
1461 else 1461 else
1462 { 1462 {
1463 m_innerScene.removeUserCount(true); 1463 m_innerScene.removeUserCount(true);
1464 CommsManager.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, 1464 m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle,
1465 avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, 1465 avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y,
1466 avatar.AbsolutePosition.Z); 1466 avatar.AbsolutePosition.Z);
1467 m_sceneGridService.SendCloseChildAgentConnections(avatar); 1467 m_sceneGridService.SendCloseChildAgentConnections(avatar);
@@ -1530,7 +1530,7 @@ namespace OpenSim.Region.Environment.Scenes
1530 } 1530 }
1531 1531
1532 // Remove client agent from profile, so new logins will work 1532 // Remove client agent from profile, so new logins will work
1533 CommsManager.UserService.clearUserAgent(agentID); 1533 m_sceneGridService.ClearUserAgent(agentID);
1534 1534
1535 //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); 1535 //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false));
1536 //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); 1536 //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true));
@@ -1983,24 +1983,24 @@ namespace OpenSim.Region.Environment.Scenes
1983 public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms) 1983 public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
1984 { 1984 {
1985 // TODO: m_sceneGridService.DoStuff; 1985 // TODO: m_sceneGridService.DoStuff;
1986 CommsManager.AddNewUserFriend(ownerID, friendID, perms); 1986 m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms);
1987 } 1987 }
1988 1988
1989 public virtual void StoreUpdateFriendship(LLUUID ownerID, LLUUID friendID, uint perms) 1989 public virtual void StoreUpdateFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
1990 { 1990 {
1991 // TODO: m_sceneGridService.DoStuff; 1991 // TODO: m_sceneGridService.DoStuff;
1992 CommsManager.UpdateUserFriendPerms(ownerID, friendID, perms); 1992 m_sceneGridService.UpdateUserFriendPerms(ownerID, friendID, perms);
1993 } 1993 }
1994 1994
1995 public virtual void StoreRemoveFriendship(LLUUID ownerID, LLUUID ExfriendID) 1995 public virtual void StoreRemoveFriendship(LLUUID ownerID, LLUUID ExfriendID)
1996 { 1996 {
1997 // TODO: m_sceneGridService.DoStuff; 1997 // TODO: m_sceneGridService.DoStuff;
1998 CommsManager.RemoveUserFriend(ownerID, ExfriendID); 1998 m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID);
1999 } 1999 }
2000 public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID) 2000 public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID)
2001 { 2001 {
2002 // TODO: m_sceneGridService.DoStuff; 2002 // TODO: m_sceneGridService.DoStuff;
2003 return CommsManager.GetUserFriendList(ownerID); 2003 return m_sceneGridService.GetUserFriendList(ownerID);
2004 } 2004 }
2005 2005
2006 public void AddPacketStats(int inPackets, int outPackets, int unAckedBytes) 2006 public void AddPacketStats(int inPackets, int outPackets, int unAckedBytes)
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 482701b..4cf93ed 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -554,5 +554,45 @@ namespace OpenSim.Region.Environment.Scenes
554 { 554 {
555 return m_commsProvider.GridService.GetGridSettings(); 555 return m_commsProvider.GridService.GetGridSettings();
556 } 556 }
557
558 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz)
559 {
560 m_commsProvider.LogOffUser(userid, regionid, regionhandle, posx, posy, posz);
561 }
562
563 public void ClearUserAgent(LLUUID avatarID)
564 {
565 m_commsProvider.UserService.clearUserAgent(avatarID);
566 }
567
568 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
569 {
570 m_commsProvider.AddNewUserFriend(friendlistowner, friend, perms);
571 }
572
573 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
574 {
575 m_commsProvider.UpdateUserFriendPerms(friendlistowner, friend, perms);
576 }
577
578 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
579 {
580 m_commsProvider.RemoveUserFriend(friendlistowner, friend);
581 }
582
583 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner)
584 {
585 return m_commsProvider.GetUserFriendList(friendlistowner);
586 }
587
588 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
589 {
590 return m_commsProvider.GridService.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
591 }
592
593 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query)
594 {
595 return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query);
596 }
557 } 597 }
558} \ No newline at end of file 598} \ No newline at end of file