diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 37ab35a..45af212 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
65 | // Capability string prefixes | 65 | // Capability string prefixes |
66 | private static readonly string m_parcelVoiceInfoRequestPath = "0207/"; | 66 | private static readonly string m_parcelVoiceInfoRequestPath = "0207/"; |
67 | private static readonly string m_provisionVoiceAccountRequestPath = "0208/"; | 67 | private static readonly string m_provisionVoiceAccountRequestPath = "0208/"; |
68 | private static readonly string m_chatSessionRequestPath = "0209/"; | 68 | //private static readonly string m_chatSessionRequestPath = "0209/"; |
69 | 69 | ||
70 | // Control info | 70 | // Control info |
71 | private static bool m_Enabled = false; | 71 | private static bool m_Enabled = false; |
@@ -326,15 +326,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
326 | "ParcelVoiceInfoRequest", | 326 | "ParcelVoiceInfoRequest", |
327 | agentID.ToString())); | 327 | agentID.ToString())); |
328 | 328 | ||
329 | caps.RegisterHandler( | 329 | //caps.RegisterHandler( |
330 | "ChatSessionRequest", | 330 | // "ChatSessionRequest", |
331 | new RestStreamHandler( | 331 | // new RestStreamHandler( |
332 | "POST", | 332 | // "POST", |
333 | capsBase + m_chatSessionRequestPath, | 333 | // capsBase + m_chatSessionRequestPath, |
334 | (request, path, param, httpRequest, httpResponse) | 334 | // (request, path, param, httpRequest, httpResponse) |
335 | => ChatSessionRequest(scene, request, path, param, agentID, caps), | 335 | // => ChatSessionRequest(scene, request, path, param, agentID, caps), |
336 | "ChatSessionRequest", | 336 | // "ChatSessionRequest", |
337 | agentID.ToString())); | 337 | // agentID.ToString())); |
338 | } | 338 | } |
339 | 339 | ||
340 | /// <summary> | 340 | /// <summary> |
@@ -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; |