diff options
Diffstat (limited to 'OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs')
-rw-r--r-- | OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs index 9237c63..1f691d6 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | |||
@@ -60,9 +60,9 @@ namespace OpenSim.Server.Handlers.GridUser | |||
60 | protected override byte[] ProcessRequest(string path, Stream requestData, | 60 | protected override byte[] ProcessRequest(string path, Stream requestData, |
61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
62 | { | 62 | { |
63 | StreamReader sr = new StreamReader(requestData); | 63 | string body; |
64 | string body = sr.ReadToEnd(); | 64 | using(StreamReader sr = new StreamReader(requestData)) |
65 | sr.Close(); | 65 | body = sr.ReadToEnd(); |
66 | body = body.Trim(); | 66 | body = body.Trim(); |
67 | 67 | ||
68 | //m_log.DebugFormat("[XXX]: query String: {0}", body); | 68 | //m_log.DebugFormat("[XXX]: query String: {0}", body); |
@@ -185,6 +185,9 @@ namespace OpenSim.Server.Handlers.GridUser | |||
185 | 185 | ||
186 | GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(user); | 186 | GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(user); |
187 | 187 | ||
188 | if (guinfo == null) | ||
189 | return FailureResult(); | ||
190 | |||
188 | Dictionary<string, object> result = new Dictionary<string, object>(); | 191 | Dictionary<string, object> result = new Dictionary<string, object>(); |
189 | if (guinfo != null) | 192 | if (guinfo != null) |
190 | result["result"] = guinfo.ToKeyValuePairs(); | 193 | result["result"] = guinfo.ToKeyValuePairs(); |
@@ -225,6 +228,8 @@ namespace OpenSim.Server.Handlers.GridUser | |||
225 | int i = 0; | 228 | int i = 0; |
226 | foreach (GridUserInfo pinfo in pinfos) | 229 | foreach (GridUserInfo pinfo in pinfos) |
227 | { | 230 | { |
231 | if(pinfo == null) | ||
232 | continue; | ||
228 | Dictionary<string, object> rinfoDict = pinfo.ToKeyValuePairs(); | 233 | Dictionary<string, object> rinfoDict = pinfo.ToKeyValuePairs(); |
229 | result["griduser" + i] = rinfoDict; | 234 | result["griduser" + i] = rinfoDict; |
230 | i++; | 235 | i++; |