Merge branch 'master' into diva-textures

This commit is contained in:
Melanie
2009-10-02 08:23:38 +01:00
356 changed files with 8423 additions and 5997 deletions

View File

@@ -601,7 +601,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
if (names.Length > 1)
return names[1];
return names[0];
}
}
}
public IScene Scene

View File

@@ -351,7 +351,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
{
m_log.DebugFormat("[IRC-Region {0}] dropping message {1} on channel {2}", Region, msg, msg.Channel);
return;
}
}
ScenePresence avatar = null;
string fromName = msg.From;

View File

@@ -97,8 +97,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
</document>", Context, Realm);
}
return response;
}
return response;
}
}
}

View File

@@ -93,7 +93,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
{
response = HandleRegister(Context, Realm, request);
}
else if (sipAuthMethod == "INVITE")
else if (sipAuthMethod == "INVITE")
{
response = HandleInvite(Context, Realm, request);
}
@@ -138,7 +138,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
response["str_response_string"] = "";
}
}
return response;
return response;
}
private Hashtable HandleRegister(string Context, string Realm, Hashtable request)
@@ -309,17 +309,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
"</document>\r\n",
domain, Context);
return response;
}
return response;
}
// private Hashtable HandleLoadNetworkLists(Hashtable request)
// {
// m_log.Info("[FreeSwitchDirectory] HandleLoadNetworkLists called");
//
//
// // TODO the password we return needs to match that sent in the request, this is hard coded for now
// string domain = (string) request["domain"];
//
//
// Hashtable response = new Hashtable();
// response["content_type"] = "text/xml";
// response["keepalive"] = false;
@@ -340,9 +340,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
// "</section>\r\n" +
// "</document>\r\n",
// domain);
//
//
// return response;
// }
//
//
// return response;
// }
}
}

View File

@@ -53,7 +53,7 @@ using System.Text.RegularExpressions;
namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
{
public class FreeSwitchVoiceModule : IRegionModule
public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -101,13 +101,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
private FreeSwitchDialplan m_FreeSwitchDialplan;
private readonly Dictionary<string, string> m_UUIDName = new Dictionary<string, string>();
private Dictionary<string, string> m_ParcelAddress = new Dictionary<string, string>();
private Scene m_scene;
private IConfig m_config;
public void Initialise(Scene scene, IConfigSource config)
{
m_scene = scene;
m_config = config.Configs["FreeSwitchVoice"];
if (null == m_config)
@@ -230,6 +233,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
{
OnRegisterCaps(scene, agentID, caps);
};
try
{
@@ -255,6 +260,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
public void PostInitialise()
{
if (m_pluginEnabled)
{
m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene");
// register the voice interface for this module, so the script engine can call us
m_scene.RegisterModuleInterface<IVoiceModule>(this);
}
}
public void Close()
@@ -270,7 +282,27 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
{
get { return true; }
}
// <summary>
// implementation of IVoiceModule, called by osSetParcelSIPAddress script function
// </summary>
public void setLandSIPAddress(string SIPAddress,UUID GlobalID)
{
m_log.DebugFormat("[FreeSwitchVoice]: setLandSIPAddress parcel id {0}: setting sip address {1}",
GlobalID, SIPAddress);
lock (m_ParcelAddress)
{
if (m_ParcelAddress.ContainsKey(GlobalID.ToString()))
{
m_ParcelAddress[GlobalID.ToString()] = SIPAddress;
}
else
{
m_ParcelAddress.Add(GlobalID.ToString(), SIPAddress);
}
}
}
// <summary>
// OnRegisterCaps is invoked via the scene.EventManager
@@ -776,6 +808,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
// Create parcel voice channel. If no parcel exists, then the voice channel ID is the same
// as the directory ID. Otherwise, it reflects the parcel's ID.
lock (m_ParcelAddress)
{
if (m_ParcelAddress.ContainsKey(land.GlobalID.ToString()))
{
m_log.DebugFormat("[FreeSwitchVoice]: parcel id {0}: using sip address {1}",
land.GlobalID, m_ParcelAddress[land.GlobalID.ToString()]);
return m_ParcelAddress[land.GlobalID.ToString()];
}
}
if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
{
@@ -797,6 +839,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
// the personal speech indicators as well unless some siren14-3d codec magic happens. we dont have siren143d so we'll settle for the personal speech indicator.
channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm);
lock (m_ParcelAddress)
{
if (!m_ParcelAddress.ContainsKey(land.GlobalID.ToString()))
{
m_ParcelAddress.Add(land.GlobalID.ToString(),channelUri);
}
}
return channelUri;
}

View File

@@ -226,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
m_log.DebugFormat("[VivoxVoice] plugin initialization failed: {0}", e.ToString());
return;
}
}
}
// Called to indicate that the module has been added to the region
@@ -1144,7 +1144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
// Otherwise prepare the request
m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl);
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl);
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl);
HttpWebResponse rsp = null;
// We are sending just parameters, no content

View File

@@ -477,7 +477,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
foreach (string key in binBucketOSD.Keys)
{
m_log.WarnFormat("{0}: {1}", key, binBucketOSD[key].ToString());
}
}
}
// treat as if no attachment
@@ -1261,7 +1261,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
{
if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
// TODO: Probably isn't nessesary to update every client in every scene.
// TODO: Probably isn't nessesary to update every client in every scene.
// Need to examine client updates and do only what's nessesary.
lock (m_sceneList)
{

View File

@@ -871,7 +871,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function);
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString());
foreach( string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None))
foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None))
{
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine);
}

View File

@@ -208,7 +208,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
// TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened
m_log.ErrorFormat(
"[CONTENT MANAGEMENT]: Content management thread terminating with exception. PLEASE REBOOT YOUR SIM - CONTENT MANAGEMENT WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}",
e);
e);
}
}

View File

@@ -102,7 +102,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
{
if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID))
continue;
newList.Add(m_MetaEntityCollection.CreateAuraForNewlyCreatedEntity((SceneObjectPart)missingPart));
newList.Add(m_MetaEntityCollection.CreateAuraForNewlyCreatedEntity((SceneObjectPart)missingPart));
}
m_log.Info("Number of missing objects found: " + newList.Count);
return newList;

View File

@@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
/// </exception>
/// <returns>AppDomain with a restricted security policy</returns>
/// <remarks>Substantial portions of this function from: http://blogs.msdn.com/shawnfa/archive/2004/10/25/247379.aspx
/// Valid permissionSetName values are:
/// Valid permissionSetName values are:
/// * FullTrust
/// * SkipVerification
/// * Execution

View File

@@ -117,7 +117,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
public void LoadRegion(Scene scene)
{
IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)
if (serialiser != null)
{
serialiser.LoadPrimsFromXml2(
scene,

View File

@@ -92,7 +92,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
this.m_maximum_scale = cp.m_maximum_scale;
this.m_initial_scale = cp.m_initial_scale;
this.m_rate = cp.m_rate;
this.m_planted = planted;
this.m_planted = planted;
this.m_trees = new List<UUID>();
}