aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorDiva Canto2010-01-13 09:17:30 -0800
committerDiva Canto2010-01-13 09:17:30 -0800
commit7356860b487febd12c2e0de2f009a6df9ea0aeec (patch)
tree801eaa0c90483cca8a07f2b4f9f30bf16be84f62 /OpenSim/Server
parentMore appearance woes fixed, this time for child agents. Tested on a grid with... (diff)
downloadopensim-SC_OLD-7356860b487febd12c2e0de2f009a6df9ea0aeec.zip
opensim-SC_OLD-7356860b487febd12c2e0de2f009a6df9ea0aeec.tar.gz
opensim-SC_OLD-7356860b487febd12c2e0de2f009a6df9ea0aeec.tar.bz2
opensim-SC_OLD-7356860b487febd12c2e0de2f009a6df9ea0aeec.tar.xz
Several more buglets removed.
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs3
-rw-r--r--OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs10
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs12
-rw-r--r--OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs35
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs11
5 files changed, 43 insertions, 28 deletions
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index a5d28a4..e00eb2a 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -278,6 +278,9 @@ namespace OpenSim.Server.Base
278 { 278 {
279 foreach (KeyValuePair<string, object> kvp in data) 279 foreach (KeyValuePair<string, object> kvp in data)
280 { 280 {
281 if (kvp.Value == null)
282 continue;
283
281 XmlElement elem = parent.OwnerDocument.CreateElement("", 284 XmlElement elem = parent.OwnerDocument.CreateElement("",
282 kvp.Key, ""); 285 kvp.Key, "");
283 286
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
index 926c195..d180bbb 100644
--- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Server.Handlers.Presence
65 body = body.Trim(); 65 body = body.Trim();
66 66
67 //m_log.DebugFormat("[XXX]: query String: {0}", body); 67 //m_log.DebugFormat("[XXX]: query String: {0}", body);
68 68 string method = string.Empty;
69 try 69 try
70 { 70 {
71 Dictionary<string, object> request = 71 Dictionary<string, object> request =
@@ -74,7 +74,7 @@ namespace OpenSim.Server.Handlers.Presence
74 if (!request.ContainsKey("METHOD")) 74 if (!request.ContainsKey("METHOD"))
75 return FailureResult(); 75 return FailureResult();
76 76
77 string method = request["METHOD"].ToString(); 77 method = request["METHOD"].ToString();
78 78
79 switch (method) 79 switch (method)
80 { 80 {
@@ -97,7 +97,7 @@ namespace OpenSim.Server.Handlers.Presence
97 } 97 }
98 catch (Exception e) 98 catch (Exception e)
99 { 99 {
100 m_log.Debug("[PRESENCE HANDLER]: Exception {0}" + e); 100 m_log.DebugFormat("[PRESENCE HANDLER]: Exception in method {0}: {1}", method, e);
101 } 101 }
102 102
103 return FailureResult(); 103 return FailureResult();
@@ -188,9 +188,11 @@ namespace OpenSim.Server.Handlers.Presence
188 188
189 if (request.ContainsKey("lookAt")) 189 if (request.ContainsKey("lookAt"))
190 Vector3.TryParse(request["lookAt"].ToString(), out look); 190 Vector3.TryParse(request["lookAt"].ToString(), out look);
191 191
192 if (m_PresenceService.ReportAgent(session, region, position, look)) 192 if (m_PresenceService.ReportAgent(session, region, position, look))
193 {
193 return SuccessResult(); 194 return SuccessResult();
195 }
194 196
195 return FailureResult(); 197 return FailureResult();
196 } 198 }
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 782034b..da9c015 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -61,11 +61,11 @@ namespace OpenSim.Server.Handlers.Simulation
61 { 61 {
62 //m_log.Debug("[CONNECTION DEBUGGING]: AgentHandler Called"); 62 //m_log.Debug("[CONNECTION DEBUGGING]: AgentHandler Called");
63 63
64 m_log.Debug("---------------------------"); 64 //m_log.Debug("---------------------------");
65 m_log.Debug(" >> uri=" + request["uri"]); 65 //m_log.Debug(" >> uri=" + request["uri"]);
66 m_log.Debug(" >> content-type=" + request["content-type"]); 66 //m_log.Debug(" >> content-type=" + request["content-type"]);
67 m_log.Debug(" >> http-method=" + request["http-method"]); 67 //m_log.Debug(" >> http-method=" + request["http-method"]);
68 m_log.Debug("---------------------------\n"); 68 //m_log.Debug("---------------------------\n");
69 69
70 Hashtable responsedata = new Hashtable(); 70 Hashtable responsedata = new Hashtable();
71 responsedata["content_type"] = "text/html"; 71 responsedata["content_type"] = "text/html";
@@ -320,7 +320,7 @@ namespace OpenSim.Server.Handlers.Simulation
320 responsedata["int_response_code"] = HttpStatusCode.OK; 320 responsedata["int_response_code"] = HttpStatusCode.OK;
321 responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); 321 responsedata["str_response_string"] = "OpenSim agent " + id.ToString();
322 322
323 m_log.Debug("[AGENT HANDLER]: Agent Deleted."); 323 m_log.Debug("[AGENT HANDLER]: Agent Released/Deleted.");
324 } 324 }
325 } 325 }
326 326
diff --git a/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs b/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs
index 995a3c4..b6eabe3 100644
--- a/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs
@@ -59,13 +59,13 @@ namespace OpenSim.Server.Handlers.Simulation
59 59
60 public Hashtable Handler(Hashtable request) 60 public Hashtable Handler(Hashtable request)
61 { 61 {
62 m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called"); 62 //m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called");
63 63
64 m_log.Debug("---------------------------"); 64 //m_log.Debug("---------------------------");
65 m_log.Debug(" >> uri=" + request["uri"]); 65 //m_log.Debug(" >> uri=" + request["uri"]);
66 m_log.Debug(" >> content-type=" + request["content-type"]); 66 //m_log.Debug(" >> content-type=" + request["content-type"]);
67 m_log.Debug(" >> http-method=" + request["http-method"]); 67 //m_log.Debug(" >> http-method=" + request["http-method"]);
68 m_log.Debug("---------------------------\n"); 68 //m_log.Debug("---------------------------\n");
69 69
70 Hashtable responsedata = new Hashtable(); 70 Hashtable responsedata = new Hashtable();
71 responsedata["content_type"] = "text/html"; 71 responsedata["content_type"] = "text/html";
@@ -75,7 +75,7 @@ namespace OpenSim.Server.Handlers.Simulation
75 string action; 75 string action;
76 if (!Utils.GetParams((string)request["uri"], out objectID, out regionID, out action)) 76 if (!Utils.GetParams((string)request["uri"], out objectID, out regionID, out action))
77 { 77 {
78 m_log.InfoFormat("[REST COMMS]: Invalid parameters for object message {0}", request["uri"]); 78 m_log.InfoFormat("[OBJECT HANDLER]: Invalid parameters for object message {0}", request["uri"]);
79 responsedata["int_response_code"] = 404; 79 responsedata["int_response_code"] = 404;
80 responsedata["str_response_string"] = "false"; 80 responsedata["str_response_string"] = "false";
81 81
@@ -101,7 +101,7 @@ namespace OpenSim.Server.Handlers.Simulation
101 //} 101 //}
102 else 102 else
103 { 103 {
104 m_log.InfoFormat("[REST COMMS]: method {0} not supported in object message", method); 104 m_log.InfoFormat("[OBJECT HANDLER]: method {0} not supported in object message", method);
105 responsedata["int_response_code"] = HttpStatusCode.MethodNotAllowed; 105 responsedata["int_response_code"] = HttpStatusCode.MethodNotAllowed;
106 responsedata["str_response_string"] = "Mthod not allowed"; 106 responsedata["str_response_string"] = "Mthod not allowed";
107 107
@@ -148,13 +148,13 @@ namespace OpenSim.Server.Handlers.Simulation
148 ISceneObject sog = null; 148 ISceneObject sog = null;
149 try 149 try
150 { 150 {
151 //sog = SceneObjectSerializer.FromXml2Format(sogXmlStr); 151 //m_log.DebugFormat("[OBJECT HANDLER]: received {0}", sogXmlStr);
152 sog = s.DeserializeObject(sogXmlStr); 152 sog = s.DeserializeObject(sogXmlStr);
153 sog.ExtraFromXmlString(extraStr); 153 sog.ExtraFromXmlString(extraStr);
154 } 154 }
155 catch (Exception ex) 155 catch (Exception ex)
156 { 156 {
157 m_log.InfoFormat("[REST COMMS]: exception on deserializing scene object {0}", ex.Message); 157 m_log.InfoFormat("[OBJECT HANDLER]: exception on deserializing scene object {0}", ex.Message);
158 responsedata["int_response_code"] = HttpStatusCode.BadRequest; 158 responsedata["int_response_code"] = HttpStatusCode.BadRequest;
159 responsedata["str_response_string"] = "Bad request"; 159 responsedata["str_response_string"] = "Bad request";
160 return; 160 return;
@@ -171,13 +171,22 @@ namespace OpenSim.Server.Handlers.Simulation
171 } 171 }
172 catch (Exception ex) 172 catch (Exception ex)
173 { 173 {
174 m_log.InfoFormat("[REST COMMS]: exception on setting state for scene object {0}", ex.Message); 174 m_log.InfoFormat("[OBJECT HANDLER]: exception on setting state for scene object {0}", ex.Message);
175 // ignore and continue 175 // ignore and continue
176 } 176 }
177 } 177 }
178 } 178 }
179 // This is the meaning of POST object 179
180 bool result = m_SimulationService.CreateObject(destination, sog, false); 180 bool result = false;
181 try
182 {
183 // This is the meaning of POST object
184 result = m_SimulationService.CreateObject(destination, sog, false);
185 }
186 catch (Exception e)
187 {
188 m_log.DebugFormat("[OBJECT HANDLER]: Exception in CreateObject: {0}", e.StackTrace);
189 }
181 190
182 responsedata["int_response_code"] = HttpStatusCode.OK; 191 responsedata["int_response_code"] = HttpStatusCode.OK;
183 responsedata["str_response_string"] = result.ToString(); 192 responsedata["str_response_string"] = result.ToString();
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index b54b63e..6a82165 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
68 //httpRequest.Headers["authorization"] ... 68 //httpRequest.Headers["authorization"] ...
69 69
70 //m_log.DebugFormat("[XXX]: query String: {0}", body); 70 //m_log.DebugFormat("[XXX]: query String: {0}", body);
71 71 string method = string.Empty;
72 try 72 try
73 { 73 {
74 Dictionary<string, object> request = 74 Dictionary<string, object> request =
@@ -77,7 +77,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
77 if (!request.ContainsKey("METHOD")) 77 if (!request.ContainsKey("METHOD"))
78 return FailureResult(); 78 return FailureResult();
79 79
80 string method = request["METHOD"].ToString(); 80 method = request["METHOD"].ToString();
81 81
82 switch (method) 82 switch (method)
83 { 83 {
@@ -88,11 +88,11 @@ namespace OpenSim.Server.Handlers.UserAccounts
88 case "setaccount": 88 case "setaccount":
89 return StoreAccount(request); 89 return StoreAccount(request);
90 } 90 }
91 m_log.DebugFormat("[PRESENCE HANDLER]: unknown method request: {0}", method); 91 m_log.DebugFormat("[USER SERVICE HANDLER]: unknown method request: {0}", method);
92 } 92 }
93 catch (Exception e) 93 catch (Exception e)
94 { 94 {
95 m_log.Debug("[PRESENCE HANDLER]: Exception {0}" + e); 95 m_log.DebugFormat("[USER SERVICE HANDLER]: Exception in method {0}: {1}", method, e);
96 } 96 }
97 97
98 return FailureResult(); 98 return FailureResult();
@@ -134,7 +134,9 @@ namespace OpenSim.Server.Handlers.UserAccounts
134 if (account == null) 134 if (account == null)
135 result["result"] = "null"; 135 result["result"] = "null";
136 else 136 else
137 {
137 result["result"] = account.ToKeyValuePairs(); 138 result["result"] = account.ToKeyValuePairs();
139 }
138 140
139 return ResultToBytes(result); 141 return ResultToBytes(result);
140 } 142 }
@@ -247,7 +249,6 @@ namespace OpenSim.Server.Handlers.UserAccounts
247 private byte[] ResultToBytes(Dictionary<string, object> result) 249 private byte[] ResultToBytes(Dictionary<string, object> result)
248 { 250 {
249 string xmlString = ServerUtils.BuildXmlResponse(result); 251 string xmlString = ServerUtils.BuildXmlResponse(result);
250 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
251 UTF8Encoding encoding = new UTF8Encoding(); 252 UTF8Encoding encoding = new UTF8Encoding();
252 return encoding.GetBytes(xmlString); 253 return encoding.GetBytes(xmlString);
253 } 254 }