diff options
Diffstat (limited to 'OpenSim/Framework/ChildAgentDataUpdate.cs')
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 5078f69..0763bbc 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -94,6 +94,7 @@ namespace OpenSim.Framework | |||
94 | // This probably shouldn't be here | 94 | // This probably shouldn't be here |
95 | public byte[] Throttles; | 95 | public byte[] Throttles; |
96 | 96 | ||
97 | public Dictionary<ulong, string> ChildrenCapSeeds = null; | ||
97 | 98 | ||
98 | public OSDMap Pack() | 99 | public OSDMap Pack() |
99 | { | 100 | { |
@@ -119,6 +120,19 @@ namespace OpenSim.Framework | |||
119 | if ((Throttles != null) && (Throttles.Length > 0)) | 120 | if ((Throttles != null) && (Throttles.Length > 0)) |
120 | args["throttles"] = OSD.FromBinary(Throttles); | 121 | args["throttles"] = OSD.FromBinary(Throttles); |
121 | 122 | ||
123 | if (ChildrenCapSeeds != null && ChildrenCapSeeds.Count > 0) | ||
124 | { | ||
125 | OSDArray childrenSeeds = new OSDArray(ChildrenCapSeeds.Count); | ||
126 | foreach (KeyValuePair<ulong, string> kvp in ChildrenCapSeeds) | ||
127 | { | ||
128 | OSDMap pair = new OSDMap(); | ||
129 | pair["handle"] = OSD.FromString(kvp.Key.ToString()); | ||
130 | pair["seed"] = OSD.FromString(kvp.Value); | ||
131 | childrenSeeds.Add(pair); | ||
132 | } | ||
133 | args["children_seeds"] = childrenSeeds; | ||
134 | } | ||
135 | |||
122 | return args; | 136 | return args; |
123 | } | 137 | } |
124 | 138 | ||
@@ -165,6 +179,30 @@ namespace OpenSim.Framework | |||
165 | 179 | ||
166 | if (args["throttles"] != null) | 180 | if (args["throttles"] != null) |
167 | Throttles = args["throttles"].AsBinary(); | 181 | Throttles = args["throttles"].AsBinary(); |
182 | |||
183 | if (args.ContainsKey("children_seeds") && (args["children_seeds"] != null) && | ||
184 | (args["children_seeds"].Type == OSDType.Array)) | ||
185 | { | ||
186 | OSDArray childrenSeeds = (OSDArray)(args["children_seeds"]); | ||
187 | ChildrenCapSeeds = new Dictionary<ulong, string>(); | ||
188 | foreach (OSD o in childrenSeeds) | ||
189 | { | ||
190 | if (o.Type == OSDType.Map) | ||
191 | { | ||
192 | ulong handle = 0; | ||
193 | string seed = ""; | ||
194 | OSDMap pair = (OSDMap)o; | ||
195 | if (pair["handle"] != null) | ||
196 | if (!UInt64.TryParse(pair["handle"].AsString(), out handle)) | ||
197 | continue; | ||
198 | if (pair["seed"] != null) | ||
199 | seed = pair["seed"].AsString(); | ||
200 | if (!ChildrenCapSeeds.ContainsKey(handle)) | ||
201 | ChildrenCapSeeds.Add(handle, seed); | ||
202 | } | ||
203 | } | ||
204 | } | ||
205 | |||
168 | } | 206 | } |
169 | 207 | ||
170 | /// <summary> | 208 | /// <summary> |