diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs | 2 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs index 1e29378..755272b 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Server.Handlers.GridUser | |||
56 | Object[] args = new Object[] { config }; | 56 | Object[] args = new Object[] { config }; |
57 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(service, args); | 57 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(service, args); |
58 | 58 | ||
59 | IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName); ; | 59 | IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName); |
60 | 60 | ||
61 | server.AddStreamHandler(new GridUserServerPostHandler(m_GridUserService, auth)); | 61 | server.AddStreamHandler(new GridUserServerPostHandler(m_GridUserService, auth)); |
62 | } | 62 | } |
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++; |