diff options
Diffstat (limited to '')
21 files changed, 150 insertions, 64 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 10bfa8f..f805d69 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -766,7 +766,7 @@ namespace OpenSim.Groups | |||
766 | remoteClient.SendCreateGroupReply(UUID.Zero, false, "Insufficient funds to create a group."); | 766 | remoteClient.SendCreateGroupReply(UUID.Zero, false, "Insufficient funds to create a group."); |
767 | return UUID.Zero; | 767 | return UUID.Zero; |
768 | } | 768 | } |
769 | money.ApplyCharge(remoteClient.AgentId, money.GroupCreationCharge, "Group Creation"); | 769 | money.ApplyCharge(remoteClient.AgentId, money.GroupCreationCharge, MoneyTransactionType.GroupCreate); |
770 | } | 770 | } |
771 | string reason = string.Empty; | 771 | string reason = string.Empty; |
772 | UUID groupID = m_groupData.CreateGroup(remoteClient.AgentId, name, charter, showInList, insigniaID, membershipFee, openEnrollment, | 772 | UUID groupID = m_groupData.CreateGroup(remoteClient.AgentId, name, charter, showInList, insigniaID, membershipFee, openEnrollment, |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 34c240a..6c9e7c9 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1171,7 +1171,8 @@ namespace OpenSim.Framework | |||
1171 | void SendTeleportStart(uint flags); | 1171 | void SendTeleportStart(uint flags); |
1172 | void SendTeleportProgress(uint flags, string message); | 1172 | void SendTeleportProgress(uint flags, string message); |
1173 | 1173 | ||
1174 | void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance); | 1174 | void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item); |
1175 | |||
1175 | void SendPayPrice(UUID objectID, int[] payPrice); | 1176 | void SendPayPrice(UUID objectID, int[] payPrice); |
1176 | 1177 | ||
1177 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); | 1178 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); |
@@ -1269,8 +1270,6 @@ namespace OpenSim.Framework | |||
1269 | void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, | 1270 | void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, |
1270 | string[] buttonlabels); | 1271 | string[] buttonlabels); |
1271 | 1272 | ||
1272 | bool AddMoney(int debit); | ||
1273 | |||
1274 | /// <summary> | 1273 | /// <summary> |
1275 | /// Update the client as to where the sun is currently located. | 1274 | /// Update the client as to where the sun is currently located. |
1276 | /// </summary> | 1275 | /// </summary> |
diff --git a/OpenSim/Framework/IMoneyModule.cs b/OpenSim/Framework/IMoneyModule.cs index 7378d2e..415b7df 100644 --- a/OpenSim/Framework/IMoneyModule.cs +++ b/OpenSim/Framework/IMoneyModule.cs | |||
@@ -38,7 +38,8 @@ namespace OpenSim.Framework | |||
38 | int GetBalance(UUID agentID); | 38 | int GetBalance(UUID agentID); |
39 | bool UploadCovered(UUID agentID, int amount); | 39 | bool UploadCovered(UUID agentID, int amount); |
40 | bool AmountCovered(UUID agentID, int amount); | 40 | bool AmountCovered(UUID agentID, int amount); |
41 | void ApplyCharge(UUID agentID, int amount, string text); | 41 | void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type); |
42 | void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type, string extraData); | ||
42 | void ApplyUploadCharge(UUID agentID, int amount, string text); | 43 | void ApplyUploadCharge(UUID agentID, int amount, string text); |
43 | void MoveMoney(UUID fromUser, UUID toUser, int amount, string text); | 44 | void MoveMoney(UUID fromUser, UUID toUser, int amount, string text); |
44 | 45 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 9de564b..ef1d803 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -355,7 +355,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
355 | 355 | ||
356 | // protected HashSet<uint> m_attachmentsSent; | 356 | // protected HashSet<uint> m_attachmentsSent; |
357 | 357 | ||
358 | private int m_moneyBalance; | ||
359 | private bool m_deliverPackets = true; | 358 | private bool m_deliverPackets = true; |
360 | private int m_animationSequenceNumber = 1; | 359 | private int m_animationSequenceNumber = 1; |
361 | private bool m_SendLogoutPacketWhenClosing = true; | 360 | private bool m_SendLogoutPacketWhenClosing = true; |
@@ -439,7 +438,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
439 | public string Name { get { return FirstName + " " + LastName; } } | 438 | public string Name { get { return FirstName + " " + LastName; } } |
440 | 439 | ||
441 | public uint CircuitCode { get { return m_circuitCode; } } | 440 | public uint CircuitCode { get { return m_circuitCode; } } |
442 | public int MoneyBalance { get { return m_moneyBalance; } } | ||
443 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } | 441 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } |
444 | 442 | ||
445 | /// <summary> | 443 | /// <summary> |
@@ -503,7 +501,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
503 | m_firstName = sessionInfo.LoginInfo.First; | 501 | m_firstName = sessionInfo.LoginInfo.First; |
504 | m_lastName = sessionInfo.LoginInfo.Last; | 502 | m_lastName = sessionInfo.LoginInfo.Last; |
505 | m_startpos = sessionInfo.LoginInfo.StartPos; | 503 | m_startpos = sessionInfo.LoginInfo.StartPos; |
506 | m_moneyBalance = 1000; | ||
507 | 504 | ||
508 | m_udpServer = udpServer; | 505 | m_udpServer = udpServer; |
509 | m_udpClient = udpClient; | 506 | m_udpClient = udpClient; |
@@ -1530,7 +1527,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1530 | OutPacket(tpProgress, ThrottleOutPacketType.Unknown); | 1527 | OutPacket(tpProgress, ThrottleOutPacketType.Unknown); |
1531 | } | 1528 | } |
1532 | 1529 | ||
1533 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | 1530 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item) |
1534 | { | 1531 | { |
1535 | MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); | 1532 | MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); |
1536 | money.MoneyData.AgentID = AgentId; | 1533 | money.MoneyData.AgentID = AgentId; |
@@ -1538,7 +1535,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1538 | money.MoneyData.TransactionSuccess = success; | 1535 | money.MoneyData.TransactionSuccess = success; |
1539 | money.MoneyData.Description = description; | 1536 | money.MoneyData.Description = description; |
1540 | money.MoneyData.MoneyBalance = balance; | 1537 | money.MoneyData.MoneyBalance = balance; |
1541 | money.TransactionInfo.ItemDescription = Util.StringToBytes256("NONE"); | 1538 | money.TransactionInfo.TransactionType = transactionType; |
1539 | money.TransactionInfo.SourceID = sourceID; | ||
1540 | money.TransactionInfo.IsSourceGroup = sourceIsGroup; | ||
1541 | money.TransactionInfo.DestID = destID; | ||
1542 | money.TransactionInfo.IsDestGroup = destIsGroup; | ||
1543 | money.TransactionInfo.Amount = amount; | ||
1544 | money.TransactionInfo.ItemDescription = Util.StringToBytes256(item); | ||
1545 | |||
1542 | OutPacket(money, ThrottleOutPacketType.Task); | 1546 | OutPacket(money, ThrottleOutPacketType.Task); |
1543 | } | 1547 | } |
1544 | 1548 | ||
@@ -2282,6 +2286,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2282 | /// <returns></returns> | 2286 | /// <returns></returns> |
2283 | public AgentAlertMessagePacket BuildAgentAlertPacket(string message, bool modal) | 2287 | public AgentAlertMessagePacket BuildAgentAlertPacket(string message, bool modal) |
2284 | { | 2288 | { |
2289 | // Prepend a slash to make the message come up in the top right | ||
2290 | // again. | ||
2291 | // Allow special formats to be sent from aware modules. | ||
2292 | if (!modal && !message.StartsWith("ALERT: ") && !message.StartsWith("NOTIFY: ") && message != "Home position set." && message != "You died and have been teleported to your home location") | ||
2293 | message = "/" + message; | ||
2285 | AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); | 2294 | AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); |
2286 | alertPack.AgentData.AgentID = AgentId; | 2295 | alertPack.AgentData.AgentID = AgentId; |
2287 | alertPack.AlertData.Message = Util.StringToBytes256(message); | 2296 | alertPack.AlertData.Message = Util.StringToBytes256(message); |
@@ -12277,17 +12286,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12277 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); | 12286 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); |
12278 | } | 12287 | } |
12279 | 12288 | ||
12280 | public bool AddMoney(int debit) | ||
12281 | { | ||
12282 | if (m_moneyBalance + debit >= 0) | ||
12283 | { | ||
12284 | m_moneyBalance += debit; | ||
12285 | SendMoneyBalance(UUID.Zero, true, Util.StringToBytes256("Poof Poof!"), m_moneyBalance); | ||
12286 | return true; | ||
12287 | } | ||
12288 | return false; | ||
12289 | } | ||
12290 | |||
12291 | protected void HandleAutopilot(Object sender, string method, List<String> args) | 12289 | protected void HandleAutopilot(Object sender, string method, List<String> args) |
12292 | { | 12290 | { |
12293 | float locx = 0; | 12291 | float locx = 0; |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs new file mode 100644 index 0000000..9d36aa5 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using Nini.Config; | ||
30 | using NUnit.Framework; | ||
31 | using OpenMetaverse; | ||
32 | using OpenSim.Framework; | ||
33 | using OpenSim.Region.CoreModules.Framework.UserManagement; | ||
34 | using OpenSim.Tests.Common; | ||
35 | using OpenSim.Tests.Common.Mock; | ||
36 | |||
37 | namespace OpenSim.Region.CoreModules.Framework.UserManagement.Tests | ||
38 | { | ||
39 | [TestFixture] | ||
40 | public class HGUserManagementModuleTests : OpenSimTestCase | ||
41 | { | ||
42 | /// <summary> | ||
43 | /// Test that a new HG agent (i.e. one without a user account) has their name cached in the UMM upon creation. | ||
44 | /// </summary> | ||
45 | [Test] | ||
46 | public void TestCachedUserNameForNewAgent() | ||
47 | { | ||
48 | TestHelpers.InMethod(); | ||
49 | // TestHelpers.EnableLogging(); | ||
50 | |||
51 | HGUserManagementModule hgumm = new HGUserManagementModule(); | ||
52 | UUID userId = TestHelpers.ParseStem("11"); | ||
53 | string firstName = "Fred"; | ||
54 | string lastName = "Astaire"; | ||
55 | string homeUri = "example.com"; | ||
56 | |||
57 | IConfigSource config = new IniConfigSource(); | ||
58 | config.AddConfig("Modules"); | ||
59 | config.Configs["Modules"].Set("UserManagementModule", hgumm.Name); | ||
60 | |||
61 | SceneHelpers sceneHelpers = new SceneHelpers(); | ||
62 | TestScene scene = sceneHelpers.SetupScene(); | ||
63 | SceneHelpers.SetupSceneModules(scene, config, hgumm); | ||
64 | |||
65 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); | ||
66 | acd.firstname = firstName; | ||
67 | acd.lastname = lastName; | ||
68 | acd.ServiceURLs["HomeURI"] = "http://" + homeUri; | ||
69 | |||
70 | SceneHelpers.AddScenePresence(scene, acd); | ||
71 | |||
72 | string name = hgumm.GetUserName(userId); | ||
73 | Assert.That(name, Is.EqualTo(string.Format("{0}.{1} @{2}", firstName, lastName, homeUri))); | ||
74 | } | ||
75 | } | ||
76 | } \ No newline at end of file | ||
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index a720d7b..1e70b84 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -320,7 +320,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
320 | else | 320 | else |
321 | { | 321 | { |
322 | names[0] = "Unknown"; | 322 | names[0] = "Unknown"; |
323 | names[1] = "UserUMMTGUN"; | 323 | names[1] = "UserUMMTGUN2"; |
324 | 324 | ||
325 | return false; | 325 | return false; |
326 | } | 326 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f561d97..6bac468 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3005,7 +3005,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3005 | // client is for a root or child agent. | 3005 | // client is for a root or child agent. |
3006 | client.SceneAgent = sp; | 3006 | client.SceneAgent = sp; |
3007 | 3007 | ||
3008 | // Cache the user's name | 3008 | // This is currently also being done earlier in NewUserConnection for real users to see if this |
3009 | // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other | ||
3010 | // places. However, we still need to do it here for NPCs. | ||
3009 | CacheUserName(sp, aCircuit); | 3011 | CacheUserName(sp, aCircuit); |
3010 | 3012 | ||
3011 | EventManager.TriggerOnNewClient(client); | 3013 | EventManager.TriggerOnNewClient(client); |
@@ -3029,7 +3031,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3029 | { | 3031 | { |
3030 | string first = aCircuit.firstname, last = aCircuit.lastname; | 3032 | string first = aCircuit.firstname, last = aCircuit.lastname; |
3031 | 3033 | ||
3032 | if (sp.PresenceType == PresenceType.Npc) | 3034 | if (sp != null && sp.PresenceType == PresenceType.Npc) |
3033 | { | 3035 | { |
3034 | UserManagementModule.AddUser(aCircuit.AgentID, first, last); | 3036 | UserManagementModule.AddUser(aCircuit.AgentID, first, last); |
3035 | } | 3037 | } |
@@ -3942,8 +3944,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3942 | CapsModule.SetAgentCapsSeeds(agent); | 3944 | CapsModule.SetAgentCapsSeeds(agent); |
3943 | } | 3945 | } |
3944 | } | 3946 | } |
3945 | } | ||
3946 | 3947 | ||
3948 | // Try caching an incoming user name much earlier on to see if this helps with an issue | ||
3949 | // where HG users are occasionally seen by others as "Unknown User" because their UUIDName | ||
3950 | // request for the HG avatar appears to trigger before the user name is cached. | ||
3951 | CacheUserName(null, agent); | ||
3952 | } | ||
3947 | 3953 | ||
3948 | if (CapsModule != null) | 3954 | if (CapsModule != null) |
3949 | { | 3955 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5184585..83bd3fb 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1550,6 +1550,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1550 | // Create child agents in neighbouring regions | 1550 | // Create child agents in neighbouring regions |
1551 | if (openChildAgents && !IsChildAgent) | 1551 | if (openChildAgents && !IsChildAgent) |
1552 | { | 1552 | { |
1553 | // Remember in HandleUseCircuitCode, we delayed this to here | ||
1553 | SendInitialDataToMe(); | 1554 | SendInitialDataToMe(); |
1554 | 1555 | ||
1555 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | 1556 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index f7b837c..b28d96b 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1061,7 +1061,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1061 | { | 1061 | { |
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | 1064 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item) |
1065 | { | 1065 | { |
1066 | 1066 | ||
1067 | } | 1067 | } |
@@ -1206,11 +1206,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1206 | 1206 | ||
1207 | } | 1207 | } |
1208 | 1208 | ||
1209 | public bool AddMoney(int debit) | ||
1210 | { | ||
1211 | return true; | ||
1212 | } | ||
1213 | |||
1214 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) | 1209 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) |
1215 | { | 1210 | { |
1216 | 1211 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index e756c70..20affa6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -117,6 +117,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
117 | 117 | ||
118 | private IConfig m_config; | 118 | private IConfig m_config; |
119 | 119 | ||
120 | private object m_Lock; | ||
121 | |||
120 | public void Initialise(IConfigSource config) | 122 | public void Initialise(IConfigSource config) |
121 | { | 123 | { |
122 | 124 | ||
@@ -128,6 +130,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
128 | if (!m_config.GetBoolean("enabled", false)) | 130 | if (!m_config.GetBoolean("enabled", false)) |
129 | return; | 131 | return; |
130 | 132 | ||
133 | m_Lock = new object(); | ||
134 | |||
131 | try | 135 | try |
132 | { | 136 | { |
133 | // retrieve configuration variables | 137 | // retrieve configuration variables |
@@ -1118,25 +1122,32 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
1118 | 1122 | ||
1119 | doc = new XmlDocument(); | 1123 | doc = new XmlDocument(); |
1120 | 1124 | ||
1121 | try | 1125 | // Let's serialize all calls to Vivox. Most of these are driven by |
1126 | // the clients (CAPs), when the user arrives at the region. We don't | ||
1127 | // want to issue many simultaneous http requests to Vivox, because mono | ||
1128 | // doesn't like that | ||
1129 | lock (m_Lock) | ||
1122 | { | 1130 | { |
1123 | // Otherwise prepare the request | 1131 | try |
1124 | // m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); | 1132 | { |
1133 | // Otherwise prepare the request | ||
1134 | //m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); | ||
1125 | 1135 | ||
1126 | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); | 1136 | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); |
1127 | 1137 | ||
1128 | // We are sending just parameters, no content | 1138 | // We are sending just parameters, no content |
1129 | req.ContentLength = 0; | 1139 | req.ContentLength = 0; |
1130 | 1140 | ||
1131 | // Send request and retrieve the response | 1141 | // Send request and retrieve the response |
1132 | using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse()) | 1142 | using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse()) |
1133 | using (Stream s = rsp.GetResponseStream()) | 1143 | using (Stream s = rsp.GetResponseStream()) |
1134 | using (XmlTextReader rdr = new XmlTextReader(s)) | 1144 | using (XmlTextReader rdr = new XmlTextReader(s)) |
1135 | doc.Load(rdr); | 1145 | doc.Load(rdr); |
1136 | } | 1146 | } |
1137 | catch (Exception e) | 1147 | catch (Exception e) |
1138 | { | 1148 | { |
1139 | m_log.ErrorFormat("[VivoxVoice] Error in admin call : {0}", e.Message); | 1149 | m_log.ErrorFormat("[VivoxVoice] Error in admin call : {0}", e.Message); |
1150 | } | ||
1140 | } | 1151 | } |
1141 | 1152 | ||
1142 | // If we're debugging server responses, dump the whole | 1153 | // If we're debugging server responses, dump the whole |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index d764936..d0a5989 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -764,7 +764,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
764 | remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got insufficient funds to create a group."); | 764 | remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got insufficient funds to create a group."); |
765 | return UUID.Zero; | 765 | return UUID.Zero; |
766 | } | 766 | } |
767 | money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, "Group Creation"); | 767 | money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, MoneyTransactionType.GroupCreate); |
768 | } | 768 | } |
769 | UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient)); | 769 | UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient)); |
770 | 770 | ||
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 17d1591..25f198b 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -191,9 +191,14 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
191 | // Please do not refactor these to be just one method | 191 | // Please do not refactor these to be just one method |
192 | // Existing implementations need the distinction | 192 | // Existing implementations need the distinction |
193 | // | 193 | // |
194 | public void ApplyCharge(UUID agentID, int amount, string text) | 194 | public void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type, string extraData) |
195 | { | 195 | { |
196 | } | 196 | } |
197 | |||
198 | public void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type) | ||
199 | { | ||
200 | } | ||
201 | |||
197 | public void ApplyUploadCharge(UUID agentID, int amount, string text) | 202 | public void ApplyUploadCharge(UUID agentID, int amount, string text) |
198 | { | 203 | { |
199 | } | 204 | } |
@@ -322,7 +327,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
322 | client.SendAlertMessage(e.Message + " "); | 327 | client.SendAlertMessage(e.Message + " "); |
323 | } | 328 | } |
324 | 329 | ||
325 | client.SendMoneyBalance(TransactionID, true, new byte[0], returnfunds); | 330 | client.SendMoneyBalance(TransactionID, true, new byte[0], returnfunds, 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty); |
326 | } | 331 | } |
327 | else | 332 | else |
328 | { | 333 | { |
@@ -385,12 +390,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
385 | { | 390 | { |
386 | if (sender != null) | 391 | if (sender != null) |
387 | { | 392 | { |
388 | sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID)); | 393 | sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID), 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty); |
389 | } | 394 | } |
390 | 395 | ||
391 | if (receiver != null) | 396 | if (receiver != null) |
392 | { | 397 | { |
393 | receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID)); | 398 | receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID), 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty); |
394 | } | 399 | } |
395 | } | 400 | } |
396 | } | 401 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index a6a53aa..c8aab54 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -704,7 +704,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
704 | { | 704 | { |
705 | } | 705 | } |
706 | 706 | ||
707 | public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | 707 | public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item) |
708 | { | 708 | { |
709 | } | 709 | } |
710 | 710 | ||
@@ -880,11 +880,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
880 | { | 880 | { |
881 | } | 881 | } |
882 | 882 | ||
883 | public bool AddMoney(int debit) | ||
884 | { | ||
885 | return false; | ||
886 | } | ||
887 | |||
888 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) | 883 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) |
889 | { | 884 | { |
890 | } | 885 | } |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index e98a7fb..2651e3b 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |||
@@ -375,7 +375,7 @@ public static class BSParam | |||
375 | new ParameterDefn<bool>("ShouldUseGImpactShapeForPrims", "If true, use a GImpact shape for prims with cuts and twists", | 375 | new ParameterDefn<bool>("ShouldUseGImpactShapeForPrims", "If true, use a GImpact shape for prims with cuts and twists", |
376 | false ), | 376 | false ), |
377 | new ParameterDefn<bool>("ShouldUseAssetHulls", "If true, use hull if specified in the mesh asset info", | 377 | new ParameterDefn<bool>("ShouldUseAssetHulls", "If true, use hull if specified in the mesh asset info", |
378 | false ), | 378 | true ), |
379 | 379 | ||
380 | new ParameterDefn<int>("CrossingFailuresBeforeOutOfBounds", "How forgiving we are about getting into adjactent regions", | 380 | new ParameterDefn<int>("CrossingFailuresBeforeOutOfBounds", "How forgiving we are about getting into adjactent regions", |
381 | 5 ), | 381 | 5 ), |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index f5b0361..e11e365 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -511,7 +511,10 @@ public class BSPrim : BSPhysObject | |||
511 | 511 | ||
512 | PhysScene.TaintedObject("setVehicleType", delegate() | 512 | PhysScene.TaintedObject("setVehicleType", delegate() |
513 | { | 513 | { |
514 | ZeroMotion(true /* inTaintTime */); | 514 | // Some vehicle scripts change vehicle type on the fly as an easy way to |
515 | // change all the parameters. Like a plane changing to CAR when on the | ||
516 | // ground. In this case, don't want to zero motion. | ||
517 | // ZeroMotion(true /* inTaintTime */); | ||
515 | VehicleActor.ProcessTypeChange(type); | 518 | VehicleActor.ProcessTypeChange(type); |
516 | ActivateIfPhysical(false); | 519 | ActivateIfPhysical(false); |
517 | }); | 520 | }); |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 26479be..179a91f 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -658,7 +658,7 @@ namespace OpenSim.Tests.Common.Mock | |||
658 | { | 658 | { |
659 | } | 659 | } |
660 | 660 | ||
661 | public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | 661 | public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item) |
662 | { | 662 | { |
663 | } | 663 | } |
664 | 664 | ||
@@ -886,11 +886,6 @@ namespace OpenSim.Tests.Common.Mock | |||
886 | 886 | ||
887 | } | 887 | } |
888 | 888 | ||
889 | public bool AddMoney(int debit) | ||
890 | { | ||
891 | return false; | ||
892 | } | ||
893 | |||
894 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) | 889 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) |
895 | { | 890 | { |
896 | } | 891 | } |
diff --git a/bin/lib32/BulletSim.dll b/bin/lib32/BulletSim.dll index d63ee1d..bc0e222 100755 --- a/bin/lib32/BulletSim.dll +++ b/bin/lib32/BulletSim.dll | |||
Binary files differ | |||
diff --git a/bin/lib32/libBulletSim.so b/bin/lib32/libBulletSim.so index 03de631..e09dd27 100755 --- a/bin/lib32/libBulletSim.so +++ b/bin/lib32/libBulletSim.so | |||
Binary files differ | |||
diff --git a/bin/lib64/BulletSim.dll b/bin/lib64/BulletSim.dll index e155f0e..5fc09f6 100755 --- a/bin/lib64/BulletSim.dll +++ b/bin/lib64/BulletSim.dll | |||
Binary files differ | |||
diff --git a/bin/lib64/libBulletSim.so b/bin/lib64/libBulletSim.so index ac64a40..925269d 100755 --- a/bin/lib64/libBulletSim.so +++ b/bin/lib64/libBulletSim.so | |||
Binary files differ | |||
diff --git a/prebuild.xml b/prebuild.xml index c611cb9..9a70b60 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -3183,6 +3183,7 @@ | |||
3183 | <Match path="Avatar/Inventory/Archiver/Tests" pattern="*.cs" recurse="true"/> | 3183 | <Match path="Avatar/Inventory/Archiver/Tests" pattern="*.cs" recurse="true"/> |
3184 | <Match path="Avatar/Inventory/Transfer/Tests" pattern="*.cs" recurse="true"/> | 3184 | <Match path="Avatar/Inventory/Transfer/Tests" pattern="*.cs" recurse="true"/> |
3185 | <Match path="Framework/InventoryAccess/Tests" pattern="*.cs" recurse="true"/> | 3185 | <Match path="Framework/InventoryAccess/Tests" pattern="*.cs" recurse="true"/> |
3186 | <Match path="Framework/UserManagement/Tests" pattern="*.cs" recurse="true"/> | ||
3186 | <Match path="Scripting/VectorRender/Tests" pattern="*.cs" recurse="true"/> | 3187 | <Match path="Scripting/VectorRender/Tests" pattern="*.cs" recurse="true"/> |
3187 | <Match path="World/Archiver/Tests" pattern="*.cs" recurse="true"/> | 3188 | <Match path="World/Archiver/Tests" pattern="*.cs" recurse="true"/> |
3188 | <Match buildAction="EmbeddedResource" path="World/Archiver/Tests/Resources" pattern="*"/> | 3189 | <Match buildAction="EmbeddedResource" path="World/Archiver/Tests/Resources" pattern="*"/> |