aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/GridUser
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Server/Handlers/GridUser
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Server/Handlers/GridUser')
-rw-r--r--OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs11
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++;