aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorAdam Frisby2009-07-12 02:16:49 +0000
committerAdam Frisby2009-07-12 02:16:49 +0000
commit71ab7a1e2d4b613c1d897e26b518c0316b723f95 (patch)
tree003c5d938d01abf9155bcfd5d85347d030b42b14 /OpenSim/Region
parent* More Vivox Fiddling (diff)
downloadopensim-SC_OLD-71ab7a1e2d4b613c1d897e26b518c0316b723f95.zip
opensim-SC_OLD-71ab7a1e2d4b613c1d897e26b518c0316b723f95.tar.gz
opensim-SC_OLD-71ab7a1e2d4b613c1d897e26b518c0316b723f95.tar.bz2
opensim-SC_OLD-71ab7a1e2d4b613c1d897e26b518c0316b723f95.tar.xz
* Workaround for a bug in Vivox Server r2978, whereby channel-search.channels.count returns 0 instead of the actual channel count. Should not affect more recent versions of Vivox where this issue has been fixed.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
index 98c39cc..f9d6bd2 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -921,6 +921,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
921 if (XmlFind(resp, "response.level0.channel-search.count", out count)) 921 if (XmlFind(resp, "response.level0.channel-search.count", out count))
922 { 922 {
923 int channels = Convert.ToInt32(count); 923 int channels = Convert.ToInt32(count);
924
925 // Bug in Vivox Server r2978 where count returns 0
926 // Found by Adam
927 if(channels == 0)
928 {
929 for(int j=0;j<100;j++)
930 {
931 string tmpId;
932 if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.id", j, out tmpId))
933 break;
934
935 channels = j + 1;
936 }
937 }
938
924 for (int i = 0; i < channels; i++) 939 for (int i = 0; i < channels; i++)
925 { 940 {
926 string name; 941 string name;
@@ -974,13 +989,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
974 } 989 }
975 else 990 else
976 { 991 {
977 m_log.Debug("[VivoxVoice] No channels registered."); 992 m_log.Debug("[VivoxVoice] No count element?");
978 } 993 }
979 994
980 channelId = String.Empty; 995 channelId = String.Empty;
981 channelUri = String.Empty; 996 channelUri = String.Empty;
982 997
983 m_log.Debug("[VivoxVoice] Could not find channel in XMLRESP: " + resp.InnerXml); 998 // Useful incase something goes wrong.
999 //m_log.Debug("[VivoxVoice] Could not find channel in XMLRESP: " + resp.InnerXml);
984 1000
985 return false; 1001 return false;
986 } 1002 }