Merge branch 'master' into ubitworkmaster
commit
3b6191de7f
|
@ -170,6 +170,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch);
|
availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch);
|
||||||
availableMethods["admin_refresh_map"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshMap);
|
availableMethods["admin_refresh_map"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshMap);
|
||||||
availableMethods["admin_get_opensim_version"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetOpenSimVersion);
|
availableMethods["admin_get_opensim_version"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetOpenSimVersion);
|
||||||
|
availableMethods["admin_get_agent_count"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetAgentCount);
|
||||||
|
|
||||||
// Either enable full remote functionality or just selected features
|
// Either enable full remote functionality or just selected features
|
||||||
string enabledMethods = m_config.GetString("enabled_methods", "all");
|
string enabledMethods = m_config.GetString("enabled_methods", "all");
|
||||||
|
@ -2266,6 +2267,31 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
m_log.Info("[RADMIN]: Get OpenSim Version Request complete");
|
m_log.Info("[RADMIN]: Get OpenSim Version Request complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void XmlRpcGetAgentCount(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
|
||||||
|
{
|
||||||
|
m_log.Info("[RADMIN]: Received Get Agent Count Request");
|
||||||
|
|
||||||
|
Hashtable responseData = (Hashtable)response.Value;
|
||||||
|
Hashtable requestData = (Hashtable)request.Params[0];
|
||||||
|
|
||||||
|
CheckRegionParams(requestData, responseData);
|
||||||
|
|
||||||
|
Scene scene = null;
|
||||||
|
GetSceneFromRegionParams(requestData, responseData, out scene);
|
||||||
|
|
||||||
|
if (scene == null)
|
||||||
|
{
|
||||||
|
responseData["success"] = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
responseData["count"] = scene.GetRootAgentCount();
|
||||||
|
responseData["success"] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_log.Info("[RADMIN]: Get Agent Count Request complete");
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parse a float with the given parameter name from a request data hash table.
|
/// Parse a float with the given parameter name from a request data hash table.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -471,17 +471,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
/// <param name="im"></param>
|
/// <param name="im"></param>
|
||||||
private void OnGridInstantMessage(GridInstantMessage im)
|
private void OnGridInstantMessage(GridInstantMessage im)
|
||||||
{
|
{
|
||||||
// Check if it's a type of message that we should handle
|
|
||||||
if (!((im.dialog == (byte) InstantMessageDialog.InventoryOffered)
|
|
||||||
|| (im.dialog == (byte) InstantMessageDialog.InventoryAccepted)
|
|
||||||
|| (im.dialog == (byte) InstantMessageDialog.InventoryDeclined)
|
|
||||||
|| (im.dialog == (byte) InstantMessageDialog.TaskInventoryDeclined)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_log.DebugFormat(
|
|
||||||
"[INVENTORY TRANSFER]: {0} IM type received from grid. From={1} ({2}), To={3}",
|
|
||||||
(InstantMessageDialog)im.dialog, im.fromAgentID, im.fromAgentName, im.toAgentID);
|
|
||||||
|
|
||||||
// Check if this is ours to handle
|
// Check if this is ours to handle
|
||||||
//
|
//
|
||||||
Scene scene = FindClientScene(new UUID(im.toAgentID));
|
Scene scene = FindClientScene(new UUID(im.toAgentID));
|
||||||
|
|
|
@ -121,6 +121,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
MainConsole.Instance.Commands.AddCommand("vivox", false, "vivox debug", "vivox debug <on>|<off>", "Set vivox debugging", HandleDebug);
|
||||||
|
|
||||||
m_config = config.Configs["VivoxVoice"];
|
m_config = config.Configs["VivoxVoice"];
|
||||||
|
|
||||||
|
@ -1335,5 +1336,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
result = String.Empty;
|
result = String.Empty;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleDebug(string module, string[] cmd)
|
||||||
|
{
|
||||||
|
if (cmd.Length < 3)
|
||||||
|
{
|
||||||
|
MainConsole.Instance.Output("Error: missing on/off flag");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cmd[2] == "on")
|
||||||
|
m_dumpXml = true;
|
||||||
|
else if (cmd[2] == "off")
|
||||||
|
m_dumpXml = false;
|
||||||
|
else
|
||||||
|
MainConsole.Instance.Output("Error: only on and off are supported");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8542,6 +8542,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public LSL_String llXorBase64Strings(string str1, string str2)
|
public LSL_String llXorBase64Strings(string str1, string str2)
|
||||||
{
|
{
|
||||||
|
int padding = 0;
|
||||||
|
|
||||||
string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
|
|
||||||
ScriptSleep(300);
|
ScriptSleep(300);
|
||||||
|
@ -8585,6 +8587,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
// than the decoded length of s1, simply perform a normal
|
// than the decoded length of s1, simply perform a normal
|
||||||
// decode and XOR
|
// decode and XOR
|
||||||
//
|
//
|
||||||
|
/*
|
||||||
if (data2.Length >= data1.Length)
|
if (data2.Length >= data1.Length)
|
||||||
{
|
{
|
||||||
for (int pos = 0 ; pos < data1.Length ; pos++ )
|
for (int pos = 0 ; pos < data1.Length ; pos++ )
|
||||||
|
@ -8592,10 +8595,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
return Convert.ToBase64String(data1);
|
return Convert.ToBase64String(data1);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Remove padding
|
// Remove padding
|
||||||
while (str1.EndsWith("="))
|
while (str1.EndsWith("="))
|
||||||
|
{
|
||||||
str1 = str1.Substring(0, str1.Length - 1);
|
str1 = str1.Substring(0, str1.Length - 1);
|
||||||
|
padding++;
|
||||||
|
}
|
||||||
while (str2.EndsWith("="))
|
while (str2.EndsWith("="))
|
||||||
str2 = str2.Substring(0, str2.Length - 1);
|
str2 = str2.Substring(0, str2.Length - 1);
|
||||||
|
|
||||||
|
@ -8623,7 +8630,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
for (int pos = 0 ; pos < d1.Length ; pos++)
|
for (int pos = 0 ; pos < d1.Length ; pos++)
|
||||||
output += b64[d1[pos] ^ d2[pos % d2.Length]];
|
output += b64[d1[pos] ^ d2[pos % d2.Length]];
|
||||||
|
|
||||||
while (output.Length % 3 > 0)
|
// Here's a funny thing: LL blithely violate the base64
|
||||||
|
// standard pretty much everywhere. Here, padding is
|
||||||
|
// added only if the first input string had it, rather
|
||||||
|
// than when the data actually needs it. This can result
|
||||||
|
// in invalid base64 being returned. Go figure.
|
||||||
|
|
||||||
|
while (padding-- > 0)
|
||||||
output += "=";
|
output += "=";
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
|
Loading…
Reference in New Issue