Several more buglets removed.

slimupdates
Diva Canto 2010-01-13 09:17:30 -08:00
parent 011a1b3798
commit 7356860b48
15 changed files with 75 additions and 57 deletions

View File

@ -196,10 +196,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
public void UpdateDatabase(UUID user, AvatarAppearance appearance)
{
m_log.DebugFormat("[APPEARANCE]: UpdateDatabase");
//m_log.DebugFormat("[APPEARANCE]: UpdateDatabase");
AvatarData adata = new AvatarData(appearance);
m_scene.AvatarService.SetAvatar(user, adata);
}
private static byte[] GetDefaultVisualParams()

View File

@ -281,7 +281,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return false;
// Try local first
if (m_localBackend.CreateObject(destination, sog, true))
if (m_localBackend.CreateObject(destination, sog, isLocalCall))
{
//m_log.Debug("[REST COMMS]: LocalBackEnd SendCreateObject succeeded");
return true;

View File

@ -2358,7 +2358,7 @@ namespace OpenSim.Region.Framework.Scenes
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = InventoryService.GetItem(item);
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, /*item.AssetID*/ att.UUID);
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
}
return att.UUID;
}
@ -2403,7 +2403,7 @@ namespace OpenSim.Region.Framework.Scenes
// XXYY!!
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = InventoryService.GetItem(item);
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, /*item.AssetID*/ att.UUID);
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */);
if (m_AvatarFactory != null)
{

View File

@ -2553,6 +2553,9 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
sceneObject.SetScene(this);
// Force allocation of new LocalId
//
foreach (SceneObjectPart p in sceneObject.Children.Values)

View File

@ -414,7 +414,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Create the necessary child agents
List<AgentCircuitData> cagents = new List<AgentCircuitData>();
foreach (GridRegion neighbour in neighbours)
{
{
if (neighbour.RegionHandle != avatar.Scene.RegionInfo.RegionHandle)
{
@ -446,7 +446,6 @@ namespace OpenSim.Region.Framework.Scenes
if (avatar.Scene.CapsModule != null)
{
// These two are the same thing!
avatar.Scene.CapsModule.SetChildrenSeed(avatar.UUID, seeds);
}
avatar.KnownRegions = seeds;
@ -516,8 +515,6 @@ namespace OpenSim.Region.Framework.Scenes
agent.InventoryFolder = UUID.Zero;
agent.startpos = new Vector3(128, 128, 70);
agent.child = true;
if (avatar.Appearance == null)
m_log.Debug("XXX Appearance is null!!!!");
agent.Appearance = avatar.Appearance;
InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
@ -1450,17 +1447,17 @@ namespace OpenSim.Region.Framework.Scenes
return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber);
}
//private void Dump(string msg, List<ulong> handles)
//{
// m_log.InfoFormat("-------------- HANDLE DUMP ({0}) ---------", msg);
// foreach (ulong handle in handles)
// {
// uint x, y;
// Utils.LongToUInts(handle, out x, out y);
// x = x / Constants.RegionSize;
// y = y / Constants.RegionSize;
// m_log.InfoFormat("({0}, {1})", x, y);
// }
//}
private void Dump(string msg, List<ulong> handles)
{
m_log.InfoFormat("-------------- HANDLE DUMP ({0}) ---------", msg);
foreach (ulong handle in handles)
{
uint x, y;
Utils.LongToUInts(handle, out x, out y);
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
m_log.InfoFormat("({0}, {1})", x, y);
}
}
}
}

View File

@ -278,6 +278,9 @@ namespace OpenSim.Server.Base
{
foreach (KeyValuePair<string, object> kvp in data)
{
if (kvp.Value == null)
continue;
XmlElement elem = parent.OwnerDocument.CreateElement("",
kvp.Key, "");

View File

@ -65,7 +65,7 @@ namespace OpenSim.Server.Handlers.Presence
body = body.Trim();
//m_log.DebugFormat("[XXX]: query String: {0}", body);
string method = string.Empty;
try
{
Dictionary<string, object> request =
@ -74,7 +74,7 @@ namespace OpenSim.Server.Handlers.Presence
if (!request.ContainsKey("METHOD"))
return FailureResult();
string method = request["METHOD"].ToString();
method = request["METHOD"].ToString();
switch (method)
{
@ -97,7 +97,7 @@ namespace OpenSim.Server.Handlers.Presence
}
catch (Exception e)
{
m_log.Debug("[PRESENCE HANDLER]: Exception {0}" + e);
m_log.DebugFormat("[PRESENCE HANDLER]: Exception in method {0}: {1}", method, e);
}
return FailureResult();
@ -188,9 +188,11 @@ namespace OpenSim.Server.Handlers.Presence
if (request.ContainsKey("lookAt"))
Vector3.TryParse(request["lookAt"].ToString(), out look);
if (m_PresenceService.ReportAgent(session, region, position, look))
{
return SuccessResult();
}
return FailureResult();
}

View File

@ -61,11 +61,11 @@ namespace OpenSim.Server.Handlers.Simulation
{
//m_log.Debug("[CONNECTION DEBUGGING]: AgentHandler Called");
m_log.Debug("---------------------------");
m_log.Debug(" >> uri=" + request["uri"]);
m_log.Debug(" >> content-type=" + request["content-type"]);
m_log.Debug(" >> http-method=" + request["http-method"]);
m_log.Debug("---------------------------\n");
//m_log.Debug("---------------------------");
//m_log.Debug(" >> uri=" + request["uri"]);
//m_log.Debug(" >> content-type=" + request["content-type"]);
//m_log.Debug(" >> http-method=" + request["http-method"]);
//m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html";
@ -320,7 +320,7 @@ namespace OpenSim.Server.Handlers.Simulation
responsedata["int_response_code"] = HttpStatusCode.OK;
responsedata["str_response_string"] = "OpenSim agent " + id.ToString();
m_log.Debug("[AGENT HANDLER]: Agent Deleted.");
m_log.Debug("[AGENT HANDLER]: Agent Released/Deleted.");
}
}

View File

@ -59,13 +59,13 @@ namespace OpenSim.Server.Handlers.Simulation
public Hashtable Handler(Hashtable request)
{
m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called");
//m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called");
m_log.Debug("---------------------------");
m_log.Debug(" >> uri=" + request["uri"]);
m_log.Debug(" >> content-type=" + request["content-type"]);
m_log.Debug(" >> http-method=" + request["http-method"]);
m_log.Debug("---------------------------\n");
//m_log.Debug("---------------------------");
//m_log.Debug(" >> uri=" + request["uri"]);
//m_log.Debug(" >> content-type=" + request["content-type"]);
//m_log.Debug(" >> http-method=" + request["http-method"]);
//m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html";
@ -75,7 +75,7 @@ namespace OpenSim.Server.Handlers.Simulation
string action;
if (!Utils.GetParams((string)request["uri"], out objectID, out regionID, out action))
{
m_log.InfoFormat("[REST COMMS]: Invalid parameters for object message {0}", request["uri"]);
m_log.InfoFormat("[OBJECT HANDLER]: Invalid parameters for object message {0}", request["uri"]);
responsedata["int_response_code"] = 404;
responsedata["str_response_string"] = "false";
@ -101,7 +101,7 @@ namespace OpenSim.Server.Handlers.Simulation
//}
else
{
m_log.InfoFormat("[REST COMMS]: method {0} not supported in object message", method);
m_log.InfoFormat("[OBJECT HANDLER]: method {0} not supported in object message", method);
responsedata["int_response_code"] = HttpStatusCode.MethodNotAllowed;
responsedata["str_response_string"] = "Mthod not allowed";
@ -148,13 +148,13 @@ namespace OpenSim.Server.Handlers.Simulation
ISceneObject sog = null;
try
{
//sog = SceneObjectSerializer.FromXml2Format(sogXmlStr);
//m_log.DebugFormat("[OBJECT HANDLER]: received {0}", sogXmlStr);
sog = s.DeserializeObject(sogXmlStr);
sog.ExtraFromXmlString(extraStr);
}
catch (Exception ex)
{
m_log.InfoFormat("[REST COMMS]: exception on deserializing scene object {0}", ex.Message);
m_log.InfoFormat("[OBJECT HANDLER]: exception on deserializing scene object {0}", ex.Message);
responsedata["int_response_code"] = HttpStatusCode.BadRequest;
responsedata["str_response_string"] = "Bad request";
return;
@ -171,13 +171,22 @@ namespace OpenSim.Server.Handlers.Simulation
}
catch (Exception ex)
{
m_log.InfoFormat("[REST COMMS]: exception on setting state for scene object {0}", ex.Message);
m_log.InfoFormat("[OBJECT HANDLER]: exception on setting state for scene object {0}", ex.Message);
// ignore and continue
}
}
}
// This is the meaning of POST object
bool result = m_SimulationService.CreateObject(destination, sog, false);
bool result = false;
try
{
// This is the meaning of POST object
result = m_SimulationService.CreateObject(destination, sog, false);
}
catch (Exception e)
{
m_log.DebugFormat("[OBJECT HANDLER]: Exception in CreateObject: {0}", e.StackTrace);
}
responsedata["int_response_code"] = HttpStatusCode.OK;
responsedata["str_response_string"] = result.ToString();

View File

@ -68,7 +68,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
//httpRequest.Headers["authorization"] ...
//m_log.DebugFormat("[XXX]: query String: {0}", body);
string method = string.Empty;
try
{
Dictionary<string, object> request =
@ -77,7 +77,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
if (!request.ContainsKey("METHOD"))
return FailureResult();
string method = request["METHOD"].ToString();
method = request["METHOD"].ToString();
switch (method)
{
@ -88,11 +88,11 @@ namespace OpenSim.Server.Handlers.UserAccounts
case "setaccount":
return StoreAccount(request);
}
m_log.DebugFormat("[PRESENCE HANDLER]: unknown method request: {0}", method);
m_log.DebugFormat("[USER SERVICE HANDLER]: unknown method request: {0}", method);
}
catch (Exception e)
{
m_log.Debug("[PRESENCE HANDLER]: Exception {0}" + e);
m_log.DebugFormat("[USER SERVICE HANDLER]: Exception in method {0}: {1}", method, e);
}
return FailureResult();
@ -134,7 +134,9 @@ namespace OpenSim.Server.Handlers.UserAccounts
if (account == null)
result["result"] = "null";
else
{
result["result"] = account.ToKeyValuePairs();
}
return ResultToBytes(result);
}
@ -247,7 +249,6 @@ namespace OpenSim.Server.Handlers.UserAccounts
private byte[] ResultToBytes(Dictionary<string, object> result)
{
string xmlString = ServerUtils.BuildXmlResponse(result);
//m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
UTF8Encoding encoding = new UTF8Encoding();
return encoding.GetBytes(xmlString);
}

View File

@ -148,7 +148,7 @@ namespace OpenSim.Services.Connectors
string reqString = ServerUtils.BuildQueryString(sendData);
// m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString);
m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString);
try
{
string reply = SynchronousRestFormsRequester.MakeRequest("POST",

View File

@ -231,7 +231,7 @@ namespace OpenSim.Services.Connectors.Simulation
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message);
return false;
}
Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
//Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
ChildUpdateRequest.Method = "PUT";
@ -478,7 +478,7 @@ namespace OpenSim.Services.Connectors.Simulation
{
string uri
= "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + "/object/" + sog.UUID + "/";
//m_log.Debug(" >>> DoCreateChildAgentCall <<< " + uri);
//m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
WebRequest ObjectCreateRequest = WebRequest.Create(uri);
ObjectCreateRequest.Method = "POST";

View File

@ -98,11 +98,11 @@ namespace OpenSim.Services.Interfaces
string str = kvp["ServiceURLs"].ToString();
if (str != string.Empty)
{
string[] parts = str.Split(new char[] { '#' });
string[] parts = str.Split(new char[] { ';' });
Dictionary<string, object> dic = new Dictionary<string, object>();
foreach (string s in parts)
{
string[] parts2 = s.Split(new char[] { '=' });
string[] parts2 = s.Split(new char[] { '*' });
if (parts2.Length == 2)
ServiceURLs[parts2[0]] = parts2[1];
}
@ -119,14 +119,14 @@ namespace OpenSim.Services.Interfaces
result["PrincipalID"] = PrincipalID.ToString();
result["ScopeID"] = ScopeID.ToString();
result["Created"] = Created.ToString();
result["UserLavel"] = UserLevel.ToString();
result["UserLevel"] = UserLevel.ToString();
result["UserFlags"] = UserFlags.ToString();
result["UserTitle"] = UserTitle;
string str = string.Empty;
foreach (KeyValuePair<string, object> kvp in ServiceURLs)
{
str += kvp.Key + "=" + kvp.Value + "#";
str += kvp.Key + "*" + (kvp.Value == null ? "" : kvp.Value) + ";";
}
result["ServiceURLs"] = str;

View File

@ -121,7 +121,7 @@ namespace OpenSim.Services.PresenceService
public bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt)
{
//m_log.DebugFormat("[PRESENCE SERVICE]: ReportAgent with session {0} in region {1}", sessionID, regionID);
m_log.DebugFormat("[PRESENCE SERVICE]: ReportAgent with session {0} in region {1}", sessionID, regionID);
try
{
PresenceData pdata = m_Database.Get(sessionID);

View File

@ -119,6 +119,10 @@ namespace OpenSim.Services.UserAccountService
u.ScopeID = d.ScopeID;
u.Email = d.Data["Email"].ToString();
u.Created = Convert.ToInt32(d.Data["Created"].ToString());
if (d.Data["UserTitle"] != null)
u.UserTitle = d.Data["UserTitle"].ToString();
else
u.UserTitle = string.Empty;
string[] URLs = d.Data["ServiceURLs"].ToString().Split(new char[] { ' ' });
u.ServiceURLs = new Dictionary<string, object>();