aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar
diff options
context:
space:
mode:
authorMelanie2013-02-27 18:05:04 +0000
committerMelanie2013-02-27 18:05:04 +0000
commit578174d21c82e7249016e31f0c63215e67f92f17 (patch)
treec9c970d2ce4836dcf894922172d784d16cbc2837 /OpenSim/Region/OptionalModules/Avatar
parentMerge branch 'master' into careminster (diff)
parentImprove description of GenerateMapTiles config option (diff)
downloadopensim-SC-578174d21c82e7249016e31f0c63215e67f92f17.zip
opensim-SC-578174d21c82e7249016e31f0c63215e67f92f17.tar.gz
opensim-SC-578174d21c82e7249016e31f0c63215e67f92f17.tar.bz2
opensim-SC-578174d21c82e7249016e31f0c63215e67f92f17.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs21
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs12
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs46
3 files changed, 47 insertions, 32 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index f292a75..0cec959 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -551,13 +551,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
551 reqStream.Close(); 551 reqStream.Close();
552 } 552 }
553 553
554 HttpWebResponse fwdrsp = (HttpWebResponse)forwardreq.GetResponse(); 554 using (HttpWebResponse fwdrsp = (HttpWebResponse)forwardreq.GetResponse())
555 Encoding encoding = Util.UTF8; 555 {
556 StreamReader fwdresponsestream = new StreamReader(fwdrsp.GetResponseStream(), encoding); 556 Encoding encoding = Util.UTF8;
557 fwdresponsestr = fwdresponsestream.ReadToEnd(); 557
558 fwdresponsecontenttype = fwdrsp.ContentType; 558 using (Stream s = fwdrsp.GetResponseStream())
559 fwdresponsecode = (int)fwdrsp.StatusCode; 559 {
560 fwdresponsestream.Close(); 560 using (StreamReader fwdresponsestream = new StreamReader(s))
561 {
562 fwdresponsestr = fwdresponsestream.ReadToEnd();
563 fwdresponsecontenttype = fwdrsp.ContentType;
564 fwdresponsecode = (int)fwdrsp.StatusCode;
565 }
566 }
567 }
561 568
562 response["content_type"] = fwdresponsecontenttype; 569 response["content_type"] = fwdresponsecontenttype;
563 response["str_response_string"] = fwdresponsestr; 570 response["str_response_string"] = fwdresponsestr;
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
index 7da1de6..e756c70 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -1123,18 +1123,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1123 // Otherwise prepare the request 1123 // Otherwise prepare the request
1124// m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); 1124// m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl);
1125 1125
1126 HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); 1126 HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl);
1127 HttpWebResponse rsp = null;
1128 1127
1129 // We are sending just parameters, no content 1128 // We are sending just parameters, no content
1130 req.ContentLength = 0; 1129 req.ContentLength = 0;
1131 1130
1132 // Send request and retrieve the response 1131 // Send request and retrieve the response
1133 rsp = (HttpWebResponse)req.GetResponse(); 1132 using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse())
1134 1133 using (Stream s = rsp.GetResponseStream())
1135 XmlTextReader rdr = new XmlTextReader(rsp.GetResponseStream()); 1134 using (XmlTextReader rdr = new XmlTextReader(s))
1136 doc.Load(rdr); 1135 doc.Load(rdr);
1137 rdr.Close();
1138 } 1136 }
1139 catch (Exception e) 1137 catch (Exception e)
1140 { 1138 {
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index 1101851..71b24ac 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -1146,28 +1146,38 @@ namespace Nwc.XmlRpc
1146 request.AllowWriteStreamBuffering = true; 1146 request.AllowWriteStreamBuffering = true;
1147 request.KeepAlive = !_disableKeepAlive; 1147 request.KeepAlive = !_disableKeepAlive;
1148 1148
1149 Stream stream = request.GetRequestStream(); 1149 using (Stream stream = request.GetRequestStream())
1150 XmlTextWriter xml = new XmlTextWriter(stream, Encoding.ASCII);
1151 _serializer.Serialize(xml, this);
1152 xml.Flush();
1153 xml.Close();
1154
1155 HttpWebResponse response = (HttpWebResponse)request.GetResponse();
1156 StreamReader input = new StreamReader(response.GetResponseStream());
1157
1158 string inputXml = input.ReadToEnd();
1159 XmlRpcResponse resp;
1160 try
1161 { 1150 {
1162 resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml); 1151 using (XmlTextWriter xml = new XmlTextWriter(stream, Encoding.ASCII))
1152 {
1153 _serializer.Serialize(xml, this);
1154 xml.Flush();
1155 }
1163 } 1156 }
1164 catch (Exception e) 1157
1158 XmlRpcResponse resp;
1159
1160 using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
1165 { 1161 {
1166 RequestResponse = inputXml; 1162 using (Stream s = response.GetResponseStream())
1167 throw e; 1163 {
1164 using (StreamReader input = new StreamReader(s))
1165 {
1166 string inputXml = input.ReadToEnd();
1167
1168 try
1169 {
1170 resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml);
1171 }
1172 catch (Exception e)
1173 {
1174 RequestResponse = inputXml;
1175 throw e;
1176 }
1177 }
1178 }
1168 } 1179 }
1169 input.Close(); 1180
1170 response.Close();
1171 return resp; 1181 return resp;
1172 } 1182 }
1173 } 1183 }