aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-05-31 19:25:01 +0100
committerJustin Clark-Casey (justincc)2011-05-31 19:25:01 +0100
commit8129e64e2acea6509d5c3a80425f6aa68baa037c (patch)
tree99f20a6caa70274060e43894f0e1143c20b66822 /OpenSim
parentrevert the patch that accidentally got added in the last commit (diff)
downloadopensim-SC-8129e64e2acea6509d5c3a80425f6aa68baa037c.zip
opensim-SC-8129e64e2acea6509d5c3a80425f6aa68baa037c.tar.gz
opensim-SC-8129e64e2acea6509d5c3a80425f6aa68baa037c.tar.bz2
opensim-SC-8129e64e2acea6509d5c3a80425f6aa68baa037c.tar.xz
Fill in the new OwnerData field in the LLUDP ScriptDialog message.
If we don't do this then viewer 2.8 crashes. Resolves http://opensimulator.org/mantis/view.php?id=5510
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/IClientAPI.cs14
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs11
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs3
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs27
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs2
8 files changed, 49 insertions, 14 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index f3ac2df..137f432 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1159,7 +1159,19 @@ namespace OpenSim.Framework
1159 void SendAgentAlertMessage(string message, bool modal); 1159 void SendAgentAlertMessage(string message, bool modal);
1160 void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); 1160 void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
1161 1161
1162 void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, 1162 /// <summary>
1163 /// Open a dialog box on the client.
1164 /// </summary>
1165 /// <param name="objectname"></param>
1166 /// <param name="objectID"></param>
1167 /// <param name="ownerID">/param>
1168 /// <param name="ownerFirstName"></param>
1169 /// <param name="ownerLastName"></param>
1170 /// <param name="msg"></param>
1171 /// <param name="textureID"></param>
1172 /// <param name="ch"></param>
1173 /// <param name="buttonlabels"></param>
1174 void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
1163 string[] buttonlabels); 1175 string[] buttonlabels);
1164 1176
1165 bool AddMoney(int debit); 1177 bool AddMoney(int debit);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 5a2c45c..821a370 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -2213,7 +2213,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2213 OutPacket(loadURL, ThrottleOutPacketType.Task); 2213 OutPacket(loadURL, ThrottleOutPacketType.Task);
2214 } 2214 }
2215 2215
2216 public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) 2216 public void SendDialog(
2217 string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg,
2218 UUID textureID, int ch, string[] buttonlabels)
2217 { 2219 {
2218 ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); 2220 ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
2219 dialog.Data.ObjectID = objectID; 2221 dialog.Data.ObjectID = objectID;
@@ -2231,6 +2233,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2231 buttons[i].ButtonLabel = Util.StringToBytes256(buttonlabels[i]); 2233 buttons[i].ButtonLabel = Util.StringToBytes256(buttonlabels[i]);
2232 } 2234 }
2233 dialog.Buttons = buttons; 2235 dialog.Buttons = buttons;
2236
2237 dialog.OwnerData = new ScriptDialogPacket.OwnerDataBlock[1];
2238 dialog.OwnerData[0] = new ScriptDialogPacket.OwnerDataBlock();
2239 dialog.OwnerData[0].OwnerID = ownerID;
2240
2234 OutPacket(dialog, ThrottleOutPacketType.Task); 2241 OutPacket(dialog, ThrottleOutPacketType.Task);
2235 } 2242 }
2236 2243
@@ -2293,8 +2300,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2293 OrbitalPosition = (OrbitalPosition - m_sunPainDaHalfOrbitalCutoff) * 0.6666666667f + m_sunPainDaHalfOrbitalCutoff; 2300 OrbitalPosition = (OrbitalPosition - m_sunPainDaHalfOrbitalCutoff) * 0.6666666667f + m_sunPainDaHalfOrbitalCutoff;
2294 } 2301 }
2295 2302
2296
2297
2298 SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); 2303 SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage);
2299 viewertime.TimeInfo.SunDirection = Position; 2304 viewertime.TimeInfo.SunDirection = Position;
2300 viewertime.TimeInfo.SunAngVelocity = Velocity; 2305 viewertime.TimeInfo.SunAngVelocity = Velocity;
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 8a977c9..0db31eb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -124,7 +124,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
124 124
125 ScenePresence sp = m_scene.GetScenePresence(avatarID); 125 ScenePresence sp = m_scene.GetScenePresence(avatarID);
126 if (sp != null) 126 if (sp != null)
127 sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); 127 sp.ControllingClient.SendDialog(
128 objectName, objectID, ownerID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels);
128 } 129 }
129 130
130 public void SendUrlToUser( 131 public void SendUrlToUser(
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 89e9e20..56b46d7 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -540,7 +540,7 @@ namespace OpenSim.Region.Examples.SimpleModule
540 { 540 {
541 } 541 }
542 542
543 public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) 543 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
544 { 544 {
545 } 545 }
546 546
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 4b6e52e..88db20e 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1177,7 +1177,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1177 IRC_SendChannelPrivmsg(objectname,url); 1177 IRC_SendChannelPrivmsg(objectname,url);
1178 } 1178 }
1179 1179
1180 public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) 1180 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
1181 { 1181 {
1182 1182
1183 } 1183 }
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 1c791b9..05223e0 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -1231,20 +1231,36 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1231 List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID); 1231 List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID);
1232 GroupMembershipData[] membershipArray; 1232 GroupMembershipData[] membershipArray;
1233 1233
1234 if (requestingClient.AgentId != dataForAgentID) 1234 // c_scene and property accessor 'is_god' are in support of the opertions to bypass 'hidden' group attributes for
1235 { 1235 // those with a GodLike aspect.
1236 Scene c_scene = (Scene) requestingClient.Scene;
1237 bool is_god = c_scene.Permissions.IsGod(requestingClient.AgentId);
1238
1239 if(is_god) {
1236 Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership) 1240 Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
1237 { 1241 {
1238 return membership.ListInProfile; 1242 return membership.ListInProfile;
1239 }; 1243 };
1240 1244
1241 membershipArray = membershipData.FindAll(showInProfile).ToArray(); 1245 membershipArray = membershipData.ToArray();
1242 } 1246 }
1243 else 1247 else
1244 { 1248 {
1245 membershipArray = membershipData.ToArray();
1246 }
1247 1249
1250 if (requestingClient.AgentId != dataForAgentID)
1251 {
1252 Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
1253 {
1254 return membership.ListInProfile;
1255 };
1256
1257 membershipArray = membershipData.FindAll(showInProfile).ToArray();
1258 }
1259 else
1260 {
1261 membershipArray = membershipData.ToArray();
1262 }
1263 }
1248 if (m_debugEnabled) 1264 if (m_debugEnabled)
1249 { 1265 {
1250 m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); 1266 m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
@@ -1257,6 +1273,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1257 return membershipArray; 1273 return membershipArray;
1258 } 1274 }
1259 1275
1276
1260 private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle) 1277 private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
1261 { 1278 {
1262 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1279 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 2504e30..15bc1b7 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -631,7 +631,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
631 { 631 {
632 } 632 }
633 633
634 public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) 634 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
635 { 635 {
636 } 636 }
637 637
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index dca5626..bf91ab5 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -637,7 +637,7 @@ namespace OpenSim.Tests.Common.Mock
637 { 637 {
638 } 638 }
639 639
640 public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) 640 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
641 { 641 {
642 } 642 }
643 643