aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-04-04 02:24:52 +0100
committerMelanie2010-04-04 02:24:52 +0100
commitdc58c985e8850d54b09f47c7938f255cca476167 (patch)
tree49c7436e3ed86cfec2bc50127b2f7afbd1722200 /OpenSim/Region
parentPatch from mcortez. This appears to be a huge change to the groups module (diff)
parent* Guard against null in last commit (diff)
downloadopensim-SC_OLD-dc58c985e8850d54b09f47c7938f255cca476167.zip
opensim-SC_OLD-dc58c985e8850d54b09f47c7938f255cca476167.tar.gz
opensim-SC_OLD-dc58c985e8850d54b09f47c7938f255cca476167.tar.bz2
opensim-SC_OLD-dc58c985e8850d54b09f47c7938f255cca476167.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs35
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs62
3 files changed, 57 insertions, 46 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 850474d..41e41e4 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -513,6 +513,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
513 byte flags = buffer.Data[0]; 513 byte flags = buffer.Data[0];
514 bool isResend = (flags & Helpers.MSG_RESENT) != 0; 514 bool isResend = (flags & Helpers.MSG_RESENT) != 0;
515 bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0; 515 bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0;
516 bool isZerocoded = (flags & Helpers.MSG_ZEROCODED) != 0;
516 LLUDPClient udpClient = outgoingPacket.Client; 517 LLUDPClient udpClient = outgoingPacket.Client;
517 518
518 if (!udpClient.IsConnected) 519 if (!udpClient.IsConnected)
@@ -522,23 +523,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
522 523
523 int dataLength = buffer.DataLength; 524 int dataLength = buffer.DataLength;
524 525
525 // Keep appending ACKs until there is no room left in the buffer or there are 526 // NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here
526 // no more ACKs to append 527 if (!isZerocoded)
527 uint ackCount = 0;
528 uint ack;
529 while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack))
530 { 528 {
531 Utils.UIntToBytesBig(ack, buffer.Data, dataLength); 529 // Keep appending ACKs until there is no room left in the buffer or there are
532 dataLength += 4; 530 // no more ACKs to append
533 ++ackCount; 531 uint ackCount = 0;
534 } 532 uint ack;
533 while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack))
534 {
535 Utils.UIntToBytesBig(ack, buffer.Data, dataLength);
536 dataLength += 4;
537 ++ackCount;
538 }
535 539
536 if (ackCount > 0) 540 if (ackCount > 0)
537 { 541 {
538 // Set the last byte of the packet equal to the number of appended ACKs 542 // Set the last byte of the packet equal to the number of appended ACKs
539 buffer.Data[dataLength++] = (byte)ackCount; 543 buffer.Data[dataLength++] = (byte)ackCount;
540 // Set the appended ACKs flag on this packet 544 // Set the appended ACKs flag on this packet
541 buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS); 545 buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
546 }
542 } 547 }
543 548
544 buffer.DataLength = dataLength; 549 buffer.DataLength = dataLength;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
index 488dbd5..3321b38 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
@@ -144,6 +144,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
144 return account; 144 return account;
145 } 145 }
146 146
147 public override bool StoreUserAccount(UserAccount data)
148 {
149 // This remote connector refuses to serve this method
150 return false;
151 }
152
147 #endregion 153 #endregion
148 } 154 }
149} 155}
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 5328d7a..e5dab93 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -600,14 +600,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
600 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) 600 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
601 { 601 {
602 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 602 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
603 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); 603 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID);
604 604
605 if (m_debugEnabled) 605 if (m_debugEnabled)
606 { 606 {
607 foreach (GroupMembersData member in data) 607 foreach (GroupMembersData member in data)
608 { 608 {
609 m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner); 609 m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner);
610 } 610 }
611 } 611 }
612 612
613 return data; 613 return data;
@@ -627,14 +627,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
627 { 627 {
628 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 628 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
629 629
630 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID); 630 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID);
631 631
632 if (m_debugEnabled) 632 if (m_debugEnabled)
633 { 633 {
634 foreach (GroupRoleMembersData member in data) 634 foreach (GroupRoleMembersData member in data)
635 { 635 {
636 m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID); 636 m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID);
637 } 637 }
638 } 638 }
639 return data; 639 return data;
640 } 640 }
@@ -1143,11 +1143,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1143 OSDMap llDataStruct = new OSDMap(3); 1143 OSDMap llDataStruct = new OSDMap(3);
1144 llDataStruct.Add("AgentData", AgentData); 1144 llDataStruct.Add("AgentData", AgentData);
1145 llDataStruct.Add("GroupData", GroupData); 1145 llDataStruct.Add("GroupData", GroupData);
1146 llDataStruct.Add("NewGroupData", NewGroupData); 1146 llDataStruct.Add("NewGroupData", NewGroupData);
1147 1147
1148 if (m_debugEnabled) 1148 if (m_debugEnabled)
1149 { 1149 {
1150 m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct)); 1150 m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct));
1151 } 1151 }
1152 1152
1153 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); 1153 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
@@ -1307,16 +1307,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1307 // 1307 //
1308 } 1308 }
1309 1309
1310 #endregion 1310 #endregion
1311 1311
1312 private UUID GetRequestingAgentID(IClientAPI client) 1312 private UUID GetRequestingAgentID(IClientAPI client)
1313 { 1313 {
1314 UUID requestingAgentID = UUID.Zero; 1314 UUID requestingAgentID = UUID.Zero;
1315 if (client != null) 1315 if (client != null)
1316 { 1316 {
1317 requestingAgentID = client.AgentId; 1317 requestingAgentID = client.AgentId;
1318 } 1318 }
1319 return requestingAgentID; 1319 return requestingAgentID;
1320 } 1320 }
1321 } 1321 }
1322 1322