* 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.
parent
50ccf914ca
commit
71ab7a1e2d
|
@ -921,6 +921,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
if (XmlFind(resp, "response.level0.channel-search.count", out count))
|
if (XmlFind(resp, "response.level0.channel-search.count", out count))
|
||||||
{
|
{
|
||||||
int channels = Convert.ToInt32(count);
|
int channels = Convert.ToInt32(count);
|
||||||
|
|
||||||
|
// Bug in Vivox Server r2978 where count returns 0
|
||||||
|
// Found by Adam
|
||||||
|
if(channels == 0)
|
||||||
|
{
|
||||||
|
for(int j=0;j<100;j++)
|
||||||
|
{
|
||||||
|
string tmpId;
|
||||||
|
if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.id", j, out tmpId))
|
||||||
|
break;
|
||||||
|
|
||||||
|
channels = j + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < channels; i++)
|
for (int i = 0; i < channels; i++)
|
||||||
{
|
{
|
||||||
string name;
|
string name;
|
||||||
|
@ -974,13 +989,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Debug("[VivoxVoice] No channels registered.");
|
m_log.Debug("[VivoxVoice] No count element?");
|
||||||
}
|
}
|
||||||
|
|
||||||
channelId = String.Empty;
|
channelId = String.Empty;
|
||||||
channelUri = String.Empty;
|
channelUri = String.Empty;
|
||||||
|
|
||||||
m_log.Debug("[VivoxVoice] Could not find channel in XMLRESP: " + resp.InnerXml);
|
// Useful incase something goes wrong.
|
||||||
|
//m_log.Debug("[VivoxVoice] Could not find channel in XMLRESP: " + resp.InnerXml);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue