cleaning up, fixing warnings
parent
2ebedc5c29
commit
458f7eb9b3
|
@ -391,10 +391,10 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
protected void ProcessReceivedAsset(bool IsTexture, AssetInfo assetInf, IUserService userService)
|
||||
{
|
||||
if (!IsTexture && assetInf.ContainsReferences && false)
|
||||
{
|
||||
assetInf.Data = ProcessAssetData(assetInf.Data, userService);
|
||||
}
|
||||
// if (!IsTexture && assetInf.ContainsReferences && false)
|
||||
// {
|
||||
// assetInf.Data = ProcessAssetData(assetInf.Data, userService);
|
||||
// }
|
||||
}
|
||||
|
||||
// See IAssetReceiver
|
||||
|
|
|
@ -126,14 +126,14 @@ namespace OpenSim.Framework.Servers
|
|||
return result;
|
||||
}
|
||||
|
||||
private byte[] ProcessOutgoingAssetData(byte[] assetData)
|
||||
{
|
||||
string data = Encoding.ASCII.GetString(assetData);
|
||||
// private byte[] ProcessOutgoingAssetData(byte[] assetData)
|
||||
// {
|
||||
// string data = Encoding.ASCII.GetString(assetData);
|
||||
|
||||
data = ProcessAssetDataString(data);
|
||||
// data = ProcessAssetDataString(data);
|
||||
|
||||
return Encoding.ASCII.GetBytes(data);
|
||||
}
|
||||
// return Encoding.ASCII.GetBytes(data);
|
||||
// }
|
||||
|
||||
public string ProcessAssetDataString(string data)
|
||||
{
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework.Statistics.Interfaces;
|
||||
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework.Statistics.Interfaces;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
||||
namespace OpenSim.Framework.Statistics
|
||||
|
@ -421,11 +420,11 @@ Asset service request failures: {3}" + Environment.NewLine,
|
|||
args["Memory"] = OSD.FromString(base.XReport());
|
||||
|
||||
string strBuffer = "";
|
||||
byte[] buffer = new byte[1];
|
||||
// byte[] buffer = new byte[1];
|
||||
|
||||
strBuffer = OSDParser.SerializeJsonString(args);
|
||||
UTF8Encoding str = new UTF8Encoding();
|
||||
buffer = str.GetBytes(strBuffer);
|
||||
// UTF8Encoding str = new UTF8Encoding();
|
||||
// buffer = str.GetBytes(strBuffer);
|
||||
|
||||
return strBuffer;
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
m_sentinfo = true;
|
||||
m_packetNumber++;
|
||||
}
|
||||
bool ignoreStop = false;
|
||||
// bool ignoreStop = false;
|
||||
if (m_packetNumber < 2)
|
||||
{
|
||||
m_packetNumber = 2;
|
||||
|
|
|
@ -129,9 +129,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
response["content_type"] = "text/xml";
|
||||
response["str_response_string"] = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
@ -165,11 +162,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
"</user>\r\n" +
|
||||
"</domain>\r\n" +
|
||||
"</section>\r\n" +
|
||||
"</document>\r\n"
|
||||
, domain , user, password);
|
||||
"</document>\r\n",
|
||||
domain , user, password);
|
||||
|
||||
return response;
|
||||
|
||||
}
|
||||
|
||||
private Hashtable HandleInvite(Hashtable request)
|
||||
|
@ -213,8 +209,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
"</user>\r\n" +
|
||||
"</domain>\r\n" +
|
||||
"</section>\r\n" +
|
||||
"</document>\r\n"
|
||||
, domain , user, password,sipRequestUser);
|
||||
"</document>\r\n",
|
||||
domain , user, password,sipRequestUser);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
@ -248,10 +244,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
"</user>\r\n" +
|
||||
"</domain>\r\n" +
|
||||
"</section>\r\n" +
|
||||
"</document>\r\n"
|
||||
, domain , user);
|
||||
|
||||
|
||||
"</document>\r\n",
|
||||
domain , user);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
@ -303,9 +297,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
"</variables>\r\n"+
|
||||
"</domain>\r\n" +
|
||||
"</section>\r\n" +
|
||||
"</document>\r\n"
|
||||
, domain);
|
||||
|
||||
"</document>\r\n",
|
||||
domain);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
@ -335,13 +328,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
"</variables>\r\n"+
|
||||
"</domain>\r\n" +
|
||||
"</section>\r\n" +
|
||||
"</document>\r\n"
|
||||
, domain);
|
||||
"</document>\r\n",
|
||||
domain);
|
||||
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,7 +54,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
// Infrastructure
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly bool DUMP = true;
|
||||
|
||||
// Capability string prefixes
|
||||
private static readonly string m_parcelVoiceInfoRequestPath = "0007/";
|
||||
|
@ -87,9 +86,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
private static int m_freeSwitchEchoPort;
|
||||
private static string m_freeSwitchDefaultWellKnownIP;
|
||||
private static int m_freeSwitchDefaultTimeout;
|
||||
private static int m_freeSwitchSubscribeRetry;
|
||||
// private static int m_freeSwitchSubscribeRetry;
|
||||
private static string m_freeSwitchUrlResetPassword;
|
||||
private static IPEndPoint m_FreeSwitchServiceIP;
|
||||
// private static IPEndPoint m_FreeSwitchServiceIP;
|
||||
private int m_freeSwitchServicePort;
|
||||
private string m_openSimWellKnownHTTPAddress;
|
||||
|
||||
|
@ -132,7 +131,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
string serviceIP = m_config.GetString("freeswitch_service_server", String.Empty);
|
||||
int servicePort = m_config.GetInt("freeswitch_service_port", 80);
|
||||
IPAddress serviceIPAddress = IPAddress.Parse(serviceIP);
|
||||
m_FreeSwitchServiceIP = new IPEndPoint(serviceIPAddress, servicePort);
|
||||
// m_FreeSwitchServiceIP = new IPEndPoint(serviceIPAddress, servicePort);
|
||||
m_freeSwitchServicePort = servicePort;
|
||||
m_freeSwitchRealm = m_config.GetString("freeswitch_realm", String.Empty);
|
||||
m_freeSwitchSIPProxy = m_config.GetString("freeswitch_sip_proxy", m_freeSwitchRealm);
|
||||
|
@ -143,12 +142,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
m_freeSwitchDefaultWellKnownIP = m_config.GetString("freeswitch_well_known_ip", m_freeSwitchRealm);
|
||||
m_openSimWellKnownHTTPAddress = m_config.GetString("opensim_well_known_http_address", serviceIPAddress.ToString());
|
||||
m_freeSwitchDefaultTimeout = m_config.GetInt("freeswitch_default_timeout", 5000);
|
||||
m_freeSwitchSubscribeRetry = m_config.GetInt("freeswitch_subscribe_retry", 120);
|
||||
// m_freeSwitchSubscribeRetry = m_config.GetInt("freeswitch_subscribe_retry", 120);
|
||||
m_freeSwitchUrlResetPassword = m_config.GetString("freeswitch_password_reset_url", String.Empty);
|
||||
|
||||
|
||||
|
||||
|
||||
if (String.IsNullOrEmpty(m_freeSwitchServerUser) ||
|
||||
String.IsNullOrEmpty(m_freeSwitchServerPass) ||
|
||||
String.IsNullOrEmpty(m_freeSwitchRealm) ||
|
||||
|
@ -165,11 +161,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix),
|
||||
FreeSwitchSLVoiceGetPreloginHTTPHandler);
|
||||
|
||||
// RestStreamHandler h = new RestStreamHandler("GET", String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler);
|
||||
// RestStreamHandler h = new
|
||||
// RestStreamHandler("GET",
|
||||
// String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler);
|
||||
// scene.CommsManager.HttpServer.AddStreamHandler(h);
|
||||
|
||||
|
||||
|
||||
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix),
|
||||
FreeSwitchSLVoiceSigninHTTPHandler);
|
||||
|
||||
|
@ -307,15 +303,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
// XXX: we need to cache the voice credentials, as
|
||||
// FreeSwitch is later going to come and ask us for
|
||||
// those
|
||||
|
||||
agentname = agentname.Replace('+', '-').Replace('/', '_');
|
||||
|
||||
// LLSDVoiceAccountResponse voiceAccountResponse =
|
||||
// new LLSDVoiceAccountResponse(agentname, password, m_freeSwitchRealm, "http://etsvc02.hursley.ibm.com/api");
|
||||
LLSDVoiceAccountResponse voiceAccountResponse =
|
||||
new LLSDVoiceAccountResponse(agentname, password, m_freeSwitchRealm,
|
||||
String.Format("http://{0}:{1}{2}/", m_openSimWellKnownHTTPAddress, m_freeSwitchServicePort,
|
||||
m_freeSwitchAPIPrefix));
|
||||
String.Format("http://{0}:{1}{2}/", m_openSimWellKnownHTTPAddress,
|
||||
m_freeSwitchServicePort, m_freeSwitchAPIPrefix));
|
||||
|
||||
string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse);
|
||||
|
||||
|
@ -460,11 +455,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
"<UrlPrivacyNotice>{8}</UrlPrivacyNotice>\r\n"+
|
||||
"<UrlEulaNotice/>\r\n"+
|
||||
"<App.NoBottomLogo>false</App.NoBottomLogo>\r\n"+
|
||||
"</VCConfiguration>"
|
||||
,
|
||||
"</VCConfiguration>",
|
||||
m_freeSwitchRealm, m_freeSwitchSIPProxy, m_freeSwitchAttemptUseSTUN,
|
||||
m_freeSwitchSTUNServer, m_freeSwitchEchoServer, m_freeSwitchEchoPort,
|
||||
m_freeSwitchDefaultWellKnownIP,m_freeSwitchDefaultTimeout,m_freeSwitchUrlResetPassword,"");
|
||||
m_freeSwitchDefaultWellKnownIP, m_freeSwitchDefaultTimeout,
|
||||
m_freeSwitchUrlResetPassword, "");
|
||||
|
||||
response["int_response_code"] = 200;
|
||||
|
||||
|
@ -536,7 +531,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
}
|
||||
|
||||
return bodyParams;
|
||||
|
||||
}
|
||||
|
||||
private string ChannelUri(Scene scene, LandData land)
|
||||
|
|
|
@ -218,7 +218,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
public GroupRecord GetGroupRecord(UUID GroupID, string GroupName)
|
||||
{
|
||||
Hashtable param = new Hashtable();
|
||||
if ((GroupID != null) && (GroupID != UUID.Zero))
|
||||
if (GroupID != UUID.Zero)
|
||||
{
|
||||
param["GroupID"] = GroupID.ToString();
|
||||
}
|
||||
|
@ -793,7 +793,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
{
|
||||
m_log.ErrorFormat("[GROUPDATA] Key: {0}", key);
|
||||
|
||||
object o = respData[key];
|
||||
// object o = respData[key];
|
||||
|
||||
string[] lines = respData[key].ToString().Split(new char[] { '\n' });
|
||||
foreach (string line in lines)
|
||||
|
|
|
@ -9194,9 +9194,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
UUID tid = tid = AsyncCommands.
|
||||
DataserverPlugin.RegisterRequest(m_localID,
|
||||
m_itemID, assetID.ToString());
|
||||
// was: UUID tid = tid = AsyncCommands.
|
||||
UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_localID, m_itemID, assetID.ToString());
|
||||
|
||||
if (NotecardCache.IsCached(assetID))
|
||||
{
|
||||
|
@ -9257,9 +9256,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
UUID tid = tid = AsyncCommands.
|
||||
DataserverPlugin.RegisterRequest(m_localID,
|
||||
m_itemID, assetID.ToString());
|
||||
// was: UUID tid = tid = AsyncCommands.
|
||||
UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_localID, m_itemID, assetID.ToString());
|
||||
|
||||
if (NotecardCache.IsCached(assetID))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue