aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Authentication
diff options
context:
space:
mode:
authorOren Hurvitz2014-06-01 17:39:11 +0300
committerOren Hurvitz2014-07-21 08:30:03 +0100
commit99ac770abbe3a95887c4b10c82f3985aa878eeef (patch)
tree8c946dab083dd50a352f3861415eca43185d8d95 /OpenSim/Server/Handlers/Authentication
parentSet "[Terrain]SendTerrainUpdatesByViewDistance=true" by default. (diff)
downloadopensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.zip
opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.gz
opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.bz2
opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.xz
Close streams immediately when we finish using them
Diffstat (limited to 'OpenSim/Server/Handlers/Authentication')
-rw-r--r--OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs17
1 files changed, 3 insertions, 14 deletions
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
index 5d65f67..6ee98b3 100644
--- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
@@ -209,7 +209,7 @@ namespace OpenSim.Server.Handlers.Authentication
209 209
210 rootElement.AppendChild(result); 210 rootElement.AppendChild(result);
211 211
212 return DocToBytes(doc); 212 return Util.DocToBytes(doc);
213 } 213 }
214 214
215 byte[] GetAuthInfo(UUID principalID) 215 byte[] GetAuthInfo(UUID principalID)
@@ -279,7 +279,7 @@ namespace OpenSim.Server.Handlers.Authentication
279 279
280 rootElement.AppendChild(result); 280 rootElement.AppendChild(result);
281 281
282 return DocToBytes(doc); 282 return Util.DocToBytes(doc);
283 } 283 }
284 284
285 private byte[] SuccessResult(string token) 285 private byte[] SuccessResult(string token)
@@ -306,18 +306,7 @@ namespace OpenSim.Server.Handlers.Authentication
306 306
307 rootElement.AppendChild(t); 307 rootElement.AppendChild(t);
308 308
309 return DocToBytes(doc); 309 return Util.DocToBytes(doc);
310 }
311
312 private byte[] DocToBytes(XmlDocument doc)
313 {
314 MemoryStream ms = new MemoryStream();
315 XmlTextWriter xw = new XmlTextWriter(ms, null);
316 xw.Formatting = Formatting.Indented;
317 doc.WriteTo(xw);
318 xw.Flush();
319
320 return ms.GetBuffer();
321 } 310 }
322 311
323 private byte[] ResultToBytes(Dictionary<string, object> result) 312 private byte[] ResultToBytes(Dictionary<string, object> result)