From 5ef490b5add0f2cb6a30b519d6199148f62603b0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 25 Mar 2011 01:10:41 +0100 Subject: Switching vivox to https for production use --- .../Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice') diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index 34d0e24..5ba4033 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs @@ -196,7 +196,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice break; } - m_vivoxVoiceAccountApi = String.Format("http://{0}/api2", m_vivoxServer); + m_vivoxVoiceAccountApi = String.Format("https://{0}/api2", m_vivoxServer); // Admin interface required values if (String.IsNullOrEmpty(m_vivoxServer) || @@ -757,7 +757,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice } - private static readonly string m_vivoxLoginPath = "http://{0}/api2/viv_signin.php?userid={1}&pwd={2}"; + private static readonly string m_vivoxLoginPath = "https://{0}/api2/viv_signin.php?userid={1}&pwd={2}"; /// /// Perform administrative login for Vivox. @@ -770,7 +770,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice } - private static readonly string m_vivoxLogoutPath = "http://{0}/api2/viv_signout.php?auth_token={1}"; + private static readonly string m_vivoxLogoutPath = "https://{0}/api2/viv_signout.php?auth_token={1}"; /// /// Perform administrative logout for Vivox. @@ -782,7 +782,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice } - private static readonly string m_vivoxGetAccountPath = "http://{0}/api2/viv_get_acct.php?auth_token={1}&user_name={2}"; + private static readonly string m_vivoxGetAccountPath = "https://{0}/api2/viv_get_acct.php?auth_token={1}&user_name={2}"; /// /// Retrieve account information for the specified user. @@ -795,7 +795,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice } - private static readonly string m_vivoxNewAccountPath = "http://{0}/api2/viv_adm_acct_new.php?username={1}&pwd={2}&auth_token={3}"; + private static readonly string m_vivoxNewAccountPath = "https://{0}/api2/viv_adm_acct_new.php?username={1}&pwd={2}&auth_token={3}"; /// /// Creates a new account. @@ -810,7 +810,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice } - private static readonly string m_vivoxPasswordPath = "http://{0}/api2/viv_adm_password.php?user_name={1}&new_pwd={2}&auth_token={3}"; + private static readonly string m_vivoxPasswordPath = "https://{0}/api2/viv_adm_password.php?user_name={1}&new_pwd={2}&auth_token={3}"; /// /// Change the user's password. @@ -822,7 +822,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice } - private static readonly string m_vivoxChannelPath = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_name={2}&auth_token={3}"; + private static readonly string m_vivoxChannelPath = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_name={2}&auth_token={3}"; /// /// Create a channel. @@ -896,7 +896,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice return false; } - private static readonly string m_vivoxChannelSearchPath = "http://{0}/api2/viv_chan_search.php?cond_channame={1}&auth_token={2}"; + private static readonly string m_vivoxChannelSearchPath = "https://{0}/api2/viv_chan_search.php?cond_channame={1}&auth_token={2}"; /// /// Retrieve a channel. @@ -1040,7 +1040,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice return false; } - // private static readonly string m_vivoxChannelById = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; + // private static readonly string m_vivoxChannelById = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; // private XmlElement VivoxGetChannelById(string parent, string channelid) // { @@ -1064,7 +1064,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// In this case the call handles parent and description as optional values. /// - private static readonly string m_vivoxChannelDel = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; + private static readonly string m_vivoxChannelDel = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; private XmlElement VivoxDeleteChannel(string parent, string channelid) { @@ -1080,7 +1080,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// Return information on channels in the given directory /// - private static readonly string m_vivoxChannelSearch = "http://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}"; + private static readonly string m_vivoxChannelSearch = "https://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}"; private XmlElement VivoxListChildren(string channelid) { -- cgit v1.1 From 5ac77316e062056466bc70e3afd91e5ba6fef367 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 16 Aug 2012 00:59:58 +0200 Subject: Remove XML debug spam from vivox voice --- .../Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice') diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index 396d4c5..a30a38d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs @@ -469,8 +469,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice avatarName = avatar.Name; m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: scene = {0}, agentID = {1}", scene, agentID); - m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: request: {0}, path: {1}, param: {2}", - request, path, param); +// m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: request: {0}, path: {1}, param: {2}", +// request, path, param); XmlElement resp; bool retry = false; @@ -577,7 +577,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); - m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: avatar \"{0}\": {1}", avatarName, r); +// m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: avatar \"{0}\": {1}", avatarName, r); return r; } @@ -625,8 +625,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // voice channel LandData land = scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); - m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}", - scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param); +// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}", +// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param); // m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: avatar \"{0}\": location: {1} {2} {3}", // avatarName, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z); @@ -656,8 +656,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); - m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", - scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); +// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", +// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); return r; } catch (Exception e) @@ -684,11 +684,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice public string ChatSessionRequest(Scene scene, string request, string path, string param, UUID agentID, Caps caps) { - ScenePresence avatar = scene.GetScenePresence(agentID); - string avatarName = avatar.Name; +// ScenePresence avatar = scene.GetScenePresence(agentID); +// string avatarName = avatar.Name; - m_log.DebugFormat("[VivoxVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}", - avatarName, request, path, param); +// m_log.DebugFormat("[VivoxVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}", +// avatarName, request, path, param); return "true"; } @@ -1119,7 +1119,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice try { // Otherwise prepare the request - m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); +// m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); HttpWebResponse rsp = null; -- cgit v1.1 From 075cf2baa3eeb43c6a54921cd2a8489b3ca35d37 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 25 Mar 2014 03:17:04 +0100 Subject: Remove the spammy "voice not enabled" message some viewers trigger in non voice parcels --- .../OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice') diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index e756c70..9e6cc1a 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs @@ -635,15 +635,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // TODO: EstateSettings don't seem to get propagated... if (!scene.RegionInfo.EstateSettings.AllowVoice) { - m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings", - scene.RegionInfo.RegionName); + //m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings", + // scene.RegionInfo.RegionName); channel_uri = String.Empty; } if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0) { - m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", - scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); + //m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", + // scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); channel_uri = String.Empty; } else -- cgit v1.1 From 27b70c3fce43ff07d5253554d8b8c5b7b5e87702 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 30 Oct 2014 01:29:22 +0100 Subject: Fix a potential nullref in Vivox --- .../OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice') diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index 9e6cc1a..aef64d4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs @@ -626,6 +626,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // voice, if all do retrieve or obtain the parcel // voice channel LandData land = scene.GetLandData(avatar.AbsolutePosition); + if (land == null) + { + return ""; + } // m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}", // scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param); -- cgit v1.1 From 80118ac0575ad6816f65ed7436ec4e0b384f231d Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 21 Nov 2014 04:00:52 +0100 Subject: Remove braindead "fix" that messed up intersim scripted giving. --- .../Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice') 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 public void Initialise(IConfigSource config) { + MainConsole.Instance.Commands.AddCommand("vivox", false, "vivox debug", "vivox debug |", "Set vivox debugging", HandleDebug); m_config = config.Configs["VivoxVoice"]; @@ -1335,5 +1336,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice result = String.Empty; 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"); + } } } -- cgit v1.1