aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs26
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs11
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs17
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs15
4 files changed, 57 insertions, 12 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 4c05ec8..eba6a9c 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -170,6 +170,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
170 availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch); 170 availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch);
171 availableMethods["admin_refresh_map"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshMap); 171 availableMethods["admin_refresh_map"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshMap);
172 availableMethods["admin_get_opensim_version"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetOpenSimVersion); 172 availableMethods["admin_get_opensim_version"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetOpenSimVersion);
173 availableMethods["admin_get_agent_count"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetAgentCount);
173 174
174 // Either enable full remote functionality or just selected features 175 // Either enable full remote functionality or just selected features
175 string enabledMethods = m_config.GetString("enabled_methods", "all"); 176 string enabledMethods = m_config.GetString("enabled_methods", "all");
@@ -2266,6 +2267,31 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2266 m_log.Info("[RADMIN]: Get OpenSim Version Request complete"); 2267 m_log.Info("[RADMIN]: Get OpenSim Version Request complete");
2267 } 2268 }
2268 2269
2270 private void XmlRpcGetAgentCount(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
2271 {
2272 m_log.Info("[RADMIN]: Received Get Agent Count Request");
2273
2274 Hashtable responseData = (Hashtable)response.Value;
2275 Hashtable requestData = (Hashtable)request.Params[0];
2276
2277 CheckRegionParams(requestData, responseData);
2278
2279 Scene scene = null;
2280 GetSceneFromRegionParams(requestData, responseData, out scene);
2281
2282 if (scene == null)
2283 {
2284 responseData["success"] = false;
2285 }
2286 else
2287 {
2288 responseData["count"] = scene.GetRootAgentCount();
2289 responseData["success"] = true;
2290 }
2291
2292 m_log.Info("[RADMIN]: Get Agent Count Request complete");
2293 }
2294
2269 /// <summary> 2295 /// <summary>
2270 /// Parse a float with the given parameter name from a request data hash table. 2296 /// Parse a float with the given parameter name from a request data hash table.
2271 /// </summary> 2297 /// </summary>
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 03aaaac..3815c71 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -471,17 +471,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
471 /// <param name="im"></param> 471 /// <param name="im"></param>
472 private void OnGridInstantMessage(GridInstantMessage im) 472 private void OnGridInstantMessage(GridInstantMessage im)
473 { 473 {
474 // Check if it's a type of message that we should handle
475 if (!((im.dialog == (byte) InstantMessageDialog.InventoryOffered)
476 || (im.dialog == (byte) InstantMessageDialog.InventoryAccepted)
477 || (im.dialog == (byte) InstantMessageDialog.InventoryDeclined)
478 || (im.dialog == (byte) InstantMessageDialog.TaskInventoryDeclined)))
479 return;
480
481 m_log.DebugFormat(
482 "[INVENTORY TRANSFER]: {0} IM type received from grid. From={1} ({2}), To={3}",
483 (InstantMessageDialog)im.dialog, im.fromAgentID, im.fromAgentName, im.toAgentID);
484
485 // Check if this is ours to handle 474 // Check if this is ours to handle
486 // 475 //
487 Scene scene = FindClientScene(new UUID(im.toAgentID)); 476 Scene scene = FindClientScene(new UUID(im.toAgentID));
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
index 6ee15ad..e6b14c6 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -121,6 +121,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
121 121
122 public void Initialise(IConfigSource config) 122 public void Initialise(IConfigSource config)
123 { 123 {
124 MainConsole.Instance.Commands.AddCommand("vivox", false, "vivox debug", "vivox debug <on>|<off>", "Set vivox debugging", HandleDebug);
124 125
125 m_config = config.Configs["VivoxVoice"]; 126 m_config = config.Configs["VivoxVoice"];
126 127
@@ -1335,5 +1336,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1335 result = String.Empty; 1336 result = String.Empty;
1336 return false; 1337 return false;
1337 } 1338 }
1339
1340 private void HandleDebug(string module, string[] cmd)
1341 {
1342 if (cmd.Length < 3)
1343 {
1344 MainConsole.Instance.Output("Error: missing on/off flag");
1345 return;
1346 }
1347
1348 if (cmd[2] == "on")
1349 m_dumpXml = true;
1350 else if (cmd[2] == "off")
1351 m_dumpXml = false;
1352 else
1353 MainConsole.Instance.Output("Error: only on and off are supported");
1354 }
1338 } 1355 }
1339} 1356}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 667a562..a5d8292 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -8542,6 +8542,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8542 8542
8543 public LSL_String llXorBase64Strings(string str1, string str2) 8543 public LSL_String llXorBase64Strings(string str1, string str2)
8544 { 8544 {
8545 int padding = 0;
8546
8545 string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 8547 string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
8546 8548
8547 ScriptSleep(300); 8549 ScriptSleep(300);
@@ -8585,6 +8587,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8585 // than the decoded length of s1, simply perform a normal 8587 // than the decoded length of s1, simply perform a normal
8586 // decode and XOR 8588 // decode and XOR
8587 // 8589 //
8590 /*
8588 if (data2.Length >= data1.Length) 8591 if (data2.Length >= data1.Length)
8589 { 8592 {
8590 for (int pos = 0 ; pos < data1.Length ; pos++ ) 8593 for (int pos = 0 ; pos < data1.Length ; pos++ )
@@ -8592,10 +8595,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8592 8595
8593 return Convert.ToBase64String(data1); 8596 return Convert.ToBase64String(data1);
8594 } 8597 }
8598 */
8595 8599
8596 // Remove padding 8600 // Remove padding
8597 while (str1.EndsWith("=")) 8601 while (str1.EndsWith("="))
8602 {
8598 str1 = str1.Substring(0, str1.Length - 1); 8603 str1 = str1.Substring(0, str1.Length - 1);
8604 padding++;
8605 }
8599 while (str2.EndsWith("=")) 8606 while (str2.EndsWith("="))
8600 str2 = str2.Substring(0, str2.Length - 1); 8607 str2 = str2.Substring(0, str2.Length - 1);
8601 8608
@@ -8623,7 +8630,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8623 for (int pos = 0 ; pos < d1.Length ; pos++) 8630 for (int pos = 0 ; pos < d1.Length ; pos++)
8624 output += b64[d1[pos] ^ d2[pos % d2.Length]]; 8631 output += b64[d1[pos] ^ d2[pos % d2.Length]];
8625 8632
8626 while (output.Length % 3 > 0) 8633 // Here's a funny thing: LL blithely violate the base64
8634 // standard pretty much everywhere. Here, padding is
8635 // added only if the first input string had it, rather
8636 // than when the data actually needs it. This can result
8637 // in invalid base64 being returned. Go figure.
8638
8639 while (padding-- > 0)
8627 output += "="; 8640 output += "=";
8628 8641
8629 return output; 8642 return output;