aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2011-10-25 02:56:30 +0100
committerMelanie2011-10-25 02:56:30 +0100
commit1b87a0c22991f87041ea6627e0b3db4da6e0a5a3 (patch)
treeeafd2c83fd59f05029dffd02704cd9f08056dde6 /OpenSim
parentMerge commit '9f171041c950d55d86481cdcee7a04c623bea8b2' into bigmerge (diff)
parentMake ScopeID optional for http GetAccount and GetAccounts (diff)
downloadopensim-SC_OLD-1b87a0c22991f87041ea6627e0b3db4da6e0a5a3.zip
opensim-SC_OLD-1b87a0c22991f87041ea6627e0b3db4da6e0a5a3.tar.gz
opensim-SC_OLD-1b87a0c22991f87041ea6627e0b3db4da6e0a5a3.tar.bz2
opensim-SC_OLD-1b87a0c22991f87041ea6627e0b3db4da6e0a5a3.tar.xz
Merge commit '4cffdf15ba320b71650ade9edddec2286b1c5258' into bigmerge
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs17
1 files changed, 6 insertions, 11 deletions
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index 32da44f..f987383 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -117,7 +117,6 @@ namespace OpenSim.Server.Handlers.UserAccounts
117 } 117 }
118 118
119 return FailureResult(); 119 return FailureResult();
120
121 } 120 }
122 121
123 byte[] GetAccount(Dictionary<string, object> request) 122 byte[] GetAccount(Dictionary<string, object> request)
@@ -126,13 +125,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
126 UUID scopeID = UUID.Zero; 125 UUID scopeID = UUID.Zero;
127 Dictionary<string, object> result = new Dictionary<string, object>(); 126 Dictionary<string, object> result = new Dictionary<string, object>();
128 127
129 if (!request.ContainsKey("ScopeID")) 128 if (request.ContainsKey("ScopeID") && !UUID.TryParse(request["ScopeID"].ToString(), out scopeID))
130 {
131 result["result"] = "null";
132 return ResultToBytes(result);
133 }
134
135 if (!UUID.TryParse(request["ScopeID"].ToString(), out scopeID))
136 { 129 {
137 result["result"] = "null"; 130 result["result"] = "null";
138 return ResultToBytes(result); 131 return ResultToBytes(result);
@@ -174,11 +167,11 @@ namespace OpenSim.Server.Handlers.UserAccounts
174 167
175 byte[] GetAccounts(Dictionary<string, object> request) 168 byte[] GetAccounts(Dictionary<string, object> request)
176 { 169 {
177 if (!request.ContainsKey("ScopeID") || !request.ContainsKey("query")) 170 if (!request.ContainsKey("query"))
178 return FailureResult(); 171 return FailureResult();
179 172
180 UUID scopeID = UUID.Zero; 173 UUID scopeID = UUID.Zero;
181 if (!UUID.TryParse(request["ScopeID"].ToString(), out scopeID)) 174 if (request.ContainsKey("ScopeID") && !UUID.TryParse(request["ScopeID"].ToString(), out scopeID))
182 return FailureResult(); 175 return FailureResult();
183 176
184 string query = request["query"].ToString(); 177 string query = request["query"].ToString();
@@ -187,7 +180,9 @@ namespace OpenSim.Server.Handlers.UserAccounts
187 180
188 Dictionary<string, object> result = new Dictionary<string, object>(); 181 Dictionary<string, object> result = new Dictionary<string, object>();
189 if ((accounts == null) || ((accounts != null) && (accounts.Count == 0))) 182 if ((accounts == null) || ((accounts != null) && (accounts.Count == 0)))
183 {
190 result["result"] = "null"; 184 result["result"] = "null";
185 }
191 else 186 else
192 { 187 {
193 int i = 0; 188 int i = 0;
@@ -208,7 +203,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
208 byte[] StoreAccount(Dictionary<string, object> request) 203 byte[] StoreAccount(Dictionary<string, object> request)
209 { 204 {
210 UUID principalID = UUID.Zero; 205 UUID principalID = UUID.Zero;
211 if (!(request.ContainsKey("PrincipalID") && UUID.TryParse(request["PrincipalID"].ToString(), out principalID))) 206 if (request.ContainsKey("PrincipalID") && !UUID.TryParse(request["PrincipalID"].ToString(), out principalID))
212 return FailureResult(); 207 return FailureResult();
213 208
214 UUID scopeID = UUID.Zero; 209 UUID scopeID = UUID.Zero;