aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJonathan Freedman2010-10-30 14:10:13 -0400
committerJonathan Freedman2010-10-30 14:10:13 -0400
commite371d3208cdda87f8ea86adb591ed6225f0aa442 (patch)
treef481acfbafcb7134c00ff519c0c12b41e7815d02
parentMerge branch 'master' into mantis5110 (diff)
parentLogins work now, but avatars are green ugly gnomes. (diff)
downloadopensim-SC_OLD-e371d3208cdda87f8ea86adb591ed6225f0aa442.zip
opensim-SC_OLD-e371d3208cdda87f8ea86adb591ed6225f0aa442.tar.gz
opensim-SC_OLD-e371d3208cdda87f8ea86adb591ed6225f0aa442.tar.bz2
opensim-SC_OLD-e371d3208cdda87f8ea86adb591ed6225f0aa442.tar.xz
Merge branch 'master' into mantis5110
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs18
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs5
-rw-r--r--OpenSim/Framework/AgentCircuitData.cs53
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs248
-rw-r--r--OpenSim/Framework/AvatarWearable.cs157
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs10
-rw-r--r--OpenSim/Framework/Servers/VersionInfo.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs21
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs15
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs22
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs10
-rw-r--r--OpenSim/Services/AvatarService/AvatarService.cs11
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs53
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs52
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs149
-rw-r--r--bin/OpenSimDefaults.ini3
-rw-r--r--bin/Robust.HG.ini.example4
-rw-r--r--bin/config-include/StandaloneCommon.ini.example4
19 files changed, 349 insertions, 490 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 1829c8d..72ac303 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -1510,11 +1510,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1510 1510
1511 for (int i=0; i<wearables.Length; i++) 1511 for (int i=0; i<wearables.Length; i++)
1512 { 1512 {
1513 if (inventoryMap.ContainsKey(wearables[i].ItemID)) 1513 if (inventoryMap.ContainsKey(wearables[i][0].ItemID))
1514 { 1514 {
1515 AvatarWearable wearable = new AvatarWearable(); 1515 AvatarWearable wearable = new AvatarWearable();
1516 wearable.AssetID = wearables[i].AssetID; 1516 wearable.Wear(inventoryMap[wearables[i][0].ItemID],
1517 wearable.ItemID = inventoryMap[wearables[i].ItemID]; 1517 wearables[i][0].AssetID);
1518 avatarAppearance.SetWearable(i, wearable); 1518 avatarAppearance.SetWearable(i, wearable);
1519 } 1519 }
1520 } 1520 }
@@ -1568,10 +1568,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1568 for (int i=0; i<wearables.Length; i++) 1568 for (int i=0; i<wearables.Length; i++)
1569 { 1569 {
1570 wearable = wearables[i]; 1570 wearable = wearables[i];
1571 if (wearable.ItemID != UUID.Zero) 1571 if (wearable[0].ItemID != UUID.Zero)
1572 { 1572 {
1573 // Get inventory item and copy it 1573 // Get inventory item and copy it
1574 InventoryItemBase item = new InventoryItemBase(wearable.ItemID, source); 1574 InventoryItemBase item = new InventoryItemBase(wearable[0].ItemID, source);
1575 item = inventoryService.GetItem(item); 1575 item = inventoryService.GetItem(item);
1576 1576
1577 if (item != null) 1577 if (item != null)
@@ -1602,13 +1602,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1602 1602
1603 // Wear item 1603 // Wear item
1604 AvatarWearable newWearable = new AvatarWearable(); 1604 AvatarWearable newWearable = new AvatarWearable();
1605 newWearable.AssetID = wearable.AssetID; 1605 newWearable.Wear(destinationItem.ID, wearable[0].AssetID);
1606 newWearable.ItemID = destinationItem.ID;
1607 avatarAppearance.SetWearable(i, newWearable); 1606 avatarAppearance.SetWearable(i, newWearable);
1608 } 1607 }
1609 else 1608 else
1610 { 1609 {
1611 m_log.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}", wearable.ItemID, destinationFolder.ID); 1610 m_log.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}", wearable[0].ItemID, destinationFolder.ID);
1612 } 1611 }
1613 } 1612 }
1614 } 1613 }
@@ -2057,8 +2056,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2057 { 2056 {
2058 if (select && (GetStringAttribute(item, "wear", "false") == "true")) 2057 if (select && (GetStringAttribute(item, "wear", "false") == "true"))
2059 { 2058 {
2060 avatarAppearance.Wearables[inventoryItem.Flags].ItemID = inventoryItem.ID; 2059 avatarAppearance.Wearables[inventoryItem.Flags].Wear(inventoryItem.ID, inventoryItem.AssetID);
2061 avatarAppearance.Wearables[inventoryItem.Flags].AssetID = inventoryItem.AssetID;
2062 } 2060 }
2063 } 2061 }
2064 catch (Exception e) 2062 catch (Exception e)
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs
index 3f6d4d6..019ca73 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs
@@ -499,6 +499,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
499 indata = true; 499 indata = true;
500 } 500 }
501 break; 501 break;
502/*
502 case "Body" : 503 case "Body" :
503 if (xml.MoveToAttribute("Item")) 504 if (xml.MoveToAttribute("Item"))
504 { 505 {
@@ -655,6 +656,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
655 indata = true; 656 indata = true;
656 } 657 }
657 break; 658 break;
659*/
658 case "Attachment" : 660 case "Attachment" :
659 { 661 {
660 662
@@ -749,6 +751,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
749 rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString()); 751 rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString());
750 rdata.writer.WriteAttributeString("Serial", rdata.userAppearance.Serial.ToString()); 752 rdata.writer.WriteAttributeString("Serial", rdata.userAppearance.Serial.ToString());
751 753
754/*
752 FormatPart(rdata, "Body", rdata.userAppearance.BodyItem, rdata.userAppearance.BodyAsset); 755 FormatPart(rdata, "Body", rdata.userAppearance.BodyItem, rdata.userAppearance.BodyAsset);
753 FormatPart(rdata, "Skin", rdata.userAppearance.SkinItem, rdata.userAppearance.SkinAsset); 756 FormatPart(rdata, "Skin", rdata.userAppearance.SkinItem, rdata.userAppearance.SkinAsset);
754 FormatPart(rdata, "Hair", rdata.userAppearance.HairItem, rdata.userAppearance.HairAsset); 757 FormatPart(rdata, "Hair", rdata.userAppearance.HairItem, rdata.userAppearance.HairAsset);
@@ -765,7 +768,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
765 768
766 FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset); 769 FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset);
767 FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset); 770 FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset);
768 771*/
769 Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId); 772 Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId);
770 773
771 rdata.writer.WriteStartElement("Attachments"); 774 rdata.writer.WriteStartElement("Attachments");
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index 640a646..7b14ac7 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -212,41 +212,10 @@ namespace OpenSim.Framework
212 args["mac"] = OSD.FromString(Mac); 212 args["mac"] = OSD.FromString(Mac);
213 args["id0"] = OSD.FromString(Id0); 213 args["id0"] = OSD.FromString(Id0);
214 214
215 // Eventually this code should be deprecated, use full appearance
216 // packing in packed_appearance
217 if (Appearance != null) 215 if (Appearance != null)
218 { 216 {
219 args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); 217 args["appearance_serial"] = OSD.FromInteger(Appearance.Serial);
220 218
221 //System.Console.WriteLine("XXX Before packing Wearables");
222 if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
223 {
224 OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2);
225 foreach (AvatarWearable awear in Appearance.Wearables)
226 {
227 wears.Add(OSD.FromUUID(awear.ItemID));
228 wears.Add(OSD.FromUUID(awear.AssetID));
229 //System.Console.WriteLine("XXX ItemID=" + awear.ItemID + " assetID=" + awear.AssetID);
230 }
231 args["wearables"] = wears;
232 }
233
234 //System.Console.WriteLine("XXX Before packing Attachments");
235 List<AvatarAttachment> attachments = Appearance.GetAttachments();
236 if ((attachments != null) && (attachments.Count > 0))
237 {
238 OSDArray attachs = new OSDArray(attachments.Count);
239 foreach (AvatarAttachment attach in attachments)
240 {
241 attachs.Add(attach.Pack());
242 //System.Console.WriteLine("XXX att.pt=" + kvp.Key + "; itemID=" + kvp.Value[0] + "; assetID=" + kvp.Value[1]);
243 }
244 args["attachments"] = attachs;
245 }
246 }
247
248 if (Appearance != null)
249 {
250 OSDMap appmap = Appearance.Pack(); 219 OSDMap appmap = Appearance.Pack();
251 args["packed_appearance"] = appmap; 220 args["packed_appearance"] = appmap;
252 } 221 }
@@ -346,28 +315,6 @@ namespace OpenSim.Framework
346 if (args["appearance_serial"] != null) 315 if (args["appearance_serial"] != null)
347 Appearance.Serial = args["appearance_serial"].AsInteger(); 316 Appearance.Serial = args["appearance_serial"].AsInteger();
348 317
349 if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
350 {
351 OSDArray wears = (OSDArray)(args["wearables"]);
352 for (int i = 0; i < wears.Count / 2; i++)
353 {
354 AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID());
355 Appearance.SetWearable(i,awear);
356 }
357 }
358
359 if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array)
360 {
361 OSDArray attachs = (OSDArray)(args["attachments"]);
362 foreach (OSD o in attachs)
363 {
364 if (o.Type == OSDType.Map)
365 {
366 Appearance.AppendAttachment(new AvatarAttachment((OSDMap)o));
367 }
368 }
369 }
370
371 if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map)) 318 if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
372 { 319 {
373 Appearance.Unpack((OSDMap)args["packed_appearance"]); 320 Appearance.Unpack((OSDMap)args["packed_appearance"]);
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 9494410..1e003f7 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -35,104 +35,6 @@ using log4net;
35 35
36namespace OpenSim.Framework 36namespace OpenSim.Framework
37{ 37{
38 // A special dictionary for avatar appearance
39 public struct LayerItem
40 {
41 public UUID ItemID;
42 public UUID AssetID;
43
44 public LayerItem(UUID itemID, UUID assetID)
45 {
46 ItemID = itemID;
47 AssetID = assetID;
48 }
49 }
50
51 public class Layer
52 {
53 protected int m_layerType;
54 protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
55 protected List<UUID> m_ids = new List<UUID>();
56
57 public Layer(int type)
58 {
59 m_layerType = type;
60 }
61
62 public int LayerType
63 {
64 get { return m_layerType; }
65 }
66
67 public int Count
68 {
69 get { return m_ids.Count; }
70 }
71
72 public void Add(UUID itemID, UUID assetID)
73 {
74 if (m_items.ContainsKey(itemID))
75 return;
76 if (m_ids.Count >= 5)
77 return;
78
79 m_ids.Add(itemID);
80 m_items[itemID] = assetID;
81 }
82
83 public void Wear(UUID itemID, UUID assetID)
84 {
85 Clear();
86 Add(itemID, assetID);
87 }
88
89 public void Clear()
90 {
91 m_ids.Clear();
92 m_items.Clear();
93 }
94
95 public void RemoveItem(UUID itemID)
96 {
97 if (m_items.ContainsKey(itemID))
98 {
99 m_ids.Remove(itemID);
100 m_items.Remove(itemID);
101 }
102 }
103
104 public void RemoveAsset(UUID assetID)
105 {
106 UUID itemID = UUID.Zero;
107
108 foreach (KeyValuePair<UUID, UUID> kvp in m_items)
109 {
110 if (kvp.Value == assetID)
111 {
112 itemID = kvp.Key;
113 break;
114 }
115 }
116
117 if (itemID != UUID.Zero)
118 {
119 m_ids.Remove(itemID);
120 m_items.Remove(itemID);
121 }
122 }
123
124 public LayerItem this [int idx]
125 {
126 get
127 {
128 if (idx >= m_ids.Count || idx < 0)
129 return new LayerItem(UUID.Zero, UUID.Zero);
130
131 return new LayerItem(m_ids[idx], m_items[m_ids[idx]]);
132 }
133 }
134 }
135
136 /// <summary> 38 /// <summary>
137 /// Contains the Avatar's Appearance and methods to manipulate the appearance. 39 /// Contains the Avatar's Appearance and methods to manipulate the appearance.
138 /// </summary> 40 /// </summary>
@@ -184,136 +86,6 @@ namespace OpenSim.Framework
184 set { m_wearables = value; } 86 set { m_wearables = value; }
185 } 87 }
186 88
187 public virtual UUID BodyItem {
188 get { return m_wearables[AvatarWearable.BODY].ItemID; }
189 set { m_wearables[AvatarWearable.BODY].ItemID = value; }
190 }
191
192 public virtual UUID BodyAsset {
193 get { return m_wearables[AvatarWearable.BODY].AssetID; }
194 set { m_wearables[AvatarWearable.BODY].AssetID = value; }
195 }
196
197 public virtual UUID SkinItem {
198 get { return m_wearables[AvatarWearable.SKIN].ItemID; }
199 set { m_wearables[AvatarWearable.SKIN].ItemID = value; }
200 }
201
202 public virtual UUID SkinAsset {
203 get { return m_wearables[AvatarWearable.SKIN].AssetID; }
204 set { m_wearables[AvatarWearable.SKIN].AssetID = value; }
205 }
206
207 public virtual UUID HairItem {
208 get { return m_wearables[AvatarWearable.HAIR].ItemID; }
209 set { m_wearables[AvatarWearable.HAIR].ItemID = value; }
210 }
211
212 public virtual UUID HairAsset {
213 get { return m_wearables[AvatarWearable.HAIR].AssetID; }
214 set { m_wearables[AvatarWearable.HAIR].AssetID = value; }
215 }
216
217 public virtual UUID EyesItem {
218 get { return m_wearables[AvatarWearable.EYES].ItemID; }
219 set { m_wearables[AvatarWearable.EYES].ItemID = value; }
220 }
221
222 public virtual UUID EyesAsset {
223 get { return m_wearables[AvatarWearable.EYES].AssetID; }
224 set { m_wearables[AvatarWearable.EYES].AssetID = value; }
225 }
226
227 public virtual UUID ShirtItem {
228 get { return m_wearables[AvatarWearable.SHIRT].ItemID; }
229 set { m_wearables[AvatarWearable.SHIRT].ItemID = value; }
230 }
231
232 public virtual UUID ShirtAsset {
233 get { return m_wearables[AvatarWearable.SHIRT].AssetID; }
234 set { m_wearables[AvatarWearable.SHIRT].AssetID = value; }
235 }
236
237 public virtual UUID PantsItem {
238 get { return m_wearables[AvatarWearable.PANTS].ItemID; }
239 set { m_wearables[AvatarWearable.PANTS].ItemID = value; }
240 }
241
242 public virtual UUID PantsAsset {
243 get { return m_wearables[AvatarWearable.PANTS].AssetID; }
244 set { m_wearables[AvatarWearable.PANTS].AssetID = value; }
245 }
246
247 public virtual UUID ShoesItem {
248 get { return m_wearables[AvatarWearable.SHOES].ItemID; }
249 set { m_wearables[AvatarWearable.SHOES].ItemID = value; }
250 }
251
252 public virtual UUID ShoesAsset {
253 get { return m_wearables[AvatarWearable.SHOES].AssetID; }
254 set { m_wearables[AvatarWearable.SHOES].AssetID = value; }
255 }
256
257 public virtual UUID SocksItem {
258 get { return m_wearables[AvatarWearable.SOCKS].ItemID; }
259 set { m_wearables[AvatarWearable.SOCKS].ItemID = value; }
260 }
261
262 public virtual UUID SocksAsset {
263 get { return m_wearables[AvatarWearable.SOCKS].AssetID; }
264 set { m_wearables[AvatarWearable.SOCKS].AssetID = value; }
265 }
266
267 public virtual UUID JacketItem {
268 get { return m_wearables[AvatarWearable.JACKET].ItemID; }
269 set { m_wearables[AvatarWearable.JACKET].ItemID = value; }
270 }
271
272 public virtual UUID JacketAsset {
273 get { return m_wearables[AvatarWearable.JACKET].AssetID; }
274 set { m_wearables[AvatarWearable.JACKET].AssetID = value; }
275 }
276
277 public virtual UUID GlovesItem {
278 get { return m_wearables[AvatarWearable.GLOVES].ItemID; }
279 set { m_wearables[AvatarWearable.GLOVES].ItemID = value; }
280 }
281
282 public virtual UUID GlovesAsset {
283 get { return m_wearables[AvatarWearable.GLOVES].AssetID; }
284 set { m_wearables[AvatarWearable.GLOVES].AssetID = value; }
285 }
286
287 public virtual UUID UnderShirtItem {
288 get { return m_wearables[AvatarWearable.UNDERSHIRT].ItemID; }
289 set { m_wearables[AvatarWearable.UNDERSHIRT].ItemID = value; }
290 }
291
292 public virtual UUID UnderShirtAsset {
293 get { return m_wearables[AvatarWearable.UNDERSHIRT].AssetID; }
294 set { m_wearables[AvatarWearable.UNDERSHIRT].AssetID = value; }
295 }
296
297 public virtual UUID UnderPantsItem {
298 get { return m_wearables[AvatarWearable.UNDERPANTS].ItemID; }
299 set { m_wearables[AvatarWearable.UNDERPANTS].ItemID = value; }
300 }
301
302 public virtual UUID UnderPantsAsset {
303 get { return m_wearables[AvatarWearable.UNDERPANTS].AssetID; }
304 set { m_wearables[AvatarWearable.UNDERPANTS].AssetID = value; }
305 }
306
307 public virtual UUID SkirtItem {
308 get { return m_wearables[AvatarWearable.SKIRT].ItemID; }
309 set { m_wearables[AvatarWearable.SKIRT].ItemID = value; }
310 }
311
312 public virtual UUID SkirtAsset {
313 get { return m_wearables[AvatarWearable.SKIRT].AssetID; }
314 set { m_wearables[AvatarWearable.SKIRT].AssetID = value; }
315 }
316
317 public virtual float AvatarHeight 89 public virtual float AvatarHeight
318 { 90 {
319 get { return m_avatarHeight; } 91 get { return m_avatarHeight; }
@@ -339,6 +111,10 @@ namespace OpenSim.Framework
339 SetDefaultParams(); 111 SetDefaultParams();
340 SetHeight(); 112 SetHeight();
341 113
114 m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
115 for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
116 m_wearables[i] = new AvatarWearable();
117
342 m_attachments = new Dictionary<int, List<AvatarAttachment>>(); 118 m_attachments = new Dictionary<int, List<AvatarAttachment>>();
343 } 119 }
344 120
@@ -400,10 +176,11 @@ namespace OpenSim.Framework
400 m_serial = appearance.Serial; 176 m_serial = appearance.Serial;
401 m_owner = appearance.Owner; 177 m_owner = appearance.Owner;
402 178
403 m_wearables = null; 179 m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
180 for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
181 m_wearables[i] = new AvatarWearable();
404 if (appearance.Wearables != null) 182 if (appearance.Wearables != null)
405 { 183 {
406 m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; //should be 13 of these
407 for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) 184 for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
408 SetWearable(i,appearance.Wearables[i]); 185 SetWearable(i,appearance.Wearables[i]);
409 } 186 }
@@ -547,7 +324,9 @@ namespace OpenSim.Framework
547// DEBUG ON 324// DEBUG ON
548// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); 325// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID);
549// DEBUG OFF 326// DEBUG OFF
550 m_wearables[wearableId] = new AvatarWearable(wearable.ItemID,wearable.AssetID); 327 m_wearables[wearableId].Clear();
328 for (int i = 0 ; i < wearable.Count ; i++)
329 m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
551 } 330 }
552 331
553 332
@@ -563,7 +342,10 @@ namespace OpenSim.Framework
563 s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID); 342 s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID);
564 343
565 foreach (AvatarWearable awear in m_wearables) 344 foreach (AvatarWearable awear in m_wearables)
566 s += String.Format("Wearable: item={0}, asset={1}\n",awear.ItemID,awear.AssetID); 345 {
346 for ( int i = 0 ; i < awear.Count ; i++ )
347 s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID);
348 }
567 349
568 s += "Visual Params: "; 350 s += "Visual Params: ";
569 for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) 351 for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++)
@@ -733,7 +515,7 @@ namespace OpenSim.Framework
733 { 515 {
734 OSDArray wears = (OSDArray)(data["wearables"]); 516 OSDArray wears = (OSDArray)(data["wearables"]);
735 for (int i = 0; i < wears.Count; i++) 517 for (int i = 0; i < wears.Count; i++)
736 m_wearables[i] = new AvatarWearable((OSDMap)wears[i]); 518 m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
737 } 519 }
738 else 520 else
739 { 521 {
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs
index 87098bf..0a02dcf 100644
--- a/OpenSim/Framework/AvatarWearable.cs
+++ b/OpenSim/Framework/AvatarWearable.cs
@@ -26,11 +26,24 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
29using OpenMetaverse; 30using OpenMetaverse;
30using OpenMetaverse.StructuredData; 31using OpenMetaverse.StructuredData;
31 32
32namespace OpenSim.Framework 33namespace OpenSim.Framework
33{ 34{
35 public struct WearableItem
36 {
37 public UUID ItemID;
38 public UUID AssetID;
39
40 public WearableItem(UUID itemID, UUID assetID)
41 {
42 ItemID = itemID;
43 AssetID = assetID;
44 }
45 }
46
34 public class AvatarWearable 47 public class AvatarWearable
35 { 48 {
36 // these are guessed at by the list here - 49 // these are guessed at by the list here -
@@ -49,8 +62,10 @@ namespace OpenSim.Framework
49 public static readonly int UNDERSHIRT = 10; 62 public static readonly int UNDERSHIRT = 10;
50 public static readonly int UNDERPANTS = 11; 63 public static readonly int UNDERPANTS = 11;
51 public static readonly int SKIRT = 12; 64 public static readonly int SKIRT = 12;
65 public static readonly int ALPHA = 13;
66 public static readonly int TATTOO = 14;
52 67
53 public static readonly int MAX_WEARABLES = 13; 68 public static readonly int MAX_WEARABLES = 15;
54 69
55 public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); 70 public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
56 public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73"); 71 public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
@@ -67,68 +82,158 @@ namespace OpenSim.Framework
67 public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111"); 82 public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
68 public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120"); 83 public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
69 84
70 public UUID AssetID; 85 public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8");
71 public UUID ItemID; 86 public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594");
87
88 public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
89 public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
90
91
92 protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
93 protected List<UUID> m_ids = new List<UUID>();
72 94
73 public AvatarWearable() 95 public AvatarWearable()
74 { 96 {
75 } 97 }
76 98
77 public AvatarWearable(UUID itemId, UUID assetId) 99 public AvatarWearable(UUID itemID, UUID assetID)
78 { 100 {
79 AssetID = assetId; 101 Wear(itemID, assetID);
80 ItemID = itemId;
81 } 102 }
82 103
83 public AvatarWearable(OSDMap args) 104 public AvatarWearable(OSDArray args)
84 { 105 {
85 Unpack(args); 106 Unpack(args);
86 } 107 }
87 108
88 public OSDMap Pack() 109 public OSD Pack()
110 {
111 OSDArray wearlist = new OSDArray();
112
113 foreach (UUID id in m_ids)
114 {
115 OSDMap weardata = new OSDMap();
116 weardata["item"] = OSD.FromUUID(id);
117 weardata["asset"] = OSD.FromUUID(m_items[id]);
118 wearlist.Add(weardata);
119 }
120
121 return wearlist;
122 }
123
124 public void Unpack(OSDArray args)
125 {
126 Clear();
127
128 foreach (OSDMap weardata in args)
129 {
130 Add(weardata["item"].AsUUID(), weardata["asset"].AsUUID());
131 }
132 }
133
134 public int Count
135 {
136 get { return m_ids.Count; }
137 }
138
139 public void Add(UUID itemID, UUID assetID)
140 {
141 if (itemID == UUID.Zero)
142 return;
143 if (m_items.ContainsKey(itemID))
144 {
145 m_items[itemID] = assetID;
146 return;
147 }
148 if (m_ids.Count >= 5)
149 return;
150
151 m_ids.Add(itemID);
152 m_items[itemID] = assetID;
153 }
154
155 public void Wear(UUID itemID, UUID assetID)
89 { 156 {
90 OSDMap weardata = new OSDMap(); 157 Clear();
91 weardata["item"] = OSD.FromUUID(ItemID); 158 Add(itemID, assetID);
92 weardata["asset"] = OSD.FromUUID(AssetID); 159 }
93 160
94 return weardata; 161 public void Clear()
162 {
163 m_ids.Clear();
164 m_items.Clear();
95 } 165 }
96 166
97 public void Unpack(OSDMap args) 167 public void RemoveItem(UUID itemID)
98 { 168 {
99 ItemID = (args["item"] != null) ? args["item"].AsUUID() : UUID.Zero; 169 if (m_items.ContainsKey(itemID))
100 AssetID = (args["asset"] != null) ? args["asset"].AsUUID() : UUID.Zero; 170 {
171 m_ids.Remove(itemID);
172 m_items.Remove(itemID);
173 }
174 }
175
176 public void RemoveAsset(UUID assetID)
177 {
178 UUID itemID = UUID.Zero;
179
180 foreach (KeyValuePair<UUID, UUID> kvp in m_items)
181 {
182 if (kvp.Value == assetID)
183 {
184 itemID = kvp.Key;
185 break;
186 }
187 }
188
189 if (itemID != UUID.Zero)
190 {
191 m_ids.Remove(itemID);
192 m_items.Remove(itemID);
193 }
194 }
195
196 public WearableItem this [int idx]
197 {
198 get
199 {
200 if (idx >= m_ids.Count || idx < 0)
201 return new WearableItem(UUID.Zero, UUID.Zero);
202
203 return new WearableItem(m_ids[idx], m_items[m_ids[idx]]);
204 }
101 } 205 }
102 206
103 public static AvatarWearable[] DefaultWearables 207 public static AvatarWearable[] DefaultWearables
104 { 208 {
105 get 209 get
106 { 210 {
107 AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 13 of these 211 AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
108 for (int i = 0; i < MAX_WEARABLES; i++) 212 for (int i = 0; i < MAX_WEARABLES; i++)
109 { 213 {
110 defaultWearables[i] = new AvatarWearable(); 214 defaultWearables[i] = new AvatarWearable();
111 } 215 }
112 216
113 // Body 217 // Body
114 defaultWearables[0].ItemID = DEFAULT_BODY_ITEM; 218 defaultWearables[BODY].Add(DEFAULT_BODY_ITEM, DEFAULT_BODY_ASSET);
115 defaultWearables[0].AssetID = DEFAULT_BODY_ASSET;
116 219
117 // Hair 220 // Hair
118 defaultWearables[2].ItemID = DEFAULT_HAIR_ITEM; 221 defaultWearables[HAIR].Add(DEFAULT_HAIR_ITEM, DEFAULT_HAIR_ASSET);
119 defaultWearables[2].AssetID = DEFAULT_HAIR_ASSET;
120 222
121 // Skin 223 // Skin
122 defaultWearables[1].ItemID = DEFAULT_SKIN_ITEM; 224 defaultWearables[SKIN].Add(DEFAULT_SKIN_ITEM, DEFAULT_SKIN_ASSET);
123 defaultWearables[1].AssetID = DEFAULT_SKIN_ASSET;
124 225
125 // Shirt 226 // Shirt
126 defaultWearables[4].ItemID = DEFAULT_SHIRT_ITEM; 227 defaultWearables[SHIRT].Add(DEFAULT_SHIRT_ITEM, DEFAULT_SHIRT_ASSET);
127 defaultWearables[4].AssetID = DEFAULT_SHIRT_ASSET;
128 228
129 // Pants 229 // Pants
130 defaultWearables[5].ItemID = DEFAULT_PANTS_ITEM; 230 defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET);
131 defaultWearables[5].AssetID = DEFAULT_PANTS_ASSET; 231
232 // Alpha
233 defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET);
234
235 // Tattoo
236 defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET);
132 237
133 return defaultWearables; 238 return defaultWearables;
134 } 239 }
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 66487f7..ddfaaed 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -414,12 +414,10 @@ namespace OpenSim.Framework
414 // We might not pass this in all cases... 414 // We might not pass this in all cases...
415 if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) 415 if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
416 { 416 {
417 OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2); 417 OSDArray wears = new OSDArray(Appearance.Wearables.Length);
418 foreach (AvatarWearable awear in Appearance.Wearables) 418 foreach (AvatarWearable awear in Appearance.Wearables)
419 { 419 wears.Add(awear.Pack());
420 wears.Add(OSD.FromUUID(awear.ItemID)); 420
421 wears.Add(OSD.FromUUID(awear.AssetID));
422 }
423 args["wearables"] = wears; 421 args["wearables"] = wears;
424 } 422 }
425 423
@@ -592,7 +590,7 @@ namespace OpenSim.Framework
592 OSDArray wears = (OSDArray)(args["wearables"]); 590 OSDArray wears = (OSDArray)(args["wearables"]);
593 for (int i = 0; i < wears.Count / 2; i++) 591 for (int i = 0; i < wears.Count / 2; i++)
594 { 592 {
595 AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID()); 593 AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
596 Appearance.SetWearable(i,awear); 594 Appearance.SetWearable(i,awear);
597 } 595 }
598 } 596 }
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index c88e0d1..c9d4c93 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -69,6 +69,6 @@ namespace OpenSim
69 /// of the code that is too old. 69 /// of the code that is too old.
70 /// 70 ///
71 /// </value> 71 /// </value>
72 public readonly static int MajorInterfaceVersion = 6; 72 public readonly static int MajorInterfaceVersion = 7;
73 } 73 }
74} 74}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 14f923d..d7458b7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3387,20 +3387,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3387 aw.AgentData.SerialNum = (uint)serial; 3387 aw.AgentData.SerialNum = (uint)serial;
3388 aw.AgentData.SessionID = m_sessionId; 3388 aw.AgentData.SessionID = m_sessionId;
3389 3389
3390 int count = 0;
3391 for (int i = 0; i < wearables.Length; i++)
3392 count += wearables[i].Count;
3393
3390 // TODO: don't create new blocks if recycling an old packet 3394 // TODO: don't create new blocks if recycling an old packet
3391 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; 3395 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count];
3392 AgentWearablesUpdatePacket.WearableDataBlock awb; 3396 AgentWearablesUpdatePacket.WearableDataBlock awb;
3397 int idx = 0;
3393 for (int i = 0; i < wearables.Length; i++) 3398 for (int i = 0; i < wearables.Length; i++)
3394 { 3399 {
3395 awb = new AgentWearablesUpdatePacket.WearableDataBlock(); 3400 for (int j = 0; j < wearables[i].Count; j++)
3396 awb.WearableType = (byte)i; 3401 {
3397 awb.AssetID = wearables[i].AssetID; 3402 awb = new AgentWearablesUpdatePacket.WearableDataBlock();
3398 awb.ItemID = wearables[i].ItemID; 3403 awb.WearableType = (byte)i;
3399 aw.WearableData[i] = awb; 3404 awb.AssetID = wearables[i][j].AssetID;
3405 awb.ItemID = wearables[i][j].ItemID;
3406 aw.WearableData[idx] = awb;
3407 idx++;
3400 3408
3401// m_log.DebugFormat( 3409// m_log.DebugFormat(
3402// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", 3410// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
3403// awb.ItemID, awb.AssetID, i, Name); 3411// awb.ItemID, awb.AssetID, i, Name);
3412 }
3404 } 3413 }
3405 3414
3406 OutPacket(aw, ThrottleOutPacketType.Task); 3415 OutPacket(aw, ThrottleOutPacketType.Task);
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 183aec0..45bede3 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -183,7 +183,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
183 IConfig config = configSource.Configs["ClientStack.LindenUDP"]; 183 IConfig config = configSource.Configs["ClientStack.LindenUDP"];
184 if (config != null) 184 if (config != null)
185 { 185 {
186 m_asyncPacketHandling = config.GetBoolean("async_packet_handling", false); 186 m_asyncPacketHandling = config.GetBoolean("async_packet_handling", true);
187 m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); 187 m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
188 sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); 188 sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0);
189 189
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index e2755c8..6cbd8bd 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -382,27 +382,22 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
382 { 382 {
383 for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) 383 for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
384 { 384 {
385 if (appearance.Wearables[i].ItemID == UUID.Zero) 385 for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ )
386 { 386 {
387 appearance.Wearables[i].AssetID = UUID.Zero; 387 InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID);
388 }
389 else
390 {
391 InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID);
392 baseItem = invService.GetItem(baseItem); 388 baseItem = invService.GetItem(baseItem);
393 389
394 if (baseItem != null) 390 if (baseItem != null)
395 { 391 {
396 appearance.Wearables[i].AssetID = baseItem.AssetID; 392 appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID);
397 } 393 }
398 else 394 else
399 { 395 {
400 m_log.ErrorFormat( 396 m_log.ErrorFormat(
401 "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", 397 "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default",
402 appearance.Wearables[i].ItemID, (WearableType)i); 398 appearance.Wearables[i][j].ItemID, (WearableType)i);
403 399
404 appearance.Wearables[i].ItemID = UUID.Zero; 400 appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID);
405 appearance.Wearables[i].AssetID = UUID.Zero;
406 } 401 }
407 } 402 }
408 } 403 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 9080e1c..d81703a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -173,28 +173,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
173 173
174 InventoryCollection contents 174 InventoryCollection contents
175 = m_scene.InventoryService.GetFolderContent(inventoryFolder.Owner, inventoryFolder.ID); 175 = m_scene.InventoryService.GetFolderContent(inventoryFolder.Owner, inventoryFolder.ID);
176 //List<InventoryFolderImpl> childFolders = inventoryFolder.RequestListOfFolderImpls();
177 //List<InventoryItemBase> items = inventoryFolder.RequestListOfItems();
178
179 /*
180 Dictionary identicalFolderNames = new Dictionary<string, int>();
181
182 foreach (InventoryFolderImpl folder in inventories)
183 {
184 if (!identicalFolderNames.ContainsKey(folder.Name))
185 identicalFolderNames[folder.Name] = 0;
186 else
187 identicalFolderNames[folder.Name] = identicalFolderNames[folder.Name]++;
188
189 int folderNameNumber = identicalFolderName[folder.Name];
190
191 SaveInvDir(
192 folder,
193 string.Format(
194 "{0}{1}{2}/",
195 path, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, folderNameNumber));
196 }
197 */
198 176
199 foreach (InventoryFolderBase childFolder in contents.Folders) 177 foreach (InventoryFolderBase childFolder in contents.Folders)
200 { 178 {
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 925af3f..283182c 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
193 GridRegion finalDestination = GetFinalDestination(reg); 193 GridRegion finalDestination = GetFinalDestination(reg);
194 if (finalDestination == null) 194 if (finalDestination == null)
195 { 195 {
196 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent."); 196 m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent.");
197 sp.ControllingClient.SendTeleportFailed("Problem at destination"); 197 sp.ControllingClient.SendTeleportFailed("Problem at destination");
198 return; 198 return;
199 } 199 }
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
240 } 240 }
241 catch (Exception e) 241 catch (Exception e)
242 { 242 {
243 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Exception on teleport: {0}\n{1}", e.Message, e.StackTrace); 243 m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Exception on teleport: {0}\n{1}", e.Message, e.StackTrace);
244 sp.ControllingClient.SendTeleportFailed("Internal error"); 244 sp.ControllingClient.SendTeleportFailed("Internal error");
245 } 245 }
246 } 246 }
@@ -398,7 +398,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
398 m_log.DebugFormat( 398 m_log.DebugFormat(
399 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, sp.UUID); 399 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, sp.UUID);
400 400
401
402 if (eq != null) 401 if (eq != null)
403 { 402 {
404 eq.TeleportFinishEvent(destinationHandle, 13, endPoint, 403 eq.TeleportFinishEvent(destinationHandle, 13, endPoint,
@@ -558,6 +557,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
558 client.SendTeleportFailed("Your home region could not be found."); 557 client.SendTeleportFailed("Your home region could not be found.");
559 return; 558 return;
560 } 559 }
560
561 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})", 561 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})",
562 regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize); 562 regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize);
563 563
@@ -1162,7 +1162,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1162 Utils.LongToUInts(reg.RegionHandle, out x, out y); 1162 Utils.LongToUInts(reg.RegionHandle, out x, out y);
1163 x = x / Constants.RegionSize; 1163 x = x / Constants.RegionSize;
1164 y = y / Constants.RegionSize; 1164 y = y / Constants.RegionSize;
1165 m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); 1165 m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")");
1166 1166
1167 string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); 1167 string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath);
1168 1168
@@ -1197,7 +1197,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1197 // TODO: make Event Queue disablable! 1197 // TODO: make Event Queue disablable!
1198 } 1198 }
1199 1199
1200 m_log.Info("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString()); 1200 m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString());
1201 1201
1202 } 1202 }
1203 1203
diff --git a/OpenSim/Services/AvatarService/AvatarService.cs b/OpenSim/Services/AvatarService/AvatarService.cs
index a8ad413..53ca7c8 100644
--- a/OpenSim/Services/AvatarService/AvatarService.cs
+++ b/OpenSim/Services/AvatarService/AvatarService.cs
@@ -51,8 +51,6 @@ namespace OpenSim.Services.AvatarService
51 m_log.Debug("[AVATAR SERVICE]: Starting avatar service"); 51 m_log.Debug("[AVATAR SERVICE]: Starting avatar service");
52 } 52 }
53 53
54 // Get|SetAppearance should preserve existing semantics
55 // until AvatarData can be removed completely
56 public AvatarAppearance GetAppearance(UUID principalID) 54 public AvatarAppearance GetAppearance(UUID principalID)
57 { 55 {
58 AvatarData avatar = GetAvatar(principalID); 56 AvatarData avatar = GetAvatar(principalID);
@@ -68,12 +66,15 @@ namespace OpenSim.Services.AvatarService
68 public AvatarData GetAvatar(UUID principalID) 66 public AvatarData GetAvatar(UUID principalID)
69 { 67 {
70 AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString()); 68 AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString());
71 if (av.Length == 0)
72 return null;
73
74 AvatarData ret = new AvatarData(); 69 AvatarData ret = new AvatarData();
75 ret.Data = new Dictionary<string,string>(); 70 ret.Data = new Dictionary<string,string>();
76 71
72 if (av.Length == 0)
73 {
74 ret.AvatarType = 1; // SL avatar
75 return ret;
76 }
77
77 foreach (AvatarBaseData b in av) 78 foreach (AvatarBaseData b in av)
78 { 79 {
79 if (b.Data["Name"] == "AvatarType") 80 if (b.Data["Name"] == "AvatarType")
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
index ea9b4b4..7a28c2b 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
@@ -265,32 +265,33 @@ namespace OpenSim.Services.Connectors.SimianGrid
265 265
266 map["Height"] = OSD.FromReal(appearance.AvatarHeight); 266 map["Height"] = OSD.FromReal(appearance.AvatarHeight);
267 267
268 map["ShapeItem"] = OSD.FromUUID(appearance.BodyItem); 268 map["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString();
269 map["ShapeAsset"] = OSD.FromUUID(appearance.BodyAsset); 269 map["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString();
270 map["SkinItem"] = OSD.FromUUID(appearance.SkinItem); 270 map["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString();
271 map["SkinAsset"] = OSD.FromUUID(appearance.SkinAsset); 271 map["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString();
272 map["HairItem"] = OSD.FromUUID(appearance.HairItem); 272 map["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString();
273 map["HairAsset"] = OSD.FromUUID(appearance.HairAsset); 273 map["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString();
274 map["EyesItem"] = OSD.FromUUID(appearance.EyesItem); 274 map["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString();
275 map["EyesAsset"] = OSD.FromUUID(appearance.EyesAsset); 275 map["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString();
276 map["ShirtItem"] = OSD.FromUUID(appearance.ShirtItem); 276 map["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString();
277 map["ShirtAsset"] = OSD.FromUUID(appearance.ShirtAsset); 277 map["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString();
278 map["PantsItem"] = OSD.FromUUID(appearance.PantsItem); 278 map["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString();
279 map["PantsAsset"] = OSD.FromUUID(appearance.PantsAsset); 279 map["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString();
280 map["ShoesItem"] = OSD.FromUUID(appearance.ShoesItem); 280 map["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString();
281 map["ShoesAsset"] = OSD.FromUUID(appearance.ShoesAsset); 281 map["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString();
282 map["SocksItem"] = OSD.FromUUID(appearance.SocksItem); 282 map["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString();
283 map["SocksAsset"] = OSD.FromUUID(appearance.SocksAsset); 283 map["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString();
284 map["JacketItem"] = OSD.FromUUID(appearance.JacketItem); 284 map["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString();
285 map["JacketAsset"] = OSD.FromUUID(appearance.JacketAsset); 285 map["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString();
286 map["GlovesItem"] = OSD.FromUUID(appearance.GlovesItem); 286 map["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString();
287 map["GlovesAsset"] = OSD.FromUUID(appearance.GlovesAsset); 287 map["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString();
288 map["UndershirtItem"] = OSD.FromUUID(appearance.UnderShirtItem); 288 map["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString();
289 map["UndershirtAsset"] = OSD.FromUUID(appearance.UnderShirtAsset); 289 map["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString();
290 map["UnderpantsItem"] = OSD.FromUUID(appearance.UnderPantsItem); 290 map["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString();
291 map["UnderpantsAsset"] = OSD.FromUUID(appearance.UnderPantsAsset); 291 map["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString();
292 map["SkirtItem"] = OSD.FromUUID(appearance.SkirtItem); 292 map["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString();
293 map["SkirtAsset"] = OSD.FromUUID(appearance.SkirtAsset); 293 map["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString();
294
294 295
295 OSDMap items = new OSDMap(); 296 OSDMap items = new OSDMap();
296 foreach (KeyValuePair<string, string> kvp in avatar.Data) 297 foreach (KeyValuePair<string, string> kvp in avatar.Data)
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index c4284eb..7936cb8 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -139,13 +139,13 @@ namespace OpenSim.Services.Connectors.Simulation
139 AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send 139 AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send
140 os = AgentCreateRequest.GetRequestStream(); 140 os = AgentCreateRequest.GetRequestStream();
141 os.Write(buffer, 0, strBuffer.Length); //Send it 141 os.Write(buffer, 0, strBuffer.Length); //Send it
142 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}", 142 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
143 uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY); 143 uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY);
144 } 144 }
145 //catch (WebException ex) 145 //catch (WebException ex)
146 catch 146 catch
147 { 147 {
148 //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message); 148 //m_log.ErrorFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message);
149 reason = "cannot contact remote region"; 149 reason = "cannot contact remote region";
150 return false; 150 return false;
151 } 151 }
@@ -172,19 +172,19 @@ namespace OpenSim.Services.Connectors.Simulation
172 webResponse = AgentCreateRequest.GetResponse(); 172 webResponse = AgentCreateRequest.GetResponse();
173 if (webResponse == null) 173 if (webResponse == null)
174 { 174 {
175 m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post"); 175 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post");
176 } 176 }
177 else 177 else
178 { 178 {
179 179
180 sr = new StreamReader(webResponse.GetResponseStream()); 180 sr = new StreamReader(webResponse.GetResponseStream());
181 response = sr.ReadToEnd().Trim(); 181 response = sr.ReadToEnd().Trim();
182 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response); 182 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
183 } 183 }
184 } 184 }
185 catch (WebException ex) 185 catch (WebException ex)
186 { 186 {
187 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message); 187 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message);
188 reason = "Destination did not reply"; 188 reason = "Destination did not reply";
189 return string.Empty; 189 return string.Empty;
190 } 190 }
@@ -212,7 +212,7 @@ namespace OpenSim.Services.Connectors.Simulation
212 } 212 }
213 catch (NullReferenceException e) 213 catch (NullReferenceException e)
214 { 214 {
215 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message); 215 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
216 216
217 // check for old style response 217 // check for old style response
218 if (response.ToLower().StartsWith("true")) 218 if (response.ToLower().StartsWith("true"))
@@ -232,7 +232,7 @@ namespace OpenSim.Services.Connectors.Simulation
232 } 232 }
233 catch (Exception e) 233 catch (Exception e)
234 { 234 {
235 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); 235 m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
236 return null; 236 return null;
237 } 237 }
238 // Add the input arguments 238 // Add the input arguments
@@ -258,6 +258,7 @@ namespace OpenSim.Services.Connectors.Simulation
258 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData) 258 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
259 { 259 {
260 // Eventually, we want to use a caps url instead of the agentID 260 // Eventually, we want to use a caps url instead of the agentID
261
261 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/"; 262 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
262 263
263 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri); 264 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
@@ -274,7 +275,7 @@ namespace OpenSim.Services.Connectors.Simulation
274 } 275 }
275 catch (Exception e) 276 catch (Exception e)
276 { 277 {
277 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message); 278 m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message);
278 } 279 }
279 // Add the input arguments 280 // Add the input arguments
280 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); 281 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
@@ -303,12 +304,12 @@ namespace OpenSim.Services.Connectors.Simulation
303 ChildUpdateRequest.ContentLength = buffer.Length; //Count bytes to send 304 ChildUpdateRequest.ContentLength = buffer.Length; //Count bytes to send
304 os = ChildUpdateRequest.GetRequestStream(); 305 os = ChildUpdateRequest.GetRequestStream();
305 os.Write(buffer, 0, strBuffer.Length); //Send it 306 os.Write(buffer, 0, strBuffer.Length); //Send it
306 //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri); 307 //m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri);
307 } 308 }
308 catch (WebException ex) 309 catch (WebException ex)
309 //catch 310 //catch
310 { 311 {
311 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message); 312 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message);
312 313
313 return false; 314 return false;
314 } 315 }
@@ -319,7 +320,7 @@ namespace OpenSim.Services.Connectors.Simulation
319 } 320 }
320 321
321 // Let's wait for the response 322 // Let's wait for the response
322 //m_log.Info("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate"); 323 //m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate");
323 324
324 WebResponse webResponse = null; 325 WebResponse webResponse = null;
325 StreamReader sr = null; 326 StreamReader sr = null;
@@ -328,19 +329,19 @@ namespace OpenSim.Services.Connectors.Simulation
328 webResponse = ChildUpdateRequest.GetResponse(); 329 webResponse = ChildUpdateRequest.GetResponse();
329 if (webResponse == null) 330 if (webResponse == null)
330 { 331 {
331 m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post"); 332 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post");
332 } 333 }
333 334
334 sr = new StreamReader(webResponse.GetResponseStream()); 335 sr = new StreamReader(webResponse.GetResponseStream());
335 //reply = sr.ReadToEnd().Trim(); 336 //reply = sr.ReadToEnd().Trim();
336 sr.ReadToEnd().Trim(); 337 sr.ReadToEnd().Trim();
337 sr.Close(); 338 sr.Close();
338 //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply); 339 //m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply);
339 340
340 } 341 }
341 catch (WebException ex) 342 catch (WebException ex)
342 { 343 {
343 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message); 344 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message);
344 // ignore, really 345 // ignore, really
345 } 346 }
346 finally 347 finally
@@ -371,7 +372,7 @@ namespace OpenSim.Services.Connectors.Simulation
371 webResponse = (HttpWebResponse)request.GetResponse(); 372 webResponse = (HttpWebResponse)request.GetResponse();
372 if (webResponse == null) 373 if (webResponse == null)
373 { 374 {
374 m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get "); 375 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get ");
375 } 376 }
376 377
377 sr = new StreamReader(webResponse.GetResponseStream()); 378 sr = new StreamReader(webResponse.GetResponseStream());
@@ -381,7 +382,7 @@ namespace OpenSim.Services.Connectors.Simulation
381 } 382 }
382 catch (WebException ex) 383 catch (WebException ex)
383 { 384 {
384 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message); 385 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message);
385 // ignore, really 386 // ignore, really
386 return false; 387 return false;
387 } 388 }
@@ -420,7 +421,7 @@ namespace OpenSim.Services.Connectors.Simulation
420 WebResponse webResponse = request.GetResponse(); 421 WebResponse webResponse = request.GetResponse();
421 if (webResponse == null) 422 if (webResponse == null)
422 { 423 {
423 m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent"); 424 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent");
424 } 425 }
425 426
426 sr = new StreamReader(webResponse.GetResponseStream()); 427 sr = new StreamReader(webResponse.GetResponseStream());
@@ -432,7 +433,7 @@ namespace OpenSim.Services.Connectors.Simulation
432 } 433 }
433 catch (WebException ex) 434 catch (WebException ex)
434 { 435 {
435 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message); 436 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message);
436 return false; 437 return false;
437 } 438 }
438 finally 439 finally
@@ -448,7 +449,6 @@ namespace OpenSim.Services.Connectors.Simulation
448 { 449 {
449 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 450 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
450 451
451
452 WebRequest request = WebRequest.Create(uri); 452 WebRequest request = WebRequest.Create(uri);
453 request.Method = "DELETE"; 453 request.Method = "DELETE";
454 request.Timeout = 10000; 454 request.Timeout = 10000;
@@ -459,7 +459,7 @@ namespace OpenSim.Services.Connectors.Simulation
459 WebResponse webResponse = request.GetResponse(); 459 WebResponse webResponse = request.GetResponse();
460 if (webResponse == null) 460 if (webResponse == null)
461 { 461 {
462 m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete "); 462 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete ");
463 } 463 }
464 464
465 sr = new StreamReader(webResponse.GetResponseStream()); 465 sr = new StreamReader(webResponse.GetResponseStream());
@@ -471,7 +471,7 @@ namespace OpenSim.Services.Connectors.Simulation
471 } 471 }
472 catch (WebException ex) 472 catch (WebException ex)
473 { 473 {
474 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message); 474 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message);
475 return false; 475 return false;
476 } 476 }
477 finally 477 finally
@@ -536,11 +536,11 @@ namespace OpenSim.Services.Connectors.Simulation
536 ObjectCreateRequest.ContentLength = buffer.Length; //Count bytes to send 536 ObjectCreateRequest.ContentLength = buffer.Length; //Count bytes to send
537 os = ObjectCreateRequest.GetRequestStream(); 537 os = ObjectCreateRequest.GetRequestStream();
538 os.Write(buffer, 0, strBuffer.Length); //Send it 538 os.Write(buffer, 0, strBuffer.Length); //Send it
539 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri); 539 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri);
540 } 540 }
541 catch (WebException ex) 541 catch (WebException ex)
542 { 542 {
543 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message); 543 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message);
544 return false; 544 return false;
545 } 545 }
546 finally 546 finally
@@ -558,7 +558,7 @@ namespace OpenSim.Services.Connectors.Simulation
558 WebResponse webResponse = ObjectCreateRequest.GetResponse(); 558 WebResponse webResponse = ObjectCreateRequest.GetResponse();
559 if (webResponse == null) 559 if (webResponse == null)
560 { 560 {
561 m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post"); 561 m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post");
562 return false; 562 return false;
563 } 563 }
564 564
@@ -570,7 +570,7 @@ namespace OpenSim.Services.Connectors.Simulation
570 } 570 }
571 catch (WebException ex) 571 catch (WebException ex)
572 { 572 {
573 m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message); 573 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message);
574 return false; 574 return false;
575 } 575 }
576 finally 576 finally
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index eaa6534..186871a 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -149,33 +149,33 @@ namespace OpenSim.Services.Interfaces
149 Data["Serial"] = appearance.Serial.ToString(); 149 Data["Serial"] = appearance.Serial.ToString();
150 // Wearables 150 // Wearables
151 Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); 151 Data["AvatarHeight"] = appearance.AvatarHeight.ToString();
152 Data["BodyItem"] = appearance.BodyItem.ToString(); 152 Data["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString();
153 Data["EyesItem"] = appearance.EyesItem.ToString(); 153 Data["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString();
154 Data["GlovesItem"] = appearance.GlovesItem.ToString(); 154 Data["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString();
155 Data["HairItem"] = appearance.HairItem.ToString(); 155 Data["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString();
156 Data["JacketItem"] = appearance.JacketItem.ToString(); 156 Data["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString();
157 Data["PantsItem"] = appearance.PantsItem.ToString(); 157 Data["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString();
158 Data["ShirtItem"] = appearance.ShirtItem.ToString(); 158 Data["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString();
159 Data["ShoesItem"] = appearance.ShoesItem.ToString(); 159 Data["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString();
160 Data["SkinItem"] = appearance.SkinItem.ToString(); 160 Data["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString();
161 Data["SkirtItem"] = appearance.SkirtItem.ToString(); 161 Data["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString();
162 Data["SocksItem"] = appearance.SocksItem.ToString(); 162 Data["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString();
163 Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString(); 163 Data["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString();
164 Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString(); 164 Data["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString();
165 165
166 Data["BodyAsset"] = appearance.BodyAsset.ToString(); 166 Data["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString();
167 Data["EyesAsset"] = appearance.EyesAsset.ToString(); 167 Data["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString();
168 Data["GlovesAsset"] = appearance.GlovesAsset.ToString(); 168 Data["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString();
169 Data["HairAsset"] = appearance.HairAsset.ToString(); 169 Data["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString();
170 Data["JacketAsset"] = appearance.JacketAsset.ToString(); 170 Data["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString();
171 Data["PantsAsset"] = appearance.PantsAsset.ToString(); 171 Data["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString();
172 Data["ShirtAsset"] = appearance.ShirtAsset.ToString(); 172 Data["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString();
173 Data["ShoesAsset"] = appearance.ShoesAsset.ToString(); 173 Data["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString();
174 Data["SkinAsset"] = appearance.SkinAsset.ToString(); 174 Data["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString();
175 Data["SkirtAsset"] = appearance.SkirtAsset.ToString(); 175 Data["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString();
176 Data["SocksAsset"] = appearance.SocksAsset.ToString(); 176 Data["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString();
177 Data["UnderPantsAsset"] = appearance.UnderPantsAsset.ToString(); 177 Data["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString();
178 Data["UnderShirtAsset"] = appearance.UnderShirtAsset.ToString(); 178 Data["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString();
179 179
180 // Attachments 180 // Attachments
181 List<AvatarAttachment> attachments = appearance.GetAttachments(); 181 List<AvatarAttachment> attachments = appearance.GetAttachments();
@@ -190,36 +190,75 @@ namespace OpenSim.Services.Interfaces
190 AvatarAppearance appearance = new AvatarAppearance(owner); 190 AvatarAppearance appearance = new AvatarAppearance(owner);
191 try 191 try
192 { 192 {
193 appearance.Serial = Int32.Parse(Data["Serial"]); 193 if (Data.ContainsKey("Serial"))
194 appearance.Serial = Int32.Parse(Data["Serial"]);
194 195
195 // Wearables 196 // Wearables
196 appearance.BodyItem = UUID.Parse(Data["BodyItem"]); 197 if (Data.ContainsKey("BodyItem"))
197 appearance.EyesItem = UUID.Parse(Data["EyesItem"]); 198 appearance.Wearables[AvatarWearable.BODY].Wear(
198 appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); 199 UUID.Parse(Data["BodyItem"]),
199 appearance.HairItem = UUID.Parse(Data["HairItem"]); 200 UUID.Parse(Data["BodyAsset"]));
200 appearance.JacketItem = UUID.Parse(Data["JacketItem"]); 201
201 appearance.PantsItem = UUID.Parse(Data["PantsItem"]); 202 if (Data.ContainsKey("SkinItem"))
202 appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); 203 appearance.Wearables[AvatarWearable.SKIN].Wear(
203 appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); 204 UUID.Parse(Data["SkinItem"]),
204 appearance.SkinItem = UUID.Parse(Data["SkinItem"]); 205 UUID.Parse(Data["SkinAsset"]));
205 appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); 206
206 appearance.SocksItem = UUID.Parse(Data["SocksItem"]); 207 if (Data.ContainsKey("HairItem"))
207 appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); 208 appearance.Wearables[AvatarWearable.HAIR].Wear(
208 appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); 209 UUID.Parse(Data["HairItem"]),
209 210 UUID.Parse(Data["HairAsset"]));
210 appearance.BodyAsset = UUID.Parse(Data["BodyAsset"]); 211
211 appearance.EyesAsset = UUID.Parse(Data["EyesAsset"]); 212 if (Data.ContainsKey("EyesItem"))
212 appearance.GlovesAsset = UUID.Parse(Data["GlovesAsset"]); 213 appearance.Wearables[AvatarWearable.EYES].Wear(
213 appearance.HairAsset = UUID.Parse(Data["HairAsset"]); 214 UUID.Parse(Data["EyesItem"]),
214 appearance.JacketAsset = UUID.Parse(Data["JacketAsset"]); 215 UUID.Parse(Data["EyesAsset"]));
215 appearance.PantsAsset = UUID.Parse(Data["PantsAsset"]); 216
216 appearance.ShirtAsset = UUID.Parse(Data["ShirtAsset"]); 217 if (Data.ContainsKey("ShirtItem"))
217 appearance.ShoesAsset = UUID.Parse(Data["ShoesAsset"]); 218 appearance.Wearables[AvatarWearable.SHIRT].Wear(
218 appearance.SkinAsset = UUID.Parse(Data["SkinAsset"]); 219 UUID.Parse(Data["ShirtItem"]),
219 appearance.SkirtAsset = UUID.Parse(Data["SkirtAsset"]); 220 UUID.Parse(Data["ShirtAsset"]));
220 appearance.SocksAsset = UUID.Parse(Data["SocksAsset"]); 221
221 appearance.UnderPantsAsset = UUID.Parse(Data["UnderPantsAsset"]); 222 if (Data.ContainsKey("PantsItem"))
222 appearance.UnderShirtAsset = UUID.Parse(Data["UnderShirtAsset"]); 223 appearance.Wearables[AvatarWearable.PANTS].Wear(
224 UUID.Parse(Data["PantsItem"]),
225 UUID.Parse(Data["PantsAsset"]));
226
227 if (Data.ContainsKey("ShoesItem"))
228 appearance.Wearables[AvatarWearable.SHOES].Wear(
229 UUID.Parse(Data["ShoesItem"]),
230 UUID.Parse(Data["ShoesAsset"]));
231
232 if (Data.ContainsKey("SocksItem"))
233 appearance.Wearables[AvatarWearable.SOCKS].Wear(
234 UUID.Parse(Data["SocksItem"]),
235 UUID.Parse(Data["SocksAsset"]));
236
237 if (Data.ContainsKey("JacketItem"))
238 appearance.Wearables[AvatarWearable.JACKET].Wear(
239 UUID.Parse(Data["JacketItem"]),
240 UUID.Parse(Data["JacketAsset"]));
241
242 if (Data.ContainsKey("GlovesItem"))
243 appearance.Wearables[AvatarWearable.GLOVES].Wear(
244 UUID.Parse(Data["GlovesItem"]),
245 UUID.Parse(Data["GlovesAsset"]));
246
247 if (Data.ContainsKey("UnderShirtItem"))
248 appearance.Wearables[AvatarWearable.UNDERSHIRT].Wear(
249 UUID.Parse(Data["UnderShirtItem"]),
250 UUID.Parse(Data["UnderShirtAsset"]));
251
252 if (Data.ContainsKey("UnderPantsItem"))
253 appearance.Wearables[AvatarWearable.UNDERPANTS].Wear(
254 UUID.Parse(Data["UnderPantsItem"]),
255 UUID.Parse(Data["UnderPantsAsset"]));
256
257 if (Data.ContainsKey("SkirtItem"))
258 appearance.Wearables[AvatarWearable.SKIRT].Wear(
259 UUID.Parse(Data["SkirtItem"]),
260 UUID.Parse(Data["SkirtAsset"]));
261
223 262
224 // Attachments 263 // Attachments
225 Dictionary<string, string> attchs = new Dictionary<string, string>(); 264 Dictionary<string, string> attchs = new Dictionary<string, string>();
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 5ced7d5..de7c44c 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -328,8 +328,9 @@
328 ; already separated from packet handling with a queue, so this will only 328 ; already separated from packet handling with a queue, so this will only
329 ; affect whether networking internals such as packet decoding and 329 ; affect whether networking internals such as packet decoding and
330 ; acknowledgement accounting are done synchronously or asynchronously 330 ; acknowledgement accounting are done synchronously or asynchronously
331 ; Default is true.
331 ; 332 ;
332 ;async_packet_handling = false 333 ;async_packet_handling = true
333 334
334 ; The client socket receive buffer size determines how many 335 ; The client socket receive buffer size determines how many
335 ; incoming requests we can process; the default on .NET is 8192 336 ; incoming requests we can process; the default on .NET is 8192
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index b81642a..e1627c0 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -64,7 +64,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
64 LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" 64 LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
65 ; Realm = "regions" 65 ; Realm = "regions"
66 ; AllowDuplicateNames = "True" 66 ; AllowDuplicateNames = "True"
67 ; Check4096 = "False" 67
68 ;; Perform distance check for the creation of a linked region
69 ; Check4096 = "True"
68 70
69 ;; Next, we can specify properties of regions, including default and fallback regions 71 ;; Next, we can specify properties of regions, including default and fallback regions
70 ;; The syntax is: Region_<RegionName> = "<flags>" 72 ;; The syntax is: Region_<RegionName> = "<flags>"
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example
index 2f021d5..1fcf043 100644
--- a/bin/config-include/StandaloneCommon.ini.example
+++ b/bin/config-include/StandaloneCommon.ini.example
@@ -53,8 +53,8 @@
53 ;;--- For MySql region storage (alternative) 53 ;;--- For MySql region storage (alternative)
54 ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" 54 ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
55 55
56 ; If HG, do you want this check on the distance to be performed? 56 ;; With hypergrid, perform distance check for the creation of a linked region
57 ; Check4096 = "False" 57 ; Check4096 = true
58 58
59 ;; Next, we can specify properties of regions, including default and fallback regions 59 ;; Next, we can specify properties of regions, including default and fallback regions
60 ;; The syntax is: Region_<RegioName> = "<flags>" 60 ;; The syntax is: Region_<RegioName> = "<flags>"