diff options
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index e756c70..20affa6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -117,6 +117,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
117 | 117 | ||
118 | private IConfig m_config; | 118 | private IConfig m_config; |
119 | 119 | ||
120 | private object m_Lock; | ||
121 | |||
120 | public void Initialise(IConfigSource config) | 122 | public void Initialise(IConfigSource config) |
121 | { | 123 | { |
122 | 124 | ||
@@ -128,6 +130,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
128 | if (!m_config.GetBoolean("enabled", false)) | 130 | if (!m_config.GetBoolean("enabled", false)) |
129 | return; | 131 | return; |
130 | 132 | ||
133 | m_Lock = new object(); | ||
134 | |||
131 | try | 135 | try |
132 | { | 136 | { |
133 | // retrieve configuration variables | 137 | // retrieve configuration variables |
@@ -1118,25 +1122,32 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
1118 | 1122 | ||
1119 | doc = new XmlDocument(); | 1123 | doc = new XmlDocument(); |
1120 | 1124 | ||
1121 | try | 1125 | // Let's serialize all calls to Vivox. Most of these are driven by |
1126 | // the clients (CAPs), when the user arrives at the region. We don't | ||
1127 | // want to issue many simultaneous http requests to Vivox, because mono | ||
1128 | // doesn't like that | ||
1129 | lock (m_Lock) | ||
1122 | { | 1130 | { |
1123 | // Otherwise prepare the request | 1131 | try |
1124 | // m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); | 1132 | { |
1133 | // Otherwise prepare the request | ||
1134 | //m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); | ||
1125 | 1135 | ||
1126 | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); | 1136 | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); |
1127 | 1137 | ||
1128 | // We are sending just parameters, no content | 1138 | // We are sending just parameters, no content |
1129 | req.ContentLength = 0; | 1139 | req.ContentLength = 0; |
1130 | 1140 | ||
1131 | // Send request and retrieve the response | 1141 | // Send request and retrieve the response |
1132 | using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse()) | 1142 | using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse()) |
1133 | using (Stream s = rsp.GetResponseStream()) | 1143 | using (Stream s = rsp.GetResponseStream()) |
1134 | using (XmlTextReader rdr = new XmlTextReader(s)) | 1144 | using (XmlTextReader rdr = new XmlTextReader(s)) |
1135 | doc.Load(rdr); | 1145 | doc.Load(rdr); |
1136 | } | 1146 | } |
1137 | catch (Exception e) | 1147 | catch (Exception e) |
1138 | { | 1148 | { |
1139 | m_log.ErrorFormat("[VivoxVoice] Error in admin call : {0}", e.Message); | 1149 | m_log.ErrorFormat("[VivoxVoice] Error in admin call : {0}", e.Message); |
1150 | } | ||
1140 | } | 1151 | } |
1141 | 1152 | ||
1142 | // If we're debugging server responses, dump the whole | 1153 | // If we're debugging server responses, dump the whole |