diff options
author | Melanie | 2010-05-31 17:57:48 +0100 |
---|---|---|
committer | Melanie | 2010-05-31 17:57:48 +0100 |
commit | 0526a91206a64cb43be29d61d472a98f5a031b74 (patch) | |
tree | 061ab41ebe056e48794de5fd296c8af576471c1e /OpenSim | |
parent | Fix casting in llParcelMediaCommandList so that it actually, you know, works (diff) | |
parent | Fix a nullref in EventManager caused by RegionReady not setting the scene (diff) | |
download | opensim-SC-0526a91206a64cb43be29d61d472a98f5a031b74.zip opensim-SC-0526a91206a64cb43be29d61d472a98f5a031b74.tar.gz opensim-SC-0526a91206a64cb43be29d61d472a98f5a031b74.tar.bz2 opensim-SC-0526a91206a64cb43be29d61d472a98f5a031b74.tar.xz |
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to 'OpenSim')
33 files changed, 671 insertions, 215 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index 1482184..c1eee8d 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs | |||
@@ -635,9 +635,9 @@ namespace OpenSim.Data.MSSQL | |||
635 | /// <param name="connection">connection to the database</param> | 635 | /// <param name="connection">connection to the database</param> |
636 | private void DeleteItemsInFolder(UUID folderID, SqlConnection connection) | 636 | private void DeleteItemsInFolder(UUID folderID, SqlConnection connection) |
637 | { | 637 | { |
638 | using (SqlCommand command = new SqlCommand("DELETE FROM inventoryitems WHERE folderID=@folderID", connection)) | 638 | using (SqlCommand command = new SqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", connection)) |
639 | { | 639 | { |
640 | command.Parameters.Add(database.CreateParameter("folderID", folderID)); | 640 | command.Parameters.Add(database.CreateParameter("parentFolderID", folderID)); |
641 | 641 | ||
642 | try | 642 | try |
643 | { | 643 | { |
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index 3ef1053..7fe8ed0 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs | |||
@@ -582,8 +582,21 @@ namespace OpenSim.Data.MSSQL | |||
582 | /// <param name="appearance">the appearence</param> | 582 | /// <param name="appearance">the appearence</param> |
583 | override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) | 583 | override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) |
584 | { | 584 | { |
585 | string sql = @"DELETE FROM avatarappearance WHERE owner=@owner; | 585 | string sql = @"DELETE FROM avatarappearance WHERE owner=@owner"; |
586 | INSERT INTO avatarappearance | 586 | using (AutoClosingSqlCommand cmd = database.Query(sql)) |
587 | { | ||
588 | cmd.Parameters.Add(database.CreateParameter("@owner", appearance.Owner)); | ||
589 | try | ||
590 | { | ||
591 | cmd.ExecuteNonQuery(); | ||
592 | } | ||
593 | catch (Exception e) | ||
594 | { | ||
595 | m_log.ErrorFormat("[USER DB] Error deleting old user appearance, error: {0}", e.Message); | ||
596 | } | ||
597 | } | ||
598 | |||
599 | sql=@"INSERT INTO avatarappearance | ||
587 | (owner, serial, visual_params, texture, avatar_height, | 600 | (owner, serial, visual_params, texture, avatar_height, |
588 | body_item, body_asset, skin_item, skin_asset, hair_item, | 601 | body_item, body_asset, skin_item, skin_asset, hair_item, |
589 | hair_asset, eyes_item, eyes_asset, shirt_item, shirt_asset, | 602 | hair_asset, eyes_item, eyes_asset, shirt_item, shirt_asset, |
diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 84cc05e..1f5f208 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs | |||
@@ -25,13 +25,17 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using OpenSim.Framework.Servers.HttpServer; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using System.Reflection; | ||
30 | using log4net; | ||
31 | using OpenSim.Framework.Servers.HttpServer; | ||
30 | 32 | ||
31 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
32 | { | 34 | { |
33 | public class MainServer | 35 | public class MainServer |
34 | { | 36 | { |
37 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
38 | |||
35 | private static BaseHttpServer instance = null; | 39 | private static BaseHttpServer instance = null; |
36 | private static Dictionary<uint, BaseHttpServer> m_Servers = | 40 | private static Dictionary<uint, BaseHttpServer> m_Servers = |
37 | new Dictionary<uint, BaseHttpServer>(); | 41 | new Dictionary<uint, BaseHttpServer>(); |
@@ -53,6 +57,8 @@ namespace OpenSim.Framework | |||
53 | return m_Servers[port]; | 57 | return m_Servers[port]; |
54 | 58 | ||
55 | m_Servers[port] = new BaseHttpServer(port); | 59 | m_Servers[port] = new BaseHttpServer(port); |
60 | |||
61 | m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port); | ||
56 | m_Servers[port].Start(); | 62 | m_Servers[port].Start(); |
57 | 63 | ||
58 | return m_Servers[port]; | 64 | return m_Servers[port]; |
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs new file mode 100644 index 0000000..ff5f8b9 --- /dev/null +++ b/OpenSim/Framework/SLUtil.cs | |||
@@ -0,0 +1,282 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using OpenMetaverse; | ||
4 | |||
5 | namespace OpenSim.Framework | ||
6 | { | ||
7 | public static class SLUtil | ||
8 | { | ||
9 | #region SL / file extension / content-type conversions | ||
10 | |||
11 | public static string SLAssetTypeToContentType(int assetType) | ||
12 | { | ||
13 | switch ((AssetType)assetType) | ||
14 | { | ||
15 | case AssetType.Texture: | ||
16 | return "image/x-j2c"; | ||
17 | case AssetType.Sound: | ||
18 | return "application/ogg"; | ||
19 | case AssetType.CallingCard: | ||
20 | return "application/vnd.ll.callingcard"; | ||
21 | case AssetType.Landmark: | ||
22 | return "application/vnd.ll.landmark"; | ||
23 | case AssetType.Clothing: | ||
24 | return "application/vnd.ll.clothing"; | ||
25 | case AssetType.Object: | ||
26 | return "application/vnd.ll.primitive"; | ||
27 | case AssetType.Notecard: | ||
28 | return "application/vnd.ll.notecard"; | ||
29 | case AssetType.Folder: | ||
30 | return "application/vnd.ll.folder"; | ||
31 | case AssetType.RootFolder: | ||
32 | return "application/vnd.ll.rootfolder"; | ||
33 | case AssetType.LSLText: | ||
34 | return "application/vnd.ll.lsltext"; | ||
35 | case AssetType.LSLBytecode: | ||
36 | return "application/vnd.ll.lslbyte"; | ||
37 | case AssetType.TextureTGA: | ||
38 | case AssetType.ImageTGA: | ||
39 | return "image/tga"; | ||
40 | case AssetType.Bodypart: | ||
41 | return "application/vnd.ll.bodypart"; | ||
42 | case AssetType.TrashFolder: | ||
43 | return "application/vnd.ll.trashfolder"; | ||
44 | case AssetType.SnapshotFolder: | ||
45 | return "application/vnd.ll.snapshotfolder"; | ||
46 | case AssetType.LostAndFoundFolder: | ||
47 | return "application/vnd.ll.lostandfoundfolder"; | ||
48 | case AssetType.SoundWAV: | ||
49 | return "audio/x-wav"; | ||
50 | case AssetType.ImageJPEG: | ||
51 | return "image/jpeg"; | ||
52 | case AssetType.Animation: | ||
53 | return "application/vnd.ll.animation"; | ||
54 | case AssetType.Gesture: | ||
55 | return "application/vnd.ll.gesture"; | ||
56 | case AssetType.Simstate: | ||
57 | return "application/x-metaverse-simstate"; | ||
58 | case AssetType.Unknown: | ||
59 | default: | ||
60 | return "application/octet-stream"; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | public static sbyte ContentTypeToSLAssetType(string contentType) | ||
65 | { | ||
66 | switch (contentType) | ||
67 | { | ||
68 | case "image/x-j2c": | ||
69 | case "image/jp2": | ||
70 | return (sbyte)AssetType.Texture; | ||
71 | case "application/ogg": | ||
72 | return (sbyte)AssetType.Sound; | ||
73 | case "application/vnd.ll.callingcard": | ||
74 | case "application/x-metaverse-callingcard": | ||
75 | return (sbyte)AssetType.CallingCard; | ||
76 | case "application/vnd.ll.landmark": | ||
77 | case "application/x-metaverse-landmark": | ||
78 | return (sbyte)AssetType.Landmark; | ||
79 | case "application/vnd.ll.clothing": | ||
80 | case "application/x-metaverse-clothing": | ||
81 | return (sbyte)AssetType.Clothing; | ||
82 | case "application/vnd.ll.primitive": | ||
83 | case "application/x-metaverse-primitive": | ||
84 | return (sbyte)AssetType.Object; | ||
85 | case "application/vnd.ll.notecard": | ||
86 | case "application/x-metaverse-notecard": | ||
87 | return (sbyte)AssetType.Notecard; | ||
88 | case "application/vnd.ll.folder": | ||
89 | return (sbyte)AssetType.Folder; | ||
90 | case "application/vnd.ll.rootfolder": | ||
91 | return (sbyte)AssetType.RootFolder; | ||
92 | case "application/vnd.ll.lsltext": | ||
93 | case "application/x-metaverse-lsl": | ||
94 | return (sbyte)AssetType.LSLText; | ||
95 | case "application/vnd.ll.lslbyte": | ||
96 | case "application/x-metaverse-lso": | ||
97 | return (sbyte)AssetType.LSLBytecode; | ||
98 | case "image/tga": | ||
99 | // Note that AssetType.TextureTGA will be converted to AssetType.ImageTGA | ||
100 | return (sbyte)AssetType.ImageTGA; | ||
101 | case "application/vnd.ll.bodypart": | ||
102 | case "application/x-metaverse-bodypart": | ||
103 | return (sbyte)AssetType.Bodypart; | ||
104 | case "application/vnd.ll.trashfolder": | ||
105 | return (sbyte)AssetType.TrashFolder; | ||
106 | case "application/vnd.ll.snapshotfolder": | ||
107 | return (sbyte)AssetType.SnapshotFolder; | ||
108 | case "application/vnd.ll.lostandfoundfolder": | ||
109 | return (sbyte)AssetType.LostAndFoundFolder; | ||
110 | case "audio/x-wav": | ||
111 | return (sbyte)AssetType.SoundWAV; | ||
112 | case "image/jpeg": | ||
113 | return (sbyte)AssetType.ImageJPEG; | ||
114 | case "application/vnd.ll.animation": | ||
115 | case "application/x-metaverse-animation": | ||
116 | return (sbyte)AssetType.Animation; | ||
117 | case "application/vnd.ll.gesture": | ||
118 | case "application/x-metaverse-gesture": | ||
119 | return (sbyte)AssetType.Gesture; | ||
120 | case "application/x-metaverse-simstate": | ||
121 | return (sbyte)AssetType.Simstate; | ||
122 | case "application/octet-stream": | ||
123 | default: | ||
124 | return (sbyte)AssetType.Unknown; | ||
125 | } | ||
126 | } | ||
127 | |||
128 | public static sbyte ContentTypeToSLInvType(string contentType) | ||
129 | { | ||
130 | switch (contentType) | ||
131 | { | ||
132 | case "image/x-j2c": | ||
133 | case "image/jp2": | ||
134 | case "image/tga": | ||
135 | case "image/jpeg": | ||
136 | return (sbyte)InventoryType.Texture; | ||
137 | case "application/ogg": | ||
138 | case "audio/x-wav": | ||
139 | return (sbyte)InventoryType.Sound; | ||
140 | case "application/vnd.ll.callingcard": | ||
141 | case "application/x-metaverse-callingcard": | ||
142 | return (sbyte)InventoryType.CallingCard; | ||
143 | case "application/vnd.ll.landmark": | ||
144 | case "application/x-metaverse-landmark": | ||
145 | return (sbyte)InventoryType.Landmark; | ||
146 | case "application/vnd.ll.clothing": | ||
147 | case "application/x-metaverse-clothing": | ||
148 | case "application/vnd.ll.bodypart": | ||
149 | case "application/x-metaverse-bodypart": | ||
150 | return (sbyte)InventoryType.Wearable; | ||
151 | case "application/vnd.ll.primitive": | ||
152 | case "application/x-metaverse-primitive": | ||
153 | return (sbyte)InventoryType.Object; | ||
154 | case "application/vnd.ll.notecard": | ||
155 | case "application/x-metaverse-notecard": | ||
156 | return (sbyte)InventoryType.Notecard; | ||
157 | case "application/vnd.ll.folder": | ||
158 | return (sbyte)InventoryType.Folder; | ||
159 | case "application/vnd.ll.rootfolder": | ||
160 | return (sbyte)InventoryType.RootCategory; | ||
161 | case "application/vnd.ll.lsltext": | ||
162 | case "application/x-metaverse-lsl": | ||
163 | case "application/vnd.ll.lslbyte": | ||
164 | case "application/x-metaverse-lso": | ||
165 | return (sbyte)InventoryType.LSL; | ||
166 | case "application/vnd.ll.trashfolder": | ||
167 | case "application/vnd.ll.snapshotfolder": | ||
168 | case "application/vnd.ll.lostandfoundfolder": | ||
169 | return (sbyte)InventoryType.Folder; | ||
170 | case "application/vnd.ll.animation": | ||
171 | case "application/x-metaverse-animation": | ||
172 | return (sbyte)InventoryType.Animation; | ||
173 | case "application/vnd.ll.gesture": | ||
174 | case "application/x-metaverse-gesture": | ||
175 | return (sbyte)InventoryType.Gesture; | ||
176 | case "application/x-metaverse-simstate": | ||
177 | return (sbyte)InventoryType.Snapshot; | ||
178 | case "application/octet-stream": | ||
179 | default: | ||
180 | return (sbyte)InventoryType.Unknown; | ||
181 | } | ||
182 | } | ||
183 | |||
184 | #endregion SL / file extension / content-type conversions | ||
185 | |||
186 | /// <summary> | ||
187 | /// Parse a notecard in Linden format to a string of ordinary text. | ||
188 | /// </summary> | ||
189 | /// <param name="rawInput"></param> | ||
190 | /// <returns></returns> | ||
191 | public static string ParseNotecardToString(string rawInput) | ||
192 | { | ||
193 | return string.Join("\n", ParseNotecardToList(rawInput).ToArray()); | ||
194 | } | ||
195 | |||
196 | /// <summary> | ||
197 | /// Parse a notecard in Linden format to a list of ordinary lines. | ||
198 | /// </summary> | ||
199 | /// <param name="rawInput"></param> | ||
200 | /// <returns></returns> | ||
201 | public static List<string> ParseNotecardToList(string rawInput) | ||
202 | { | ||
203 | string[] input = rawInput.Replace("\r", "").Split('\n'); | ||
204 | int idx = 0; | ||
205 | int level = 0; | ||
206 | List<string> output = new List<string>(); | ||
207 | string[] words; | ||
208 | |||
209 | while (idx < input.Length) | ||
210 | { | ||
211 | if (input[idx] == "{") | ||
212 | { | ||
213 | level++; | ||
214 | idx++; | ||
215 | continue; | ||
216 | } | ||
217 | |||
218 | if (input[idx]== "}") | ||
219 | { | ||
220 | level--; | ||
221 | idx++; | ||
222 | continue; | ||
223 | } | ||
224 | |||
225 | switch (level) | ||
226 | { | ||
227 | case 0: | ||
228 | words = input[idx].Split(' '); // Linden text ver | ||
229 | // Notecards are created *really* empty. Treat that as "no text" (just like after saving an empty notecard) | ||
230 | if (words.Length < 3) | ||
231 | return output; | ||
232 | |||
233 | int version = int.Parse(words[3]); | ||
234 | if (version != 2) | ||
235 | return output; | ||
236 | break; | ||
237 | case 1: | ||
238 | words = input[idx].Split(' '); | ||
239 | if (words[0] == "LLEmbeddedItems") | ||
240 | break; | ||
241 | if (words[0] == "Text") | ||
242 | { | ||
243 | int len = int.Parse(words[2]); | ||
244 | idx++; | ||
245 | |||
246 | int count = -1; | ||
247 | |||
248 | while (count < len) | ||
249 | { | ||
250 | // int l = input[idx].Length; | ||
251 | string ln = input[idx]; | ||
252 | |||
253 | int need = len-count-1; | ||
254 | if (ln.Length > need) | ||
255 | ln = ln.Substring(0, need); | ||
256 | |||
257 | output.Add(ln); | ||
258 | count += ln.Length + 1; | ||
259 | idx++; | ||
260 | } | ||
261 | |||
262 | return output; | ||
263 | } | ||
264 | break; | ||
265 | case 2: | ||
266 | words = input[idx].Split(' '); // count | ||
267 | if (words[0] == "count") | ||
268 | { | ||
269 | int c = int.Parse(words[1]); | ||
270 | if (c > 0) | ||
271 | return output; | ||
272 | break; | ||
273 | } | ||
274 | break; | ||
275 | } | ||
276 | idx++; | ||
277 | } | ||
278 | |||
279 | return output; | ||
280 | } | ||
281 | } | ||
282 | } \ No newline at end of file | ||
diff --git a/OpenSim/Framework/Serialization/TarArchiveWriter.cs b/OpenSim/Framework/Serialization/TarArchiveWriter.cs index 20d0f7e..0bd639f 100644 --- a/OpenSim/Framework/Serialization/TarArchiveWriter.cs +++ b/OpenSim/Framework/Serialization/TarArchiveWriter.cs | |||
@@ -208,7 +208,9 @@ namespace OpenSim.Framework.Serialization | |||
208 | m_bw.Write(header); | 208 | m_bw.Write(header); |
209 | 209 | ||
210 | // Write out data | 210 | // Write out data |
211 | m_bw.Write(data); | 211 | // An IOException occurs if we try to write out an empty array in Mono 2.6 |
212 | if (data.Length > 0) | ||
213 | m_bw.Write(data); | ||
212 | 214 | ||
213 | if (data.Length % 512 != 0) | 215 | if (data.Length % 512 != 0) |
214 | { | 216 | { |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 214f936..297d047 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -311,7 +311,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
311 | } | 311 | } |
312 | catch (Exception e) | 312 | catch (Exception e) |
313 | { | 313 | { |
314 | m_log.ErrorFormat("[BASE HTTP SERVER]: OnRequest() failed with {0} {1}", e.Message, e.StackTrace); | 314 | m_log.Error(string.Format("[BASE HTTP SERVER]: OnRequest() failed with "), e); |
315 | } | 315 | } |
316 | } | 316 | } |
317 | 317 | ||
@@ -1572,7 +1572,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1572 | 1572 | ||
1573 | public void Start() | 1573 | public void Start() |
1574 | { | 1574 | { |
1575 | m_log.Info("[BASE HTTP SERVER]: Starting up HTTP Server"); | ||
1576 | StartHTTP(); | 1575 | StartHTTP(); |
1577 | } | 1576 | } |
1578 | 1577 | ||
@@ -1580,7 +1579,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1580 | { | 1579 | { |
1581 | try | 1580 | try |
1582 | { | 1581 | { |
1583 | m_log.Debug("[BASE HTTP SERVER]: Spawned main thread OK"); | ||
1584 | //m_httpListener = new HttpListener(); | 1582 | //m_httpListener = new HttpListener(); |
1585 | NotSocketErrors = 0; | 1583 | NotSocketErrors = 0; |
1586 | if (!m_ssl) | 1584 | if (!m_ssl) |
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index cf417d7..cf3d6fa 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs | |||
@@ -30,7 +30,7 @@ namespace OpenSim | |||
30 | public class VersionInfo | 30 | public class VersionInfo |
31 | { | 31 | { |
32 | private const string VERSION_NUMBER = "0.6.9CM"; | 32 | private const string VERSION_NUMBER = "0.6.9CM"; |
33 | private const Flavour VERSION_FLAVOUR = Flavour.Dev; | 33 | private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes; |
34 | 34 | ||
35 | public enum Flavour | 35 | public enum Flavour |
36 | { | 36 | { |
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 21edcc5..da77a2b 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -164,12 +164,12 @@ namespace OpenSim | |||
164 | m_config.Source = new IniConfigSource(); | 164 | m_config.Source = new IniConfigSource(); |
165 | m_config.Source.Merge(DefaultConfig()); | 165 | m_config.Source.Merge(DefaultConfig()); |
166 | 166 | ||
167 | m_log.Info("[CONFIG] Reading configuration settings"); | 167 | m_log.Info("[CONFIG]: Reading configuration settings"); |
168 | 168 | ||
169 | if (sources.Count == 0) | 169 | if (sources.Count == 0) |
170 | { | 170 | { |
171 | m_log.FatalFormat("[CONFIG] Could not load any configuration"); | 171 | m_log.FatalFormat("[CONFIG]: Could not load any configuration"); |
172 | m_log.FatalFormat("[CONFIG] Did you copy the OpenSim.ini.example file to OpenSim.ini?"); | 172 | m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?"); |
173 | Environment.Exit(1); | 173 | Environment.Exit(1); |
174 | } | 174 | } |
175 | 175 | ||
@@ -182,8 +182,8 @@ namespace OpenSim | |||
182 | 182 | ||
183 | if (!iniFileExists) | 183 | if (!iniFileExists) |
184 | { | 184 | { |
185 | m_log.FatalFormat("[CONFIG] Could not load any configuration"); | 185 | m_log.FatalFormat("[CONFIG]: Could not load any configuration"); |
186 | m_log.FatalFormat("[CONFIG] Configuration exists, but there was an error loading it!"); | 186 | m_log.FatalFormat("[CONFIG]: Configuration exists, but there was an error loading it!"); |
187 | Environment.Exit(1); | 187 | Environment.Exit(1); |
188 | } | 188 | } |
189 | 189 | ||
@@ -257,20 +257,17 @@ namespace OpenSim | |||
257 | 257 | ||
258 | if (!IsUri(iniPath)) | 258 | if (!IsUri(iniPath)) |
259 | { | 259 | { |
260 | m_log.InfoFormat("[CONFIG] Reading configuration file {0}", | 260 | m_log.InfoFormat("[CONFIG]: Reading configuration file {0}", Path.GetFullPath(iniPath)); |
261 | Path.GetFullPath(iniPath)); | ||
262 | 261 | ||
263 | m_config.Source.Merge(new IniConfigSource(iniPath)); | 262 | m_config.Source.Merge(new IniConfigSource(iniPath)); |
264 | success = true; | 263 | success = true; |
265 | } | 264 | } |
266 | else | 265 | else |
267 | { | 266 | { |
268 | m_log.InfoFormat("[CONFIG] {0} is a http:// URI, fetching ...", | 267 | m_log.InfoFormat("[CONFIG]: {0} is a http:// URI, fetching ...", iniPath); |
269 | iniPath); | ||
270 | 268 | ||
271 | // The ini file path is a http URI | 269 | // The ini file path is a http URI |
272 | // Try to read it | 270 | // Try to read it |
273 | // | ||
274 | try | 271 | try |
275 | { | 272 | { |
276 | XmlReader r = XmlReader.Create(iniPath); | 273 | XmlReader r = XmlReader.Create(iniPath); |
@@ -281,7 +278,7 @@ namespace OpenSim | |||
281 | } | 278 | } |
282 | catch (Exception e) | 279 | catch (Exception e) |
283 | { | 280 | { |
284 | m_log.FatalFormat("[CONFIG] Exception reading config from URI {0}\n" + e.ToString(), iniPath); | 281 | m_log.FatalFormat("[CONFIG]: Exception reading config from URI {0}\n" + e.ToString(), iniPath); |
285 | Environment.Exit(1); | 282 | Environment.Exit(1); |
286 | } | 283 | } |
287 | } | 284 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 960e0a2..7e85396 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -348,6 +348,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
348 | protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; | 348 | protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; |
349 | private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; | 349 | private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; |
350 | private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; | 350 | private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; |
351 | |||
352 | /// <value> | ||
353 | /// List used in construction of data blocks for an object update packet. This is to stop us having to | ||
354 | /// continually recreate it. | ||
355 | /// </value> | ||
356 | protected List<ObjectUpdatePacket.ObjectDataBlock> m_fullUpdateDataBlocksBuilder; | ||
357 | |||
358 | /// <value> | ||
359 | /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the | ||
360 | /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an | ||
361 | /// ownerless phantom. | ||
362 | /// | ||
363 | /// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock | ||
364 | /// | ||
365 | /// </value> | ||
366 | protected HashSet<uint> m_killRecord; | ||
367 | |||
351 | private int m_moneyBalance; | 368 | private int m_moneyBalance; |
352 | private int m_animationSequenceNumber = 1; | 369 | private int m_animationSequenceNumber = 1; |
353 | private bool m_SendLogoutPacketWhenClosing = true; | 370 | private bool m_SendLogoutPacketWhenClosing = true; |
@@ -437,6 +454,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
437 | m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | 454 | m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); |
438 | m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | 455 | m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); |
439 | m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); | 456 | m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); |
457 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); | ||
458 | m_killRecord = new HashSet<uint>(); | ||
440 | 459 | ||
441 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 460 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
442 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); | 461 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); |
@@ -1473,7 +1492,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1473 | kill.ObjectData[0].ID = localID; | 1492 | kill.ObjectData[0].ID = localID; |
1474 | kill.Header.Reliable = true; | 1493 | kill.Header.Reliable = true; |
1475 | kill.Header.Zerocoded = true; | 1494 | kill.Header.Zerocoded = true; |
1476 | OutPacket(kill, ThrottleOutPacketType.State); | 1495 | |
1496 | lock (m_primFullUpdates.SyncRoot) | ||
1497 | { | ||
1498 | m_killRecord.Add(localID); | ||
1499 | OutPacket(kill, ThrottleOutPacketType.State); | ||
1500 | } | ||
1477 | } | 1501 | } |
1478 | 1502 | ||
1479 | /// <summary> | 1503 | /// <summary> |
@@ -3513,21 +3537,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3513 | if (count == 0) | 3537 | if (count == 0) |
3514 | return; | 3538 | return; |
3515 | 3539 | ||
3516 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count]; | 3540 | m_fullUpdateDataBlocksBuilder.Clear(); |
3541 | |||
3517 | for (int i = 0; i < count; i++) | 3542 | for (int i = 0; i < count; i++) |
3518 | { | 3543 | { |
3519 | outPacket.ObjectData[i] = m_primFullUpdates.Dequeue(); | 3544 | ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue(); |
3520 | 3545 | ||
3546 | if (!m_killRecord.Contains(block.ID)) | ||
3547 | { | ||
3548 | m_fullUpdateDataBlocksBuilder.Add(block); | ||
3549 | |||
3521 | // string text = Util.FieldToString(outPacket.ObjectData[i].Text); | 3550 | // string text = Util.FieldToString(outPacket.ObjectData[i].Text); |
3522 | // if (text.IndexOf("\n") >= 0) | 3551 | // if (text.IndexOf("\n") >= 0) |
3523 | // text = text.Remove(text.IndexOf("\n")); | 3552 | // text = text.Remove(text.IndexOf("\n")); |
3524 | // m_log.DebugFormat( | 3553 | // m_log.DebugFormat( |
3525 | // "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", | 3554 | // "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", |
3526 | // outPacket.ObjectData[i].ID, text, Name); | 3555 | // outPacket.ObjectData[i].ID, text, Name); |
3556 | } | ||
3557 | // else | ||
3558 | // { | ||
3559 | // m_log.WarnFormat( | ||
3560 | // "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name); | ||
3561 | // } | ||
3527 | } | 3562 | } |
3528 | } | ||
3529 | 3563 | ||
3530 | OutPacket(outPacket, ThrottleOutPacketType.State); | 3564 | outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray(); |
3565 | |||
3566 | OutPacket(outPacket, ThrottleOutPacketType.State); | ||
3567 | } | ||
3531 | } | 3568 | } |
3532 | 3569 | ||
3533 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 3570 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 3c4fa72..5ed4cd7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -513,6 +513,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
513 | byte flags = buffer.Data[0]; | 513 | byte flags = buffer.Data[0]; |
514 | bool isResend = (flags & Helpers.MSG_RESENT) != 0; | 514 | bool isResend = (flags & Helpers.MSG_RESENT) != 0; |
515 | bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0; | 515 | bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0; |
516 | bool isZerocoded = (flags & Helpers.MSG_ZEROCODED) != 0; | ||
516 | LLUDPClient udpClient = outgoingPacket.Client; | 517 | LLUDPClient udpClient = outgoingPacket.Client; |
517 | 518 | ||
518 | if (!udpClient.IsConnected) | 519 | if (!udpClient.IsConnected) |
@@ -522,23 +523,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
522 | 523 | ||
523 | int dataLength = buffer.DataLength; | 524 | int dataLength = buffer.DataLength; |
524 | 525 | ||
525 | // Keep appending ACKs until there is no room left in the buffer or there are | 526 | // NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here |
526 | // no more ACKs to append | 527 | if (!isZerocoded) |
527 | uint ackCount = 0; | ||
528 | uint ack; | ||
529 | while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack)) | ||
530 | { | 528 | { |
531 | Utils.UIntToBytesBig(ack, buffer.Data, dataLength); | 529 | // Keep appending ACKs until there is no room left in the buffer or there are |
532 | dataLength += 4; | 530 | // no more ACKs to append |
533 | ++ackCount; | 531 | uint ackCount = 0; |
534 | } | 532 | uint ack; |
533 | while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack)) | ||
534 | { | ||
535 | Utils.UIntToBytesBig(ack, buffer.Data, dataLength); | ||
536 | dataLength += 4; | ||
537 | ++ackCount; | ||
538 | } | ||
535 | 539 | ||
536 | if (ackCount > 0) | 540 | if (ackCount > 0) |
537 | { | 541 | { |
538 | // Set the last byte of the packet equal to the number of appended ACKs | 542 | // Set the last byte of the packet equal to the number of appended ACKs |
539 | buffer.Data[dataLength++] = (byte)ackCount; | 543 | buffer.Data[dataLength++] = (byte)ackCount; |
540 | // Set the appended ACKs flag on this packet | 544 | // Set the appended ACKs flag on this packet |
541 | buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS); | 545 | buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS); |
546 | } | ||
542 | } | 547 | } |
543 | 548 | ||
544 | buffer.DataLength = dataLength; | 549 | buffer.DataLength = dataLength; |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index c7aeca14..e57e298 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -105,10 +105,10 @@ namespace OpenSim.Region.ClientStack | |||
105 | 105 | ||
106 | if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) | 106 | if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) |
107 | { | 107 | { |
108 | m_log.Error("[HTTP]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); | 108 | m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); |
109 | } | 109 | } |
110 | 110 | ||
111 | m_log.Info("[REGION]: Starting HTTP server"); | 111 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort); |
112 | m_httpServer.Start(); | 112 | m_httpServer.Start(); |
113 | 113 | ||
114 | base.StartupSpecific(); | 114 | base.StartupSpecific(); |
@@ -134,4 +134,4 @@ namespace OpenSim.Region.ClientStack | |||
134 | return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); | 134 | return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); |
135 | } | 135 | } |
136 | } | 136 | } |
137 | } | 137 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index acc3a78..9c8cbc6 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -286,6 +286,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
286 | fromName = avatar.Name; | 286 | fromName = avatar.Name; |
287 | sourceType = ChatSourceType.Agent; | 287 | sourceType = ChatSourceType.Agent; |
288 | } | 288 | } |
289 | else if (c.SenderUUID != UUID.Zero) | ||
290 | { | ||
291 | fromID = c.SenderUUID; | ||
292 | } | ||
289 | 293 | ||
290 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); | 294 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); |
291 | if (c.Scene != null) | 295 | if (c.Scene != null) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 1a6cd6c..4bcfaac 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -146,10 +146,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
146 | } | 146 | } |
147 | 147 | ||
148 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) | 148 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) |
149 | { | 149 | { |
150 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | ||
151 | try | 150 | try |
152 | { | 151 | { |
152 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | ||
153 | |||
153 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0) | 154 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0) |
154 | { | 155 | { |
155 | avatar.Invulnerable = false; | 156 | avatar.Invulnerable = false; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index 72ec869..6a9a962 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
79 | { | 79 | { |
80 | ScenePresence sp = m_scene.GetScenePresence(agentID); | 80 | ScenePresence sp = m_scene.GetScenePresence(agentID); |
81 | 81 | ||
82 | if (sp != null) | 82 | if (sp != null && !sp.IsChildAgent) |
83 | sp.ControllingClient.SendAgentAlertMessage(message, modal); | 83 | sp.ControllingClient.SendAgentAlertMessage(message, modal); |
84 | } | 84 | } |
85 | 85 | ||
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
91 | { | 91 | { |
92 | ScenePresence presence = presenceList[i]; | 92 | ScenePresence presence = presenceList[i]; |
93 | 93 | ||
94 | if (presence.Firstname == firstName && presence.Lastname == lastName) | 94 | if (!presence.IsChildAgent && presence.Firstname == firstName && presence.Lastname == lastName) |
95 | { | 95 | { |
96 | presence.ControllingClient.SendAgentAlertMessage(message, modal); | 96 | presence.ControllingClient.SendAgentAlertMessage(message, modal); |
97 | break; | 97 | break; |
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
130 | } | 130 | } |
131 | 131 | ||
132 | ScenePresence sp = m_scene.GetScenePresence(avatarID); | 132 | ScenePresence sp = m_scene.GetScenePresence(avatarID); |
133 | if (sp != null) | 133 | if (sp != null && !sp.IsChildAgent) |
134 | sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); | 134 | sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); |
135 | } | 135 | } |
136 | 136 | ||
@@ -139,7 +139,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
139 | { | 139 | { |
140 | ScenePresence sp = m_scene.GetScenePresence(avatarID); | 140 | ScenePresence sp = m_scene.GetScenePresence(avatarID); |
141 | 141 | ||
142 | if (sp != null) | 142 | if (sp != null && !sp.IsChildAgent) |
143 | sp.ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, message, url); | 143 | sp.ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, message, url); |
144 | } | 144 | } |
145 | 145 | ||
@@ -206,4 +206,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
206 | return result; | 206 | return result; |
207 | } | 207 | } |
208 | } | 208 | } |
209 | } | 209 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs index 27b64bf..40ffcb4 100644 --- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs | |||
@@ -131,8 +131,8 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
131 | { | 131 | { |
132 | // Start http server | 132 | // Start http server |
133 | // Attach xmlrpc handlers | 133 | // Attach xmlrpc handlers |
134 | m_log.Info("[REMOTE_DATA]: " + | 134 | m_log.Info("[XML RPC MODULE]: " + |
135 | "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); | 135 | "Starting up XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); |
136 | BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); | 136 | BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); |
137 | httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); | 137 | httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); |
138 | httpServer.Start(); | 138 | httpServer.Start(); |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
192 | // This should no longer happen, but the check is reasonable anyway | 192 | // This should no longer happen, but the check is reasonable anyway |
193 | if (null == m_openChannels) | 193 | if (null == m_openChannels) |
194 | { | 194 | { |
195 | m_log.Warn("[RemoteDataReply] Attempt to open channel before initialization is complete"); | 195 | m_log.Warn("[XML RPC MODULE]: Attempt to open channel before initialization is complete"); |
196 | return newChannel; | 196 | return newChannel; |
197 | } | 197 | } |
198 | 198 | ||
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
279 | } | 279 | } |
280 | else | 280 | else |
281 | { | 281 | { |
282 | m_log.Warn("[RemoteDataReply]: Channel or message_id not found"); | 282 | m_log.Warn("[XML RPC MODULE]: Channel or message_id not found"); |
283 | } | 283 | } |
284 | } | 284 | } |
285 | 285 | ||
@@ -340,7 +340,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
340 | } | 340 | } |
341 | else | 341 | else |
342 | { | 342 | { |
343 | m_log.Error("UNABLE TO REMOVE COMPLETED REQUEST"); | 343 | m_log.Error("[XML RPC MODULE]: UNABLE TO REMOVE COMPLETED REQUEST"); |
344 | } | 344 | } |
345 | } | 345 | } |
346 | } | 346 | } |
@@ -728,4 +728,4 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
728 | return ReqID; | 728 | return ReqID; |
729 | } | 729 | } |
730 | } | 730 | } |
731 | } | 731 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs index d68c683..4abc215 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs | |||
@@ -260,7 +260,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
260 | { | 260 | { |
261 | if (s.RegionInfo.RegionHandle == regionHandle) | 261 | if (s.RegionInfo.RegionHandle == regionHandle) |
262 | { | 262 | { |
263 | //m_log.Debug("[LOCAL COMMS]: Found region to SendCreateObject"); | 263 | m_log.Debug("[LOCAL COMMS]: Found region to SendCreateObject"); |
264 | if (isLocalCall) | 264 | if (isLocalCall) |
265 | { | 265 | { |
266 | // We need to make a local copy of the object | 266 | // We need to make a local copy of the object |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 191e859..cabd51c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -314,10 +314,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
314 | { | 314 | { |
315 | // m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); | 315 | // m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); |
316 | 316 | ||
317 | UUID requestedItemId = item.ID; | ||
318 | |||
317 | item = m_InventoryService.GetItem(item); | 319 | item = m_InventoryService.GetItem(item); |
318 | 320 | ||
319 | if (null == item) | 321 | if (null == item) |
320 | m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}", item.ID); | 322 | m_log.ErrorFormat( |
323 | "[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}", requestedItemId); | ||
321 | 324 | ||
322 | return item; | 325 | return item; |
323 | } | 326 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index e6d4549..4999508 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
275 | part.TaskInventory.LockItemsForRead(false); | 275 | part.TaskInventory.LockItemsForRead(false); |
276 | } | 276 | } |
277 | 277 | ||
278 | if (m_scene.AddRestoredSceneObject(sceneObject, true, false)) | 278 | if (!m_scene.AddRestoredSceneObject(sceneObject, true, false)) |
279 | { | 279 | { |
280 | sceneObjectsLoadedCount++; | 280 | sceneObjectsLoadedCount++; |
281 | sceneObject.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, 0); | 281 | sceneObject.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, 0); |
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs index 8980b2d..9683da0 100644 --- a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs | |||
@@ -37,6 +37,37 @@ namespace OpenSim.Region.Framework.Interfaces | |||
37 | { | 37 | { |
38 | event NewGroupNotice OnNewGroupNotice; | 38 | event NewGroupNotice OnNewGroupNotice; |
39 | 39 | ||
40 | /// <summary> | ||
41 | /// Create a group | ||
42 | /// </summary> | ||
43 | /// <param name="remoteClient"></param> | ||
44 | /// <param name="name"></param> | ||
45 | /// <param name="charter"></param> | ||
46 | /// <param name="showInList"></param> | ||
47 | /// <param name="insigniaID"></param> | ||
48 | /// <param name="membershipFee"></param> | ||
49 | /// <param name="openEnrollment"></param> | ||
50 | /// <param name="allowPublish"></param> | ||
51 | /// <param name="maturePublish"></param> | ||
52 | /// <returns>The UUID of the created group</returns> | ||
53 | UUID CreateGroup( | ||
54 | IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, | ||
55 | bool openEnrollment, bool allowPublish, bool maturePublish); | ||
56 | |||
57 | /// <summary> | ||
58 | /// Get a group | ||
59 | /// </summary> | ||
60 | /// <param name="name">Name of the group</param> | ||
61 | /// <returns>The group's data. Null if there is no such group.</returns> | ||
62 | GroupRecord GetGroupRecord(string name); | ||
63 | |||
64 | /// <summary> | ||
65 | /// Get a group | ||
66 | /// </summary> | ||
67 | /// <param name="GroupID">ID of the group</param> | ||
68 | /// <returns>The group's data. Null if there is no such group.</returns> | ||
69 | GroupRecord GetGroupRecord(UUID GroupID); | ||
70 | |||
40 | void ActivateGroup(IClientAPI remoteClient, UUID groupID); | 71 | void ActivateGroup(IClientAPI remoteClient, UUID groupID); |
41 | List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID); | 72 | List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID); |
42 | List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID); | 73 | List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID); |
@@ -51,7 +82,6 @@ namespace OpenSim.Region.Framework.Interfaces | |||
51 | void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); | 82 | void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); |
52 | 83 | ||
53 | void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); | 84 | void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); |
54 | UUID CreateGroup(IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); | ||
55 | 85 | ||
56 | GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); | 86 | GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); |
57 | string GetGroupTitle(UUID avatarID); | 87 | string GetGroupTitle(UUID avatarID); |
@@ -64,7 +94,6 @@ namespace OpenSim.Region.Framework.Interfaces | |||
64 | void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID); | 94 | void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID); |
65 | void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID); | 95 | void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID); |
66 | void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID); | 96 | void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID); |
67 | GroupRecord GetGroupRecord(UUID GroupID); | ||
68 | void NotifyChange(UUID GroupID); | 97 | void NotifyChange(UUID GroupID); |
69 | } | 98 | } |
70 | } | 99 | } |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 7fb1cd8..8d2ec0f 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -107,21 +107,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
107 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; | 107 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; |
108 | 108 | ||
109 | /// <summary> | 109 | /// <summary> |
110 | /// Called when an object is touched/grabbed. | 110 | /// Fired when an object is touched/grabbed. |
111 | /// </summary> | 111 | /// </summary> |
112 | /// The originalID is the local ID of the part that was actually touched. The localID itself is always that of | 112 | /// The originalID is the local ID of the part that was actually touched. The localID itself is always that of |
113 | /// the root part. | 113 | /// the root part. |
114 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | ||
115 | public event ObjectGrabDelegate OnObjectGrab; | 114 | public event ObjectGrabDelegate OnObjectGrab; |
115 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | ||
116 | 116 | ||
117 | public event ObjectGrabDelegate OnObjectGrabbing; | 117 | public event ObjectGrabDelegate OnObjectGrabbing; |
118 | public event ObjectDeGrabDelegate OnObjectDeGrab; | 118 | public event ObjectDeGrabDelegate OnObjectDeGrab; |
119 | public event ScriptResetDelegate OnScriptReset; | 119 | public event ScriptResetDelegate OnScriptReset; |
120 | 120 | ||
121 | public event OnPermissionErrorDelegate OnPermissionError; | 121 | public event OnPermissionErrorDelegate OnPermissionError; |
122 | 122 | ||
123 | public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); | 123 | /// <summary> |
124 | /// Fired when a new script is created. | ||
125 | /// </summary> | ||
124 | public event NewRezScript OnRezScript; | 126 | public event NewRezScript OnRezScript; |
127 | public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); | ||
125 | 128 | ||
126 | public delegate void RemoveScript(uint localID, UUID itemID); | 129 | public delegate void RemoveScript(uint localID, UUID itemID); |
127 | public event RemoveScript OnRemoveScript; | 130 | public event RemoveScript OnRemoveScript; |
@@ -163,38 +166,35 @@ namespace OpenSim.Region.Framework.Scenes | |||
163 | 166 | ||
164 | public delegate void ClientClosed(UUID clientID, Scene scene); | 167 | public delegate void ClientClosed(UUID clientID, Scene scene); |
165 | 168 | ||
166 | public event ClientClosed OnClientClosed; | 169 | public event ClientClosed OnClientClosed; |
167 | |||
168 | public delegate void ScriptChangedEvent(uint localID, uint change); | ||
169 | 170 | ||
171 | /// <summary> | ||
172 | /// This is fired when a scene object property that a script might be interested in (such as color, scale or | ||
173 | /// inventory) changes. Only enough information is sent for the LSL changed event | ||
174 | /// (see http://lslwiki.net/lslwiki/wakka.php?wakka=changed) | ||
175 | /// </summary> | ||
170 | public event ScriptChangedEvent OnScriptChangedEvent; | 176 | public event ScriptChangedEvent OnScriptChangedEvent; |
177 | public delegate void ScriptChangedEvent(uint localID, uint change); | ||
171 | 178 | ||
172 | public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed); | 179 | public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed); |
173 | |||
174 | public event ScriptControlEvent OnScriptControlEvent; | 180 | public event ScriptControlEvent OnScriptControlEvent; |
175 | 181 | ||
176 | public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); | 182 | public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); |
177 | |||
178 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; | 183 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; |
179 | 184 | ||
180 | public delegate void ScriptNotAtTargetEvent(uint localID); | 185 | public delegate void ScriptNotAtTargetEvent(uint localID); |
181 | |||
182 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; | 186 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; |
183 | 187 | ||
184 | public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot); | 188 | public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot); |
185 | |||
186 | public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent; | 189 | public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent; |
187 | 190 | ||
188 | public delegate void ScriptNotAtRotTargetEvent(uint localID); | 191 | public delegate void ScriptNotAtRotTargetEvent(uint localID); |
189 | |||
190 | public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent; | 192 | public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent; |
191 | 193 | ||
192 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); | 194 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); |
193 | |||
194 | public event ScriptColliding OnScriptColliderStart; | 195 | public event ScriptColliding OnScriptColliderStart; |
195 | public event ScriptColliding OnScriptColliding; | 196 | public event ScriptColliding OnScriptColliding; |
196 | public event ScriptColliding OnScriptCollidingEnd; | 197 | public event ScriptColliding OnScriptCollidingEnd; |
197 | |||
198 | public event ScriptColliding OnScriptLandColliderStart; | 198 | public event ScriptColliding OnScriptLandColliderStart; |
199 | public event ScriptColliding OnScriptLandColliding; | 199 | public event ScriptColliding OnScriptLandColliding; |
200 | public event ScriptColliding OnScriptLandColliderEnd; | 200 | public event ScriptColliding OnScriptLandColliderEnd; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index ba70ae5..4019c12 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -532,7 +532,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
532 | return null; | 532 | return null; |
533 | } | 533 | } |
534 | 534 | ||
535 | |||
536 | if (recipientParentFolderId == UUID.Zero) | 535 | if (recipientParentFolderId == UUID.Zero) |
537 | { | 536 | { |
538 | InventoryFolderBase recipientRootFolder = InventoryService.GetRootFolder(recipientId); | 537 | InventoryFolderBase recipientRootFolder = InventoryService.GetRootFolder(recipientId); |
@@ -2086,7 +2085,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2086 | group.RootPart.IsAttachment = true; | 2085 | group.RootPart.IsAttachment = true; |
2087 | } | 2086 | } |
2088 | 2087 | ||
2089 | AddNewSceneObject(group, true); | 2088 | // If we're rezzing an attachment then don't ask AddNewSceneObject() to update the client since |
2089 | // we'll be doing that later on. Scheduling more than one full update during the attachment | ||
2090 | // process causes some clients to fail to display the attachment properly. | ||
2091 | AddNewSceneObject(group, true, !attachment); | ||
2090 | 2092 | ||
2091 | // m_log.InfoFormat("ray end point for inventory rezz is {0} {1} {2} ", RayEnd.X, RayEnd.Y, RayEnd.Z); | 2093 | // m_log.InfoFormat("ray end point for inventory rezz is {0} {1} {2} ", RayEnd.X, RayEnd.Y, RayEnd.Z); |
2092 | // if attachment we set it's asset id so object updates can reflect that | 2094 | // if attachment we set it's asset id so object updates can reflect that |
@@ -2456,6 +2458,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2456 | return; | 2458 | return; |
2457 | } | 2459 | } |
2458 | 2460 | ||
2461 | m_log.DebugFormat("[SCENE INVENTORY]: {0} {1} IsAttachment={2}", att.Name, att.LocalId, att.IsAttachment); | ||
2462 | Console.WriteLine("HERE X"); | ||
2459 | ScenePresence presence; | 2463 | ScenePresence presence; |
2460 | if (TryGetAvatar(remoteClient.AgentId, out presence)) | 2464 | if (TryGetAvatar(remoteClient.AgentId, out presence)) |
2461 | { | 2465 | { |
@@ -2463,9 +2467,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2463 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 2467 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
2464 | item = InventoryService.GetItem(item); | 2468 | item = InventoryService.GetItem(item); |
2465 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); | 2469 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); |
2470 | Console.WriteLine("HERE Y"); | ||
2466 | 2471 | ||
2467 | if (m_AvatarFactory != null) | 2472 | if (m_AvatarFactory != null) |
2468 | m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | 2473 | m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); |
2474 | |||
2475 | Console.WriteLine("HERE Z"); | ||
2469 | } | 2476 | } |
2470 | } | 2477 | } |
2471 | 2478 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index ac04dc7..d8e604f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -124,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
124 | { | 124 | { |
125 | if (((SceneObjectGroup)ent).LocalId == primLocalID) | 125 | if (((SceneObjectGroup)ent).LocalId == primLocalID) |
126 | { | 126 | { |
127 | m_log.DebugFormat("[SCENE]: Received full update request for {0} from {1}", primLocalID, remoteClient.Name); | ||
127 | ((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient); | 128 | ((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient); |
128 | return; | 129 | return; |
129 | } | 130 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ee097bc..a3c5a03 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1891,9 +1891,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
1891 | /// true if the object was added, false if an object with the same uuid was already in the scene | 1891 | /// true if the object was added, false if an object with the same uuid was already in the scene |
1892 | /// </returns> | 1892 | /// </returns> |
1893 | public bool AddRestoredSceneObject( | 1893 | public bool AddRestoredSceneObject( |
1894 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) | ||
1895 | { | ||
1896 | return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, sendClientUpdates); | ||
1897 | } | ||
1898 | |||
1899 | /// <summary> | ||
1900 | /// Add an object into the scene that has come from storage | ||
1901 | /// </summary> | ||
1902 | /// | ||
1903 | /// <param name="sceneObject"></param> | ||
1904 | /// <param name="attachToBackup"> | ||
1905 | /// If true, changes to the object will be reflected in its persisted data | ||
1906 | /// If false, the persisted data will not be changed even if the object in the scene is changed | ||
1907 | /// </param> | ||
1908 | /// <param name="alreadyPersisted"> | ||
1909 | /// If true, we won't persist this object until it changes | ||
1910 | /// If false, we'll persist this object immediately | ||
1911 | /// </param> | ||
1912 | /// <returns> | ||
1913 | /// true if the object was added, false if an object with the same uuid was already in the scene | ||
1914 | /// </returns> | ||
1915 | public bool AddRestoredSceneObject( | ||
1894 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | 1916 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) |
1895 | { | 1917 | { |
1896 | return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted); | 1918 | return AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true); |
1897 | } | 1919 | } |
1898 | 1920 | ||
1899 | /// <summary> | 1921 | /// <summary> |
@@ -1927,7 +1949,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1927 | } | 1949 | } |
1928 | 1950 | ||
1929 | /// <summary> | 1951 | /// <summary> |
1930 | /// Delete every object from the scene | 1952 | /// Delete every object from the scene. This does not include attachments worn by avatars. |
1931 | /// </summary> | 1953 | /// </summary> |
1932 | public void DeleteAllSceneObjects() | 1954 | public void DeleteAllSceneObjects() |
1933 | { | 1955 | { |
@@ -1938,7 +1960,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1938 | foreach (EntityBase e in entities) | 1960 | foreach (EntityBase e in entities) |
1939 | { | 1961 | { |
1940 | if (e is SceneObjectGroup) | 1962 | if (e is SceneObjectGroup) |
1941 | DeleteSceneObject((SceneObjectGroup)e, false); | 1963 | { |
1964 | SceneObjectGroup sog = (SceneObjectGroup)e; | ||
1965 | if (!sog.IsAttachment) | ||
1966 | DeleteSceneObject((SceneObjectGroup)e, false); | ||
1967 | } | ||
1942 | } | 1968 | } |
1943 | } | 1969 | } |
1944 | } | 1970 | } |
@@ -2502,7 +2528,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2502 | /// <returns></returns> | 2528 | /// <returns></returns> |
2503 | public bool IncomingCreateObject(ISceneObject sog) | 2529 | public bool IncomingCreateObject(ISceneObject sog) |
2504 | { | 2530 | { |
2505 | //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2531 | m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); |
2506 | SceneObjectGroup newObject; | 2532 | SceneObjectGroup newObject; |
2507 | try | 2533 | try |
2508 | { | 2534 | { |
@@ -2574,10 +2600,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2574 | 2600 | ||
2575 | if (sceneObject.IsAttachmentCheckFull()) // Attachment | 2601 | if (sceneObject.IsAttachmentCheckFull()) // Attachment |
2576 | { | 2602 | { |
2603 | m_log.DebugFormat("[SCENE]: Adding attachment {0} {1}", sceneObject.Name, sceneObject.LocalId); | ||
2604 | |||
2577 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); | 2605 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); |
2578 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); | 2606 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); |
2579 | 2607 | ||
2580 | AddRestoredSceneObject(sceneObject, false, false); | 2608 | AddRestoredSceneObject(sceneObject, false, false, false); |
2581 | 2609 | ||
2582 | // Handle attachment special case | 2610 | // Handle attachment special case |
2583 | SceneObjectPart RootPrim = sceneObject.RootPart; | 2611 | SceneObjectPart RootPrim = sceneObject.RootPart; |
@@ -2585,6 +2613,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2585 | // Fix up attachment Parent Local ID | 2613 | // Fix up attachment Parent Local ID |
2586 | ScenePresence sp = GetScenePresence(sceneObject.OwnerID); | 2614 | ScenePresence sp = GetScenePresence(sceneObject.OwnerID); |
2587 | 2615 | ||
2616 | Console.WriteLine("AAAA"); | ||
2617 | |||
2588 | //uint parentLocalID = 0; | 2618 | //uint parentLocalID = 0; |
2589 | if (sp != null) | 2619 | if (sp != null) |
2590 | { | 2620 | { |
@@ -2603,20 +2633,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
2603 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); | 2633 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); |
2604 | m_log.DebugFormat( | 2634 | m_log.DebugFormat( |
2605 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); | 2635 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); |
2606 | 2636 | ||
2637 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | ||
2607 | AttachObject( | 2638 | AttachObject( |
2608 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); | 2639 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); |
2609 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2640 | |
2610 | grp.SendGroupFullUpdate(); | 2641 | //grp.SendGroupFullUpdate(); |
2611 | } | 2642 | } |
2612 | else | 2643 | else |
2613 | { | 2644 | { |
2614 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2645 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2615 | RootPrim.AddFlag(PrimFlags.TemporaryOnRez); | 2646 | RootPrim.AddFlag(PrimFlags.TemporaryOnRez); |
2616 | } | 2647 | } |
2648 | |||
2649 | Console.WriteLine("BBBB"); | ||
2617 | } | 2650 | } |
2618 | else | 2651 | else |
2619 | { | 2652 | { |
2653 | m_log.DebugFormat("[SCENE]: Adding ordinary object {0} {1}", sceneObject.Name, sceneObject.LocalId); | ||
2654 | |||
2620 | AddRestoredSceneObject(sceneObject, true, false); | 2655 | AddRestoredSceneObject(sceneObject, true, false); |
2621 | 2656 | ||
2622 | if (!Permissions.CanObjectEntry(sceneObject.UUID, | 2657 | if (!Permissions.CanObjectEntry(sceneObject.UUID, |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 04626d3..9153069 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -1410,7 +1410,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1410 | // now we have a child agent in this region. Request all interesting data about other (root) agents | 1410 | // now we have a child agent in this region. Request all interesting data about other (root) agents |
1411 | agent.SendInitialFullUpdateToAllClients(); | 1411 | agent.SendInitialFullUpdateToAllClients(); |
1412 | 1412 | ||
1413 | Console.WriteLine("SCS 1"); | ||
1413 | agent.CrossAttachmentsIntoNewRegion(neighbourHandle, true); | 1414 | agent.CrossAttachmentsIntoNewRegion(neighbourHandle, true); |
1415 | Console.WriteLine("SCS 2"); | ||
1414 | 1416 | ||
1415 | // m_scene.SendKillObject(m_localId); | 1417 | // m_scene.SendKillObject(m_localId); |
1416 | 1418 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 090f379..fb01140 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -216,11 +216,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
216 | /// If true, we won't persist this object until it changes | 216 | /// If true, we won't persist this object until it changes |
217 | /// If false, we'll persist this object immediately | 217 | /// If false, we'll persist this object immediately |
218 | /// </param> | 218 | /// </param> |
219 | /// <param name="sendClientUpdate"> | ||
220 | /// If true, we send updates to the client to tell it about this object | ||
221 | /// If false, we leave it up to the caller to do this | ||
222 | /// </param> | ||
219 | /// <returns> | 223 | /// <returns> |
220 | /// true if the object was added, false if an object with the same uuid was already in the scene | 224 | /// true if the object was added, false if an object with the same uuid was already in the scene |
221 | /// </returns> | 225 | /// </returns> |
222 | protected internal bool AddRestoredSceneObject( | 226 | protected internal bool AddRestoredSceneObject( |
223 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | 227 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) |
224 | { | 228 | { |
225 | // KF: Check for out-of-region, move inside and make static. | 229 | // KF: Check for out-of-region, move inside and make static. |
226 | Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, | 230 | Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, |
@@ -252,8 +256,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
252 | sceneObject.HasGroupChanged = true; | 256 | sceneObject.HasGroupChanged = true; |
253 | } | 257 | } |
254 | 258 | ||
255 | return AddSceneObject(sceneObject, attachToBackup, true); | 259 | return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
256 | } | 260 | } |
261 | |||
262 | // /// <summary> | ||
263 | // /// Add an object into the scene that has come from storage | ||
264 | // /// </summary> | ||
265 | // /// <param name="sceneObject"></param> | ||
266 | // /// <param name="attachToBackup"> | ||
267 | // /// If true, changes to the object will be reflected in its persisted data | ||
268 | // /// If false, the persisted data will not be changed even if the object in the scene is changed | ||
269 | // /// </param> | ||
270 | // /// <param name="alreadyPersisted"> | ||
271 | // /// If true, we won't persist this object until it changes | ||
272 | // /// If false, we'll persist this object immediately | ||
273 | // /// </param> | ||
274 | // /// <returns> | ||
275 | // /// true if the object was added, false if an object with the same uuid was already in the scene | ||
276 | // /// </returns> | ||
277 | // protected internal bool AddRestoredSceneObject( | ||
278 | // SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | ||
279 | // { | ||
280 | // AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true); | ||
281 | // } | ||
257 | 282 | ||
258 | /// <summary> | 283 | /// <summary> |
259 | /// Add a newly created object to the scene. This will both update the scene, and send information about the | 284 | /// Add a newly created object to the scene. This will both update the scene, and send information about the |
@@ -560,7 +585,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
560 | // m_log.DebugFormat( | 585 | // m_log.DebugFormat( |
561 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", | 586 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", |
562 | // objatt.Name, remoteClient.Name, AttachmentPt); | 587 | // objatt.Name, remoteClient.Name, AttachmentPt); |
563 | |||
564 | if (objatt != null) | 588 | if (objatt != null) |
565 | { | 589 | { |
566 | bool tainted = false; | 590 | bool tainted = false; |
@@ -648,11 +672,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
648 | protected internal bool AttachObject( | 672 | protected internal bool AttachObject( |
649 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) | 673 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) |
650 | { | 674 | { |
675 | Console.WriteLine("HERE A"); | ||
651 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); | 676 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); |
652 | if (group != null) | 677 | if (group != null) |
653 | { | 678 | { |
654 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) | 679 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) |
655 | { | 680 | { |
681 | Console.WriteLine("HERE -1"); | ||
656 | // If the attachment point isn't the same as the one previously used | 682 | // If the attachment point isn't the same as the one previously used |
657 | // set it's offset position = 0 so that it appears on the attachment point | 683 | // set it's offset position = 0 so that it appears on the attachment point |
658 | // and not in a weird location somewhere unknown. | 684 | // and not in a weird location somewhere unknown. |
@@ -691,9 +717,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
691 | itemId = group.GetFromItemID(); | 717 | itemId = group.GetFromItemID(); |
692 | } | 718 | } |
693 | 719 | ||
720 | Console.WriteLine("HERE 0"); | ||
694 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); | 721 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); |
695 | 722 | ||
723 | Console.WriteLine("HERE 1"); | ||
696 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); | 724 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); |
725 | Console.WriteLine("HERE 2"); | ||
697 | // In case it is later dropped again, don't let | 726 | // In case it is later dropped again, don't let |
698 | // it get cleaned up | 727 | // it get cleaned up |
699 | // | 728 | // |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 13d1d4e..318357d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1651,6 +1651,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1651 | 1651 | ||
1652 | public void SendFullUpdateToClient(IClientAPI remoteClient) | 1652 | public void SendFullUpdateToClient(IClientAPI remoteClient) |
1653 | { | 1653 | { |
1654 | if (IsAttachment) | ||
1655 | m_log.DebugFormat( | ||
1656 | "[SOG]: Sending full update to client {0} for {1} {2}", remoteClient.Name, Name, LocalId); | ||
1657 | |||
1654 | SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); | 1658 | SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); |
1655 | 1659 | ||
1656 | lockPartsForRead(true); | 1660 | lockPartsForRead(true); |
@@ -1673,8 +1677,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1673 | /// <param name="part"></param> | 1677 | /// <param name="part"></param> |
1674 | internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags) | 1678 | internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags) |
1675 | { | 1679 | { |
1676 | // m_log.DebugFormat( | 1680 | if (IsAttachment) |
1677 | // "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); | 1681 | m_log.DebugFormat( |
1682 | "[SOG]: Sending part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); | ||
1678 | 1683 | ||
1679 | if (m_rootPart.UUID == part.UUID) | 1684 | if (m_rootPart.UUID == part.UUID) |
1680 | { | 1685 | { |
@@ -2186,7 +2191,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2186 | 2191 | ||
2187 | public void ScheduleFullUpdateToAvatar(ScenePresence presence) | 2192 | public void ScheduleFullUpdateToAvatar(ScenePresence presence) |
2188 | { | 2193 | { |
2189 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name); | 2194 | if (IsAttachment) |
2195 | m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name); | ||
2190 | 2196 | ||
2191 | RootPart.AddFullUpdateToAvatar(presence); | 2197 | RootPart.AddFullUpdateToAvatar(presence); |
2192 | 2198 | ||
@@ -2222,7 +2228,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2222 | /// </summary> | 2228 | /// </summary> |
2223 | public void ScheduleGroupForFullUpdate() | 2229 | public void ScheduleGroupForFullUpdate() |
2224 | { | 2230 | { |
2225 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID); | 2231 | if (IsAttachment) |
2232 | m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID); | ||
2226 | 2233 | ||
2227 | checkAtTargets(); | 2234 | checkAtTargets(); |
2228 | RootPart.ScheduleFullUpdate(); | 2235 | RootPart.ScheduleFullUpdate(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 548a64f..3a101cc 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1270,16 +1270,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
1270 | /// Tell all scene presences that they should send updates for this part to their clients | 1270 | /// Tell all scene presences that they should send updates for this part to their clients |
1271 | /// </summary> | 1271 | /// </summary> |
1272 | public void AddFullUpdateToAllAvatars() | 1272 | public void AddFullUpdateToAllAvatars() |
1273 | { | 1273 | { |
1274 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 1274 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
1275 | for (int i = 0; i < avatars.Length; i++) | 1275 | for (int i = 0; i < avatars.Length; i++) |
1276 | { | 1276 | AddFullUpdateToAvatar(avatars[i]); |
1277 | avatars[i].SceneViewer.QueuePartForUpdate(this); | ||
1278 | } | ||
1279 | } | 1277 | } |
1280 | 1278 | ||
1281 | public void AddFullUpdateToAvatar(ScenePresence presence) | 1279 | public void AddFullUpdateToAvatar(ScenePresence presence) |
1282 | { | 1280 | { |
1281 | if (IsAttachment) | ||
1282 | m_log.DebugFormat("AddFullUpdateToAllAvatar() {0} for {1} {2}", presence.Name, Name, LocalId); | ||
1283 | |||
1283 | presence.SceneViewer.QueuePartForUpdate(this); | 1284 | presence.SceneViewer.QueuePartForUpdate(this); |
1284 | } | 1285 | } |
1285 | 1286 | ||
@@ -1298,13 +1299,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1298 | { | 1299 | { |
1299 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 1300 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
1300 | for (int i = 0; i < avatars.Length; i++) | 1301 | for (int i = 0; i < avatars.Length; i++) |
1301 | { | 1302 | AddTerseUpdateToAvatar(avatars[i]); |
1302 | avatars[i].SceneViewer.QueuePartForUpdate(this); | ||
1303 | } | ||
1304 | } | 1303 | } |
1305 | 1304 | ||
1306 | public void AddTerseUpdateToAvatar(ScenePresence presence) | 1305 | public void AddTerseUpdateToAvatar(ScenePresence presence) |
1307 | { | 1306 | { |
1307 | if (IsAttachment) | ||
1308 | m_log.DebugFormat("AddTerseUpdateToAvatar() {0} for {1} {2}", presence.Name, Name, LocalId); | ||
1309 | |||
1308 | presence.SceneViewer.QueuePartForUpdate(this); | 1310 | presence.SceneViewer.QueuePartForUpdate(this); |
1309 | } | 1311 | } |
1310 | 1312 | ||
@@ -2713,7 +2715,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2713 | /// </summary> | 2715 | /// </summary> |
2714 | public void ScheduleFullUpdate() | 2716 | public void ScheduleFullUpdate() |
2715 | { | 2717 | { |
2716 | // m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); | 2718 | if (IsAttachment) |
2719 | m_log.DebugFormat("[SOP]: Scheduling full update for {0} {1}", Name, LocalId); | ||
2717 | 2720 | ||
2718 | if (m_parentGroup != null) | 2721 | if (m_parentGroup != null) |
2719 | { | 2722 | { |
@@ -2826,6 +2829,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2826 | /// <param name="remoteClient"></param> | 2829 | /// <param name="remoteClient"></param> |
2827 | public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) | 2830 | public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) |
2828 | { | 2831 | { |
2832 | if (IsAttachment) | ||
2833 | m_log.DebugFormat( | ||
2834 | "[SCENE OBJECT PART]: Sending part full update to {0} for {1} {2}", remoteClient.Name, Name, LocalId); | ||
2835 | |||
2829 | m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags); | 2836 | m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags); |
2830 | } | 2837 | } |
2831 | 2838 | ||
@@ -2834,6 +2841,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2834 | /// </summary> | 2841 | /// </summary> |
2835 | public void SendFullUpdateToAllClients() | 2842 | public void SendFullUpdateToAllClients() |
2836 | { | 2843 | { |
2844 | if (IsAttachment) | ||
2845 | m_log.DebugFormat( | ||
2846 | "[SCENE OBJECT PART]: Sending full update for {0} {1} for all clients", Name, LocalId); | ||
2847 | |||
2837 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 2848 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
2838 | for (int i = 0; i < avatars.Length; i++) | 2849 | for (int i = 0; i < avatars.Length; i++) |
2839 | { | 2850 | { |
@@ -2845,6 +2856,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2845 | 2856 | ||
2846 | public void SendFullUpdateToAllClientsExcept(UUID agentID) | 2857 | public void SendFullUpdateToAllClientsExcept(UUID agentID) |
2847 | { | 2858 | { |
2859 | if (IsAttachment) | ||
2860 | m_log.DebugFormat( | ||
2861 | "[SCENE OBJECT PART]: Sending full update for {0} {1} to all clients except {2}", Name, LocalId, agentID); | ||
2862 | |||
2848 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 2863 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
2849 | for (int i = 0; i < avatars.Length; i++) | 2864 | for (int i = 0; i < avatars.Length; i++) |
2850 | { | 2865 | { |
@@ -2953,6 +2968,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2953 | { | 2968 | { |
2954 | if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes | 2969 | if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes |
2955 | { | 2970 | { |
2971 | if (IsAttachment) | ||
2972 | m_log.DebugFormat("[SOP]: Sending scheduled full update for {0} {1}", Name, LocalId); | ||
2973 | |||
2956 | AddFullUpdateToAllAvatars(); | 2974 | AddFullUpdateToAllAvatars(); |
2957 | m_updateFlag = 0; //Same here | 2975 | m_updateFlag = 0; //Same here |
2958 | } | 2976 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index 1cff0eb..f88605b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | ||
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
31 | using log4net; | 32 | using log4net; |
32 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -39,6 +40,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
39 | { | 40 | { |
40 | public class SceneViewer : ISceneViewer | 41 | public class SceneViewer : ISceneViewer |
41 | { | 42 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
42 | protected ScenePresence m_presence; | 45 | protected ScenePresence m_presence; |
43 | protected UpdateQueue m_partsUpdateQueue = new UpdateQueue(); | 46 | protected UpdateQueue m_partsUpdateQueue = new UpdateQueue(); |
44 | protected Queue<SceneObjectGroup> m_pendingObjects; | 47 | protected Queue<SceneObjectGroup> m_pendingObjects; |
@@ -60,6 +63,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
60 | /// <param name="part"></param> | 63 | /// <param name="part"></param> |
61 | public void QueuePartForUpdate(SceneObjectPart part) | 64 | public void QueuePartForUpdate(SceneObjectPart part) |
62 | { | 65 | { |
66 | if (part.IsAttachment) | ||
67 | m_log.DebugFormat("[SCENE VIEWER]: Queueing part {0} {1} for update", part.Name, part.LocalId); | ||
68 | |||
63 | lock (m_partsUpdateQueue) | 69 | lock (m_partsUpdateQueue) |
64 | { | 70 | { |
65 | m_partsUpdateQueue.Enqueue(part); | 71 | m_partsUpdateQueue.Enqueue(part); |
@@ -134,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
134 | } | 140 | } |
135 | else if (update.LastTerseUpdateTime <= part.TimeStampTerse) | 141 | else if (update.LastTerseUpdateTime <= part.TimeStampTerse) |
136 | { | 142 | { |
137 | // m_log.DebugFormat( | 143 | // m_log.DebugFormat(AddFullUpdateToAvatar |
138 | // "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", | 144 | // "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", |
139 | // part.Name, part.UUID, part.TimeStampTerse); | 145 | // part.Name, part.UUID, part.TimeStampTerse); |
140 | 146 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index edd5af7..3e05732 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -342,7 +342,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
342 | 342 | ||
343 | private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) | 343 | private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) |
344 | { | 344 | { |
345 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 345 | if (m_debugEnabled) |
346 | { | ||
347 | m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | ||
348 | m_log.DebugFormat("[GROUPS]: remoteClient ({0}) im ({1})", remoteClient, im); | ||
349 | |||
350 | } | ||
351 | |||
346 | 352 | ||
347 | // Group invitations | 353 | // Group invitations |
348 | if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)) | 354 | if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)) |
@@ -481,7 +487,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
481 | if (member.AcceptNotices) | 487 | if (member.AcceptNotices) |
482 | { | 488 | { |
483 | // Build notice IIM | 489 | // Build notice IIM |
484 | GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); | 490 | GridInstantMessage msg = CreateGroupNoticeIM(GetRequestingAgentID(remoteClient), NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); |
485 | 491 | ||
486 | msg.toAgentID = member.AgentID.Guid; | 492 | msg.toAgentID = member.AgentID.Guid; |
487 | OutgoingInstantMessage(msg, member.AgentID); | 493 | OutgoingInstantMessage(msg, member.AgentID); |
@@ -1024,12 +1030,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1024 | 1030 | ||
1025 | public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID) | 1031 | public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID) |
1026 | { | 1032 | { |
1027 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 1033 | if (m_debugEnabled) |
1034 | { | ||
1035 | m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | ||
1036 | m_log.DebugFormat("[GROUPS]: remoteClient({0}) groupID({0}) invitedAgentID({0}) roleID({0})", remoteClient, groupID, invitedAgentID, roleID); | ||
1037 | } | ||
1038 | |||
1028 | 1039 | ||
1029 | // Todo: Security check, probably also want to send some kind of notification | 1040 | // Todo: Security check, probably also want to send some kind of notification |
1030 | UUID InviteID = UUID.Random(); | 1041 | UUID InviteID = UUID.Random(); |
1031 | 1042 | ||
1032 | m_groupData.AddAgentToGroupInvite(GetRequestingAgentID(remoteClient), InviteID, groupID, roleID, invitedAgentID); | 1043 | UUID requestingAgentID = GetRequestingAgentID(remoteClient); |
1044 | if (requestingAgentID == UUID.Zero) | ||
1045 | { | ||
1046 | m_log.Error("[GROUPS] Group Invite Requires a valid requesting agent to be specified"); | ||
1047 | } | ||
1048 | m_groupData.AddAgentToGroupInvite(requestingAgentID, InviteID, groupID, roleID, invitedAgentID); | ||
1033 | 1049 | ||
1034 | // Check to see if the invite went through, if it did not then it's possible | 1050 | // Check to see if the invite went through, if it did not then it's possible |
1035 | // the remoteClient did not validate or did not have permission to invite. | 1051 | // the remoteClient did not validate or did not have permission to invite. |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 2a60b00..861731c 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |||
@@ -40,6 +40,7 @@ using OpenMetaverse; | |||
40 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
41 | 41 | ||
42 | using OpenSim.Framework; | 42 | using OpenSim.Framework; |
43 | using OpenSim.Framework.Communications; | ||
43 | using OpenSim.Region.Framework.Interfaces; | 44 | using OpenSim.Region.Framework.Interfaces; |
44 | 45 | ||
45 | namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | 46 | namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups |
@@ -66,6 +67,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
66 | private string m_groupReadKey = string.Empty; | 67 | private string m_groupReadKey = string.Empty; |
67 | private string m_groupWriteKey = string.Empty; | 68 | private string m_groupWriteKey = string.Empty; |
68 | 69 | ||
70 | private IUserService m_userService = null; | ||
71 | private CommunicationsManager m_commManager = null; | ||
72 | |||
73 | private bool m_debugEnabled = false; | ||
74 | |||
69 | 75 | ||
70 | // Used to track which agents are have dropped from a group chat session | 76 | // Used to track which agents are have dropped from a group chat session |
71 | // Should be reset per agent, on logon | 77 | // Should be reset per agent, on logon |
@@ -110,7 +116,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
110 | 116 | ||
111 | m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name); | 117 | m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name); |
112 | 118 | ||
113 | m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); | 119 | m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", groupsConfig.GetString("XmlRpcServiceURL", string.Empty)); |
114 | if ((m_groupsServerURI == null) || | 120 | if ((m_groupsServerURI == null) || |
115 | (m_groupsServerURI == string.Empty)) | 121 | (m_groupsServerURI == string.Empty)) |
116 | { | 122 | { |
@@ -124,7 +130,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
124 | m_groupReadKey = groupsConfig.GetString("XmlRpcServiceReadKey", string.Empty); | 130 | m_groupReadKey = groupsConfig.GetString("XmlRpcServiceReadKey", string.Empty); |
125 | m_groupWriteKey = groupsConfig.GetString("XmlRpcServiceWriteKey", string.Empty); | 131 | m_groupWriteKey = groupsConfig.GetString("XmlRpcServiceWriteKey", string.Empty); |
126 | 132 | ||
127 | 133 | m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true); | |
128 | 134 | ||
129 | 135 | ||
130 | // If we got all the config options we need, lets start'er'up | 136 | // If we got all the config options we need, lets start'er'up |
@@ -142,6 +148,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
142 | if (m_connectorEnabled) | 148 | if (m_connectorEnabled) |
143 | { | 149 | { |
144 | scene.RegisterModuleInterface<IGroupsServicesConnector>(this); | 150 | scene.RegisterModuleInterface<IGroupsServicesConnector>(this); |
151 | |||
152 | if (m_userService == null) | ||
153 | { | ||
154 | m_userService = scene.CommsManager.UserService; | ||
155 | m_commManager = scene.CommsManager; | ||
156 | } | ||
145 | } | 157 | } |
146 | } | 158 | } |
147 | 159 | ||
@@ -912,7 +924,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
912 | string UserService; | 924 | string UserService; |
913 | UUID SessionID; | 925 | UUID SessionID; |
914 | GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID); | 926 | GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID); |
915 | param.Add("requestingAgentID", requestingAgentID.ToString()); | 927 | param.Add("RequestingAgentID", requestingAgentID.ToString()); |
916 | param.Add("RequestingAgentUserService", UserService); | 928 | param.Add("RequestingAgentUserService", UserService); |
917 | param.Add("RequestingSessionID", SessionID.ToString()); | 929 | param.Add("RequestingSessionID", SessionID.ToString()); |
918 | 930 | ||
@@ -920,6 +932,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
920 | param.Add("ReadKey", m_groupReadKey); | 932 | param.Add("ReadKey", m_groupReadKey); |
921 | param.Add("WriteKey", m_groupWriteKey); | 933 | param.Add("WriteKey", m_groupWriteKey); |
922 | 934 | ||
935 | if (m_debugEnabled) | ||
936 | { | ||
937 | m_log.Debug("[XMLRPCGROUPDATA] XmlRpcCall Params:"); | ||
938 | foreach (string key in param.Keys) | ||
939 | { | ||
940 | m_log.DebugFormat("[XMLRPCGROUPDATA] {0} : {1}", key, param[key]); | ||
941 | } | ||
942 | } | ||
923 | 943 | ||
924 | IList parameters = new ArrayList(); | 944 | IList parameters = new ArrayList(); |
925 | parameters.Add(param); | 945 | parameters.Add(param); |
@@ -940,10 +960,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
940 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); | 960 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); |
941 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); | 961 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); |
942 | 962 | ||
943 | foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None)) | 963 | if ((req != null) && (req.RequestResponse != null)) |
964 | { | ||
965 | foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)) | ||
944 | { | 966 | { |
945 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine); | 967 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine); |
946 | } | 968 | } |
969 | } | ||
947 | 970 | ||
948 | foreach (string key in param.Keys) | 971 | foreach (string key in param.Keys) |
949 | { | 972 | { |
@@ -955,12 +978,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
955 | return respData; | 978 | return respData; |
956 | } | 979 | } |
957 | 980 | ||
981 | |||
958 | if (resp.Value is Hashtable) | 982 | if (resp.Value is Hashtable) |
959 | { | 983 | { |
960 | Hashtable respData = (Hashtable)resp.Value; | 984 | Hashtable respData = (Hashtable)resp.Value; |
961 | if (respData.Contains("error") && !respData.Contains("succeed")) | 985 | if (respData.Contains("error") && !respData.Contains("succeed")) |
962 | { | 986 | { |
963 | LogRespDataToConsoleError(respData); | 987 | LogRespDataToConsoleError(function, respData); |
964 | } | 988 | } |
965 | 989 | ||
966 | return respData; | 990 | return respData; |
@@ -988,18 +1012,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
988 | return error; | 1012 | return error; |
989 | } | 1013 | } |
990 | 1014 | ||
991 | private void LogRespDataToConsoleError(Hashtable respData) | 1015 | private void LogRespDataToConsoleError(string function, Hashtable respData) |
992 | { | 1016 | { |
1017 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: Error data from XmlRpcGroups server method: {0}", function); | ||
993 | m_log.Error("[XMLRPCGROUPDATA]: Error:"); | 1018 | m_log.Error("[XMLRPCGROUPDATA]: Error:"); |
994 | 1019 | ||
995 | foreach (string key in respData.Keys) | 1020 | foreach (string key in respData.Keys) |
996 | { | 1021 | { |
997 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: Key: {0}", key); | 1022 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: Key: {0}", key); |
998 | 1023 | ||
999 | string[] lines = respData[key].ToString().Split(new char[] { '\n' }); | 1024 | if ((respData != null) && (respData.ContainsKey(key)) && (respData[key]!=null)) |
1000 | foreach (string line in lines) | 1025 | { |
1026 | string[] lines = respData[key].ToString().Split(new char[] { '\n' }); | ||
1027 | foreach (string line in lines) | ||
1028 | { | ||
1029 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0}", line); | ||
1030 | } | ||
1031 | } | ||
1032 | else | ||
1001 | { | 1033 | { |
1002 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0}", line); | 1034 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} : Empty/NULL", key); |
1003 | } | 1035 | } |
1004 | 1036 | ||
1005 | } | 1037 | } |
@@ -1015,23 +1047,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1015 | /// <returns></returns> | 1047 | /// <returns></returns> |
1016 | private void GetClientGroupRequestID(UUID AgentID, out string UserServiceURL, out UUID SessionID) | 1048 | private void GetClientGroupRequestID(UUID AgentID, out string UserServiceURL, out UUID SessionID) |
1017 | { | 1049 | { |
1018 | UserServiceURL = ""; | 1050 | // Default to local grid user service |
1019 | SessionID = UUID.Zero; | 1051 | UserServiceURL = m_commManager.NetworkServersInfo.UserURL; ; |
1020 | |||
1021 | 1052 | ||
1022 | // Need to rework this based on changes to User Services | 1053 | // if AgentID == UUID, there will be no SessionID. This will be true when |
1023 | /* | 1054 | // the region is requesting information for region use (object permissions for example) |
1024 | UserAccount userAccount = m_accountService.GetUserAccount(UUID.Zero,AgentID); | 1055 | SessionID = UUID.Zero; |
1025 | if (userAccount == null) | ||
1026 | { | ||
1027 | // This should be impossible. If I've been passed a reference to a client | ||
1028 | // that client should be registered with the UserService. So something | ||
1029 | // is horribly wrong somewhere. | ||
1030 | 1056 | ||
1031 | m_log.WarnFormat("[GROUPS]: Could not find a UserServiceURL for {0}", AgentID); | 1057 | // Attempt to get User Profile, for SessionID |
1058 | UserProfileData userProfile = m_userService.GetUserProfile(AgentID); | ||
1032 | 1059 | ||
1033 | } | 1060 | if ((userProfile != null) && (userProfile is ForeignUserProfileData)) |
1034 | else if (userProfile is ForeignUserProfileData) | ||
1035 | { | 1061 | { |
1036 | // They aren't from around here | 1062 | // They aren't from around here |
1037 | ForeignUserProfileData fupd = (ForeignUserProfileData)userProfile; | 1063 | ForeignUserProfileData fupd = (ForeignUserProfileData)userProfile; |
@@ -1039,13 +1065,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1039 | SessionID = fupd.CurrentAgent.SessionID; | 1065 | SessionID = fupd.CurrentAgent.SessionID; |
1040 | 1066 | ||
1041 | } | 1067 | } |
1042 | else | 1068 | else if (userProfile != null) |
1043 | { | 1069 | { |
1044 | // They're a local user, use this: | 1070 | // Local, just use the local SessionID |
1045 | UserServiceURL = m_commManager.NetworkServersInfo.UserURL; | ||
1046 | SessionID = userProfile.CurrentAgent.SessionID; | 1071 | SessionID = userProfile.CurrentAgent.SessionID; |
1047 | } | 1072 | } |
1048 | */ | 1073 | else if (AgentID != UUID.Zero) |
1074 | { | ||
1075 | // This should be impossible. If I've been passed a reference to a client | ||
1076 | // that client should be registered with the UserService. So something | ||
1077 | // is horribly wrong somewhere. | ||
1078 | |||
1079 | // m_log.WarnFormat("[XMLRPCGROUPDATA]: Could not find a UserServiceURL for {0}", AgentID); | ||
1080 | |||
1081 | } | ||
1049 | } | 1082 | } |
1050 | 1083 | ||
1051 | } | 1084 | } |
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index c653e98..672109b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs | |||
@@ -146,6 +146,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady | |||
146 | c.Position = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 30); | 146 | c.Position = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 30); |
147 | c.Sender = null; | 147 | c.Sender = null; |
148 | c.SenderUUID = UUID.Zero; | 148 | c.SenderUUID = UUID.Zero; |
149 | c.Scene = m_scene; | ||
149 | 150 | ||
150 | m_log.InfoFormat("[RegionReady]: Region \"{0}\" is ready: \"{1}\" on channel {2}", | 151 | m_log.InfoFormat("[RegionReady]: Region \"{0}\" is ready: \"{1}\" on channel {2}", |
151 | m_scene.RegionInfo.RegionName, c.Message, m_channelNotify); | 152 | m_scene.RegionInfo.RegionName, c.Message, m_channelNotify); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8c7cc34..ec7fde0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10160,90 +10160,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10160 | 10160 | ||
10161 | Notecard nc = new Notecard(); | 10161 | Notecard nc = new Notecard(); |
10162 | nc.lastRef = DateTime.Now; | 10162 | nc.lastRef = DateTime.Now; |
10163 | nc.text = ParseText(text.Replace("\r", "").Split('\n')); | 10163 | nc.text = SLUtil.ParseNotecardToList(text).ToArray(); |
10164 | m_Notecards[assetID] = nc; | 10164 | m_Notecards[assetID] = nc; |
10165 | } | 10165 | } |
10166 | } | 10166 | } |
10167 | 10167 | ||
10168 | protected static string[] ParseText(string[] input) | ||
10169 | { | ||
10170 | int idx = 0; | ||
10171 | int level = 0; | ||
10172 | List<string> output = new List<string>(); | ||
10173 | string[] words; | ||
10174 | |||
10175 | while (idx < input.Length) | ||
10176 | { | ||
10177 | if (input[idx] == "{") | ||
10178 | { | ||
10179 | level++; | ||
10180 | idx++; | ||
10181 | continue; | ||
10182 | } | ||
10183 | |||
10184 | if (input[idx]== "}") | ||
10185 | { | ||
10186 | level--; | ||
10187 | idx++; | ||
10188 | continue; | ||
10189 | } | ||
10190 | |||
10191 | switch (level) | ||
10192 | { | ||
10193 | case 0: | ||
10194 | words = input[idx].Split(' '); // Linden text ver | ||
10195 | // Notecards are created *really* empty. Treat that as "no text" (just like after saving an empty notecard) | ||
10196 | if (words.Length < 3) | ||
10197 | return new String[0]; | ||
10198 | |||
10199 | int version = int.Parse(words[3]); | ||
10200 | if (version != 2) | ||
10201 | return new String[0]; | ||
10202 | break; | ||
10203 | case 1: | ||
10204 | words = input[idx].Split(' '); | ||
10205 | if (words[0] == "LLEmbeddedItems") | ||
10206 | break; | ||
10207 | if (words[0] == "Text") | ||
10208 | { | ||
10209 | int len = int.Parse(words[2]); | ||
10210 | idx++; | ||
10211 | |||
10212 | int count = -1; | ||
10213 | |||
10214 | while (count < len) | ||
10215 | { | ||
10216 | // int l = input[idx].Length; | ||
10217 | string ln = input[idx]; | ||
10218 | |||
10219 | int need = len-count-1; | ||
10220 | if (ln.Length > need) | ||
10221 | ln = ln.Substring(0, need); | ||
10222 | |||
10223 | output.Add(ln); | ||
10224 | count += ln.Length + 1; | ||
10225 | idx++; | ||
10226 | } | ||
10227 | |||
10228 | return output.ToArray(); | ||
10229 | } | ||
10230 | break; | ||
10231 | case 2: | ||
10232 | words = input[idx].Split(' '); // count | ||
10233 | if (words[0] == "count") | ||
10234 | { | ||
10235 | int c = int.Parse(words[1]); | ||
10236 | if (c > 0) | ||
10237 | return new String[0]; | ||
10238 | break; | ||
10239 | } | ||
10240 | break; | ||
10241 | } | ||
10242 | idx++; | ||
10243 | } | ||
10244 | return output.ToArray(); | ||
10245 | } | ||
10246 | |||
10247 | public static bool IsCached(UUID assetID) | 10168 | public static bool IsCached(UUID assetID) |
10248 | { | 10169 | { |
10249 | lock (m_Notecards) | 10170 | lock (m_Notecards) |
@@ -10299,4 +10220,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10299 | } | 10220 | } |
10300 | } | 10221 | } |
10301 | } | 10222 | } |
10302 | } | 10223 | } \ No newline at end of file |
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs index 77184a4..9e4593e 100644 --- a/OpenSim/Server/Base/HttpServerBase.cs +++ b/OpenSim/Server/Base/HttpServerBase.cs | |||
@@ -71,6 +71,8 @@ namespace OpenSim.Server.Base | |||
71 | return m_Servers[port]; | 71 | return m_Servers[port]; |
72 | 72 | ||
73 | m_Servers[port] = new BaseHttpServer(port); | 73 | m_Servers[port] = new BaseHttpServer(port); |
74 | |||
75 | m_Log.InfoFormat("[SERVER]: Starting new HTTP server on port {0}", port); | ||
74 | m_Servers[port].Start(); | 76 | m_Servers[port].Start(); |
75 | 77 | ||
76 | return m_Servers[port]; | 78 | return m_Servers[port]; |
@@ -109,6 +111,7 @@ namespace OpenSim.Server.Base | |||
109 | 111 | ||
110 | protected override void Initialise() | 112 | protected override void Initialise() |
111 | { | 113 | { |
114 | m_Log.InfoFormat("[SERVER]: Starting HTTP server on port {0}", m_HttpServer.Port); | ||
112 | m_HttpServer.Start(); | 115 | m_HttpServer.Start(); |
113 | 116 | ||
114 | if (MainConsole.Instance is RemoteConsole) | 117 | if (MainConsole.Instance is RemoteConsole) |