From 66920a9047b54db947d02f252e17409b7fc32ef0 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 12 Jan 2010 09:22:58 -0800 Subject: Fixed more appearance woes that showed up using remote connectors. Appearance is now being passed with AgentCircuitData, as it should be. --- OpenSim/Framework/AgentCircuitData.cs | 54 ++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/AgentCircuitData.cs') diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index c0168e2..ad29950 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -155,6 +155,31 @@ namespace OpenSim.Framework args["secure_session_id"] = OSD.FromUUID(SecureSessionID); args["session_id"] = OSD.FromUUID(SessionID); args["start_pos"] = OSD.FromString(startpos.ToString()); + args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); + + // We might not pass this in all cases... + if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) + { + OSDArray wears = new OSDArray(Appearance.Wearables.Length); + foreach (AvatarWearable awear in Appearance.Wearables) + { + wears.Add(OSD.FromUUID(awear.ItemID)); + wears.Add(OSD.FromUUID(awear.AssetID)); + } + args["wearables"] = wears; + } + + Dictionary attachments = Appearance.GetAttachmentDictionary(); + if ((attachments != null) && (attachments.Count > 0)) + { + OSDArray attachs = new OSDArray(attachments.Count); + foreach (KeyValuePair kvp in attachments) + { + AttachmentData adata = new AttachmentData(kvp.Key, kvp.Value[0], kvp.Value[1]); + attachs.Add(adata.PackUpdateMessage()); + } + args["attachments"] = attachs; + } return args; } @@ -209,8 +234,35 @@ namespace OpenSim.Framework if (args["session_id"] != null) SessionID = args["session_id"].AsUUID(); if (args["start_pos"] != null) - Vector3.TryParse(args["start_pos"].AsString(), out startpos); + Vector3.TryParse(args["start_pos"].AsString(), out startpos); + Appearance = new AvatarAppearance(AgentID); + if (args["appearance_serial"] != null) + Appearance.Serial = args["appearance_serial"].AsInteger(); + if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array) + { + OSDArray wears = (OSDArray)(args["wearables"]); + for (int i = 0; i < wears.Count / 2; i++) + { + Appearance.Wearables[i].ItemID = wears[i*2].AsUUID(); + Appearance.Wearables[i].AssetID = wears[(i*2)+1].AsUUID(); + } + } + + if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array) + { + OSDArray attachs = (OSDArray)(args["attachments"]); + AttachmentData[] attachments = new AttachmentData[attachs.Count]; + int i = 0; + foreach (OSD o in attachs) + { + if (o.Type == OSDType.Map) + { + attachments[i++] = new AttachmentData((OSDMap)o); + } + } + Appearance.SetAttachments(attachments); + } } } -- cgit v1.1 From 4de82891a9c1219fd798fc005f5dea4dc7ea13f2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 13 Jan 2010 09:34:08 -0800 Subject: Bug in Teleport fixed -- Appearance was missing from AgentCircuitData. --- OpenSim/Framework/AgentCircuitData.cs | 38 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'OpenSim/Framework/AgentCircuitData.cs') diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index ad29950..e655aa4 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -157,28 +157,34 @@ namespace OpenSim.Framework args["start_pos"] = OSD.FromString(startpos.ToString()); args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); - // We might not pass this in all cases... - if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) + if (Appearance != null) { - OSDArray wears = new OSDArray(Appearance.Wearables.Length); - foreach (AvatarWearable awear in Appearance.Wearables) + //System.Console.WriteLine("XXX Before packing Wearables"); + if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) { - wears.Add(OSD.FromUUID(awear.ItemID)); - wears.Add(OSD.FromUUID(awear.AssetID)); + OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2); + foreach (AvatarWearable awear in Appearance.Wearables) + { + wears.Add(OSD.FromUUID(awear.ItemID)); + wears.Add(OSD.FromUUID(awear.AssetID)); + //System.Console.WriteLine("XXX ItemID=" + awear.ItemID + " assetID=" + awear.AssetID); + } + args["wearables"] = wears; } - args["wearables"] = wears; - } - Dictionary attachments = Appearance.GetAttachmentDictionary(); - if ((attachments != null) && (attachments.Count > 0)) - { - OSDArray attachs = new OSDArray(attachments.Count); - foreach (KeyValuePair kvp in attachments) + //System.Console.WriteLine("XXX Before packing Attachments"); + Dictionary attachments = Appearance.GetAttachmentDictionary(); + if ((attachments != null) && (attachments.Count > 0)) { - AttachmentData adata = new AttachmentData(kvp.Key, kvp.Value[0], kvp.Value[1]); - attachs.Add(adata.PackUpdateMessage()); + OSDArray attachs = new OSDArray(attachments.Count); + foreach (KeyValuePair kvp in attachments) + { + AttachmentData adata = new AttachmentData(kvp.Key, kvp.Value[0], kvp.Value[1]); + attachs.Add(adata.PackUpdateMessage()); + //System.Console.WriteLine("XXX att.pt=" + kvp.Key + "; itemID=" + kvp.Value[0] + "; assetID=" + kvp.Value[1]); + } + args["attachments"] = attachs; } - args["attachments"] = attachs; } return args; -- cgit v1.1 From a7309d90dacf503b0170ad911289c33e9ab42821 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 17 Jan 2010 08:40:05 -0800 Subject: * Added ServiceURLs to AgentCircuitData. * Fixed a configuration buglet introduced yesterday in StandaloneHypergrid.ini. --- OpenSim/Framework/AgentCircuitData.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'OpenSim/Framework/AgentCircuitData.cs') diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index e655aa4..a3b999e 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -101,6 +101,8 @@ namespace OpenSim.Framework /// public Vector3 startpos; + public Dictionary ServiceURLs; + public AgentCircuitData() { } @@ -187,6 +189,16 @@ namespace OpenSim.Framework } } + if (ServiceURLs != null && ServiceURLs.Count > 0) + { + OSDArray urls = new OSDArray(ServiceURLs.Count * 2); + foreach (KeyValuePair kvp in ServiceURLs) + { + urls.Add(OSD.FromString(kvp.Key)); + urls.Add(OSD.FromString((kvp.Value == null) ? string.Empty : kvp.Value.ToString())); + } + } + return args; } @@ -270,6 +282,15 @@ namespace OpenSim.Framework Appearance.SetAttachments(attachments); } + ServiceURLs = new Dictionary(); + if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array) + { + OSDArray urls = (OSDArray)(args["service_urls"]); + for (int i = 0; i < urls.Count / 2; i++) + { + ServiceURLs[urls[i * 2].AsString()] = urls[(i * 2) + 1].AsString(); + } + } } } -- cgit v1.1 From b2e6ec9e12ad07eb08496ebe8ca0476b793017d5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 17 Jan 2010 18:04:55 -0800 Subject: Agent gets there through the Gatekeeper, but still a few quirks to fix. --- OpenSim/Framework/AgentCircuitData.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Framework/AgentCircuitData.cs') diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index a3b999e..f2f0a53 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -194,9 +194,11 @@ namespace OpenSim.Framework OSDArray urls = new OSDArray(ServiceURLs.Count * 2); foreach (KeyValuePair kvp in ServiceURLs) { + //System.Console.WriteLine("XXX " + kvp.Key + "=" + kvp.Value); urls.Add(OSD.FromString(kvp.Key)); urls.Add(OSD.FromString((kvp.Value == null) ? string.Empty : kvp.Value.ToString())); } + args["service_urls"] = urls; } return args; @@ -289,6 +291,8 @@ namespace OpenSim.Framework for (int i = 0; i < urls.Count / 2; i++) { ServiceURLs[urls[i * 2].AsString()] = urls[(i * 2) + 1].AsString(); + //System.Console.WriteLine("XXX " + urls[i * 2].AsString() + "=" + urls[(i * 2) + 1].AsString()); + } } } -- cgit v1.1 From 7c00469cd210cfdda3dd835867469159d4c8b9d9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 27 Jan 2010 08:00:29 -0800 Subject: Added ExternalName config on Gatekeeper. --- OpenSim/Framework/AgentCircuitData.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Framework/AgentCircuitData.cs') diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index f2f0a53..142ca2c 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -97,6 +97,12 @@ namespace OpenSim.Framework public UUID SessionID; /// + /// Hypergrid service token; generated by the user domain, consumed by the receiving grid. + /// There is one such unique token for each grid visited. + /// + public string ServiceSessionID = string.Empty; + + /// /// Position the Agent's Avatar starts in the region /// public Vector3 startpos; @@ -156,6 +162,7 @@ namespace OpenSim.Framework args["inventory_folder"] = OSD.FromUUID(InventoryFolder); args["secure_session_id"] = OSD.FromUUID(SecureSessionID); args["session_id"] = OSD.FromUUID(SessionID); + args["service_session_id"] = OSD.FromString(ServiceSessionID); args["start_pos"] = OSD.FromString(startpos.ToString()); args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); @@ -253,6 +260,8 @@ namespace OpenSim.Framework SecureSessionID = args["secure_session_id"].AsUUID(); if (args["session_id"] != null) SessionID = args["session_id"].AsUUID(); + if (args["service_session_id"] != null) + ServiceSessionID = args["service_session_id"].AsString(); if (args["start_pos"] != null) Vector3.TryParse(args["start_pos"].AsString(), out startpos); -- cgit v1.1 From 00f7d622cbc2c2e61d2efaacd8275da3f9821d8b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 28 Jan 2010 19:19:42 -0800 Subject: HG 1.5 is in place. Tested in standalone only. --- OpenSim/Framework/AgentCircuitData.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Framework/AgentCircuitData.cs') diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 142ca2c..9c9b4b0 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -75,6 +75,11 @@ namespace OpenSim.Framework public uint circuitcode; /// + /// How this agent got here + /// + public uint teleportFlags; + + /// /// Agent's account first name /// public string firstname; -- cgit v1.1 From 0c81966c0a8f69474fb542d7b4df1780ef756519 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 29 Jan 2010 09:12:22 -0800 Subject: Works for grid login. --- OpenSim/Framework/AgentCircuitData.cs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'OpenSim/Framework/AgentCircuitData.cs') diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 9c9b4b0..353e5bf 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -149,17 +149,19 @@ namespace OpenSim.Framework args["base_folder"] = OSD.FromUUID(BaseFolder); args["caps_path"] = OSD.FromString(CapsPath); - OSDArray childrenSeeds = new OSDArray(ChildrenCapSeeds.Count); - foreach (KeyValuePair kvp in ChildrenCapSeeds) + if (ChildrenCapSeeds != null) { - OSDMap pair = new OSDMap(); - pair["handle"] = OSD.FromString(kvp.Key.ToString()); - pair["seed"] = OSD.FromString(kvp.Value); - childrenSeeds.Add(pair); + OSDArray childrenSeeds = new OSDArray(ChildrenCapSeeds.Count); + foreach (KeyValuePair kvp in ChildrenCapSeeds) + { + OSDMap pair = new OSDMap(); + pair["handle"] = OSD.FromString(kvp.Key.ToString()); + pair["seed"] = OSD.FromString(kvp.Value); + childrenSeeds.Add(pair); + } + if (ChildrenCapSeeds.Count > 0) + args["children_seeds"] = childrenSeeds; } - if (ChildrenCapSeeds.Count > 0) - args["children_seeds"] = childrenSeeds; - args["child"] = OSD.FromBoolean(child); args["circuit_code"] = OSD.FromString(circuitcode.ToString()); args["first_name"] = OSD.FromString(firstname); @@ -167,6 +169,7 @@ namespace OpenSim.Framework args["inventory_folder"] = OSD.FromUUID(InventoryFolder); args["secure_session_id"] = OSD.FromUUID(SecureSessionID); args["session_id"] = OSD.FromUUID(SessionID); + args["service_session_id"] = OSD.FromString(ServiceSessionID); args["start_pos"] = OSD.FromString(startpos.ToString()); args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); @@ -250,6 +253,8 @@ namespace OpenSim.Framework } } } + else + ChildrenCapSeeds = new Dictionary(); if (args["child"] != null) child = args["child"].AsBoolean(); @@ -267,6 +272,7 @@ namespace OpenSim.Framework SessionID = args["session_id"].AsUUID(); if (args["service_session_id"] != null) ServiceSessionID = args["service_session_id"].AsString(); + if (args["start_pos"] != null) Vector3.TryParse(args["start_pos"].AsString(), out startpos); -- cgit v1.1