aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS.txt2
-rw-r--r--OpenSim/Addons/Groups/GroupsMessagingModule.cs10
-rw-r--r--OpenSim/Addons/Groups/GroupsModule.cs2
-rw-r--r--OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs4
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs2
-rw-r--r--OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLGroupsData.cs6
-rw-r--r--OpenSim/Data/MySQL/MySQLUserProfilesData.cs4
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs5
-rw-r--r--OpenSim/Framework/PluginLoader.cs13
-rw-r--r--OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs16
-rw-r--r--OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs3
-rw-r--r--OpenSim/Framework/Util.cs41
-rw-r--r--OpenSim/Region/Application/OpenSim.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs25
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs5
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs66
-rw-r--r--OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs5
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs136
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs21
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs59
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs89
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs71
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs36
-rw-r--r--OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs8
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs11
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs6
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs8
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs42
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs30
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs9
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs12
-rw-r--r--OpenSim/Services/HypergridService/HGAssetService.cs8
-rw-r--r--OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs22
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs17
-rw-r--r--Prebuild/prebuild.xml8
-rw-r--r--Prebuild/src/Core/Kernel.cs2
-rw-r--r--Prebuild/src/Core/Nodes/ProjectNode.cs10
-rw-r--r--Prebuild/src/Core/Targets/VS2010Target.cs278
-rw-r--r--Prebuild/src/Properties/AssemblyInfo.cs4
-rw-r--r--Prebuild/src/data/prebuild-1.10.xsd338
-rw-r--r--bin/OpenSimDefaults.ini6
-rwxr-xr-xbin/Prebuild.exebin224768 -> 233472 bytes
-rw-r--r--bin/Robust.HG.ini.example6
-rw-r--r--prebuild.xml2
-rwxr-xr-xrunprebuild.bat18
54 files changed, 1018 insertions, 475 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 0d96ed6..f6071f2 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -17,6 +17,7 @@ people that make the day to day of OpenSim happen.
17* Snoopy Pfeffer 17* Snoopy Pfeffer
18* Robert Adams (Intel) 18* Robert Adams (Intel)
19* Oren Hurvitz (Kitely) 19* Oren Hurvitz (Kitely)
20* Kevin Cozens
20 21
21= Core Developers Following the White Rabbit = 22= Core Developers Following the White Rabbit =
22Core developers who have temporarily (we hope) gone chasing the white rabbit. 23Core developers who have temporarily (we hope) gone chasing the white rabbit.
@@ -111,7 +112,6 @@ what it is today.
111* Jon Cundill 112* Jon Cundill
112* Junta Kohime 113* Junta Kohime
113* Kayne 114* Kayne
114* Kevin Cozens
115* kinoc (Daxtron Labs) 115* kinoc (Daxtron Labs)
116* Kira 116* Kira
117* Kitto Flora 117* Kitto Flora
diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
index 92528a2..bbb5e05 100644
--- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs
+++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
@@ -110,7 +110,15 @@ namespace OpenSim.Groups
110 m_messageOnlineAgentsOnly = groupsConfig.GetBoolean("MessageOnlineUsersOnly", false); 110 m_messageOnlineAgentsOnly = groupsConfig.GetBoolean("MessageOnlineUsersOnly", false);
111 111
112 if (m_messageOnlineAgentsOnly) 112 if (m_messageOnlineAgentsOnly)
113 {
113 m_usersOnlineCache = new ExpiringCache<UUID, PresenceInfo[]>(); 114 m_usersOnlineCache = new ExpiringCache<UUID, PresenceInfo[]>();
115 }
116 else
117 {
118 m_log.Error("[Groups.Messaging]: GroupsMessagingModule V2 requires MessageOnlineUsersOnly = true");
119 m_groupMessagingEnabled = false;
120 return;
121 }
114 122
115 m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true); 123 m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true);
116 124
@@ -260,7 +268,7 @@ namespace OpenSim.Groups
260 // Sending to offline members is not an option. 268 // Sending to offline members is not an option.
261 string[] t1 = groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString()).ToArray(); 269 string[] t1 = groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString()).ToArray();
262 270
263 // We cache in order not to overwhlem the presence service on large grids with many groups. This does 271 // We cache in order not to overwhelm the presence service on large grids with many groups. This does
264 // mean that members coming online will not see all group members until after m_usersOnlineCacheExpirySeconds has elapsed. 272 // mean that members coming online will not see all group members until after m_usersOnlineCacheExpirySeconds has elapsed.
265 // (assuming this is the same across all grid simulators). 273 // (assuming this is the same across all grid simulators).
266 if (!m_usersOnlineCache.TryGetValue(groupID, out onlineAgents)) 274 if (!m_usersOnlineCache.TryGetValue(groupID, out onlineAgents))
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs
index 7f453db..f11606a 100644
--- a/OpenSim/Addons/Groups/GroupsModule.cs
+++ b/OpenSim/Addons/Groups/GroupsModule.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Groups
101 { 101 {
102 scene.RegisterModuleInterface<IGroupsModule>(this); 102 scene.RegisterModuleInterface<IGroupsModule>(this);
103 scene.AddCommand( 103 scene.AddCommand(
104 "debug", 104 "Debug",
105 this, 105 this,
106 "debug groups verbose", 106 "debug groups verbose",
107 "debug groups verbose <true|false>", 107 "debug groups verbose <true|false>",
diff --git a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs
index d2bcba5..dc36787 100644
--- a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs
+++ b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -158,7 +158,7 @@ namespace OpenSim.Groups
158 } 158 }
159 catch (Exception e) 159 catch (Exception e)
160 { 160 {
161 m_log.DebugFormat("[Groups.RobustHGConnector]: Exception {0}", e.StackTrace); 161 m_log.Error(string.Format("[Groups.RobustHGConnector]: Exception {0} ", e.Message), e);
162 } 162 }
163 163
164 return FailureResult(); 164 return FailureResult();
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
index 249d974..616afa9 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Groups
140 } 140 }
141 catch (Exception e) 141 catch (Exception e)
142 { 142 {
143 m_log.DebugFormat("[GROUPS HANDLER]: Exception {0}", e.StackTrace); 143 m_log.Error(string.Format("[GROUPS HANDLER]: Exception {0} ", e.Message), e);
144 } 144 }
145 145
146 return FailureResult(); 146 return FailureResult();
diff --git a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs
index 13b0e7e..ed5c742 100644
--- a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs
+++ b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs
@@ -109,7 +109,7 @@ namespace OpenSim.OfflineIM
109 } 109 }
110 catch (Exception e) 110 catch (Exception e)
111 { 111 {
112 m_log.DebugFormat("[OFFLINE IM HANDLER]: Exception {0}", e.StackTrace); 112 m_log.Error(string.Format("[OFFLINE IM HANDLER]: Exception {0} ", e.Message), e);
113 } 113 }
114 114
115 return FailureResult(); 115 return FailureResult();
diff --git a/OpenSim/Data/MySQL/MySQLGroupsData.cs b/OpenSim/Data/MySQL/MySQLGroupsData.cs
index 0318284..8e39229 100644
--- a/OpenSim/Data/MySQL/MySQLGroupsData.cs
+++ b/OpenSim/Data/MySQL/MySQLGroupsData.cs
@@ -86,11 +86,11 @@ namespace OpenSim.Data.MySQL
86 public GroupData[] RetrieveGroups(string pattern) 86 public GroupData[] RetrieveGroups(string pattern)
87 { 87 {
88 if (string.IsNullOrEmpty(pattern)) 88 if (string.IsNullOrEmpty(pattern))
89 pattern = "1 ORDER BY Name LIMIT 100"; 89 pattern = "1";
90 else 90 else
91 pattern = string.Format("Name LIKE '%{0}%' ORDER BY Name LIMIT 100", pattern); 91 pattern = string.Format("Name LIKE '%{0}%'", pattern);
92 92
93 return m_Groups.Get(pattern); 93 return m_Groups.Get(string.Format("ShowInList=1 AND ({0}) ORDER BY Name LIMIT 100", pattern));
94 } 94 }
95 95
96 public bool DeleteGroup(UUID groupID) 96 public bool DeleteGroup(UUID groupID)
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
index 6ed3b06..cc4c5b0 100644
--- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
@@ -974,8 +974,8 @@ namespace OpenSim.Data.MySQL
974 dbcon.Open(); 974 dbcon.Open();
975 using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) 975 using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
976 { 976 {
977 cmd.Parameters.AddWithValue("?ImViaEmail", pref.IMViaEmail); 977 cmd.Parameters.AddWithValue("?ImViaEmail", pref.IMViaEmail.ToString().ToLower());
978 cmd.Parameters.AddWithValue("?Visible", pref.Visible); 978 cmd.Parameters.AddWithValue("?Visible", pref.Visible.ToString().ToLower());
979 cmd.Parameters.AddWithValue("?uuid", pref.UserId.ToString()); 979 cmd.Parameters.AddWithValue("?uuid", pref.UserId.ToString());
980 980
981 cmd.ExecuteNonQuery(); 981 cmd.ExecuteNonQuery();
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 558dfd0..5761200 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -82,12 +82,15 @@ namespace OpenSim.Framework
82 set 82 set
83 { 83 {
84 m_creatorId = value; 84 m_creatorId = value;
85
86 if ((m_creatorId == null) || !UUID.TryParse(m_creatorId, out m_creatorIdAsUuid))
87 m_creatorIdAsUuid = UUID.Zero;
85 } 88 }
86 } 89 }
87 protected string m_creatorId; 90 protected string m_creatorId;
88 91
89 /// <value> 92 /// <value>
90 /// The CreatorId expressed as a UUID.tely 93 /// The CreatorId expressed as a UUID.
91 /// </value> 94 /// </value>
92 public UUID CreatorIdAsUuid 95 public UUID CreatorIdAsUuid
93 { 96 {
diff --git a/OpenSim/Framework/PluginLoader.cs b/OpenSim/Framework/PluginLoader.cs
index 819cb7b..a2bf9f3 100644
--- a/OpenSim/Framework/PluginLoader.cs
+++ b/OpenSim/Framework/PluginLoader.cs
@@ -215,7 +215,7 @@ namespace OpenSim.Framework
215 AddinManager.AddinLoadError += on_addinloaderror_; 215 AddinManager.AddinLoadError += on_addinloaderror_;
216 AddinManager.AddinLoaded += on_addinloaded_; 216 AddinManager.AddinLoaded += on_addinloaded_;
217 217
218 clear_registry_(); 218 clear_registry_(dir);
219 219
220 suppress_console_output_(true); 220 suppress_console_output_(true);
221 AddinManager.Initialize(dir); 221 AddinManager.Initialize(dir);
@@ -239,18 +239,19 @@ namespace OpenSim.Framework
239 + args.Exception.StackTrace); 239 + args.Exception.StackTrace);
240 } 240 }
241 241
242 private void clear_registry_() 242 private void clear_registry_(string dir)
243 { 243 {
244 // The Mono addin manager (in Mono.Addins.dll version 0.2.0.0) 244 // The Mono addin manager (in Mono.Addins.dll version 0.2.0.0)
245 // occasionally seems to corrupt its addin cache 245 // occasionally seems to corrupt its addin cache
246 // Hence, as a temporary solution we'll remove it before each startup 246 // Hence, as a temporary solution we'll remove it before each startup
247
247 try 248 try
248 { 249 {
249 if (Directory.Exists("addin-db-000")) 250 if (Directory.Exists(dir + "/addin-db-000"))
250 Directory.Delete("addin-db-000", true); 251 Directory.Delete(dir + "/addin-db-000", true);
251 252
252 if (Directory.Exists("addin-db-001")) 253 if (Directory.Exists(dir + "/addin-db-001"))
253 Directory.Delete("addin-db-001", true); 254 Directory.Delete(dir + "/addin-db-001", true);
254 } 255 }
255 catch (IOException) 256 catch (IOException)
256 { 257 {
diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
index c56f213..db46ea8 100644
--- a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
+++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -161,7 +161,7 @@ namespace OpenSim.Framework.Serialization.External
161 if (!hasCreatorData && creator != null) 161 if (!hasCreatorData && creator != null)
162 { 162 {
163 XmlElement creatorData = doc.CreateElement("CreatorData"); 163 XmlElement creatorData = doc.CreateElement("CreatorData");
164 creatorData.InnerText = homeURL + ";" + creator.FirstName + " " + creator.LastName; 164 creatorData.InnerText = CalcCreatorData(homeURL, creator.FirstName + " " + creator.LastName);
165 sop.AppendChild(creatorData); 165 sop.AppendChild(creatorData);
166 } 166 }
167 } 167 }
@@ -172,5 +172,15 @@ namespace OpenSim.Framework.Serialization.External
172 return wr.ToString(); 172 return wr.ToString();
173 } 173 }
174 } 174 }
175
176 public static string CalcCreatorData(string homeURL, string name)
177 {
178 return homeURL + ";" + name;
179 }
180
181 internal static string CalcCreatorData(string homeURL, UUID uuid, string name)
182 {
183 return homeURL + "/" + uuid + ";" + name;
184 }
175 } 185 }
176} \ No newline at end of file 186}
diff --git a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
index f2a6b8b..135cefb 100644
--- a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
@@ -286,7 +286,8 @@ namespace OpenSim.Framework.Serialization.External
286 UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid); 286 UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid);
287 if (account != null) 287 if (account != null)
288 { 288 {
289 writer.WriteElementString("CreatorData", (string)options["home"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName); 289 string creatorData = ExternalRepresentationUtils.CalcCreatorData((string)options["home"], inventoryItem.CreatorIdAsUuid, account.FirstName + " " + account.LastName);
290 writer.WriteElementString("CreatorData", creatorData);
290 } 291 }
291 writer.WriteElementString("CreatorID", inventoryItem.CreatorId); 292 writer.WriteElementString("CreatorID", inventoryItem.CreatorId);
292 } 293 }
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index efaed62..c2c9698 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -2250,10 +2250,15 @@ namespace OpenSim.Framework
2250 { 2250 {
2251 string[] parts = firstName.Split(new char[] { '.' }); 2251 string[] parts = firstName.Split(new char[] { '.' });
2252 if (parts.Length == 2) 2252 if (parts.Length == 2)
2253 return id.ToString() + ";" + agentsURI + ";" + parts[0] + " " + parts[1]; 2253 return CalcUniversalIdentifier(id, agentsURI, parts[0] + " " + parts[1]);
2254 } 2254 }
2255 return id.ToString() + ";" + agentsURI + ";" + firstName + " " + lastName; 2255
2256 return CalcUniversalIdentifier(id, agentsURI, firstName + " " + lastName);
2257 }
2256 2258
2259 private static string CalcUniversalIdentifier(UUID id, string agentsURI, string name)
2260 {
2261 return id.ToString() + ";" + agentsURI + ";" + name;
2257 } 2262 }
2258 2263
2259 /// <summary> 2264 /// <summary>
@@ -2288,6 +2293,38 @@ namespace OpenSim.Framework
2288 { 2293 {
2289 return str.Replace("_", "\\_").Replace("%", "\\%"); 2294 return str.Replace("_", "\\_").Replace("%", "\\%");
2290 } 2295 }
2296
2297 /// <summary>
2298 /// Returns the name of the user's viewer.
2299 /// </summary>
2300 /// <remarks>
2301 /// This method handles two ways that viewers specify their name:
2302 /// 1. Viewer = "Firestorm-Release 4.4.2.34167", Channel = "(don't care)" -> "Firestorm-Release 4.4.2.34167"
2303 /// 2. Viewer = "4.5.1.38838", Channel = "Firestorm-Beta" -> "Firestorm-Beta 4.5.1.38838"
2304 /// </remarks>
2305 public static string GetViewerName(AgentCircuitData agent)
2306 {
2307 string name = agent.Viewer;
2308 if (name == null)
2309 name = "";
2310 else
2311 name = name.Trim();
2312
2313 // Check if 'Viewer' is just a version number. If it's *not*, then we
2314 // assume that it contains the real viewer name, and we return it.
2315 foreach (char c in name)
2316 {
2317 if (Char.IsLetter(c))
2318 return name;
2319 }
2320
2321 // The 'Viewer' string contains just a version number. If there's anything in
2322 // 'Channel' then assume that it's the viewer name.
2323 if ((agent.Channel != null) && (agent.Channel.Length > 0))
2324 name = agent.Channel.Trim() + " " + name;
2325
2326 return name;
2327 }
2291 } 2328 }
2292 2329
2293 public class DoubleQueue<T> where T:class 2330 public class DoubleQueue<T> where T:class
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 6d3331b..5c3039d 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -982,7 +982,7 @@ namespace OpenSim
982 aCircuit.child ? "child" : "root", 982 aCircuit.child ? "child" : "root",
983 aCircuit.circuitcode.ToString(), 983 aCircuit.circuitcode.ToString(),
984 aCircuit.IPAddress != null ? aCircuit.IPAddress.ToString() : "not set", 984 aCircuit.IPAddress != null ? aCircuit.IPAddress.ToString() : "not set",
985 aCircuit.Viewer); 985 Util.GetViewerName(aCircuit));
986 }); 986 });
987 987
988 MainConsole.Instance.Output(cdt.ToString()); 988 MainConsole.Instance.Output(cdt.ToString());
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 0dc9306..9d36986 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -158,10 +158,27 @@ namespace OpenSim
158 158
159 protected virtual void LoadPlugins() 159 protected virtual void LoadPlugins()
160 { 160 {
161 using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this))) 161 IConfig startupConfig = Config.Configs["Startup"];
162 string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation", String.Empty) : String.Empty;
163
164 // The location can also be specified in the environment. If there
165 // is no location in the configuration, we must call the constructor
166 // without a location parameter to allow that to happen.
167 if (registryLocation == String.Empty)
162 { 168 {
163 loader.Load("/OpenSim/Startup"); 169 using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this)))
164 m_plugins = loader.Plugins; 170 {
171 loader.Load("/OpenSim/Startup");
172 m_plugins = loader.Plugins;
173 }
174 }
175 else
176 {
177 using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this), registryLocation))
178 {
179 loader.Load("/OpenSim/Startup");
180 m_plugins = loader.Plugins;
181 }
165 } 182 }
166 } 183 }
167 184
@@ -1049,4 +1066,4 @@ namespace OpenSim
1049 { 1066 {
1050 public IConfigSource Source; 1067 public IConfigSource Source;
1051 } 1068 }
1052} \ No newline at end of file 1069}
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 05dd764..86161c9 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -10387,7 +10387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10387 handlerDirFindQuery(this, 10387 handlerDirFindQuery(this,
10388 dirFindQueryPacket.QueryData.QueryID, 10388 dirFindQueryPacket.QueryData.QueryID,
10389 Utils.BytesToString( 10389 Utils.BytesToString(
10390 dirFindQueryPacket.QueryData.QueryText), 10390 dirFindQueryPacket.QueryData.QueryText).Trim(),
10391 dirFindQueryPacket.QueryData.QueryFlags, 10391 dirFindQueryPacket.QueryData.QueryFlags,
10392 dirFindQueryPacket.QueryData.QueryStart); 10392 dirFindQueryPacket.QueryData.QueryStart);
10393 } 10393 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 1ca142e..c3846d9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -245,8 +245,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
245 string state = sog.GetStateSnapshot(); 245 string state = sog.GetStateSnapshot();
246 ad.AttachmentObjectStates.Add(state); 246 ad.AttachmentObjectStates.Add(state);
247 sp.InTransitScriptStates.Add(state); 247 sp.InTransitScriptStates.Add(state);
248 // Let's remove the scripts of the original object here 248
249 sog.RemoveScriptInstances(true); 249 // Scripts of the originals will be removed when the Agent is successfully removed.
250 // sog.RemoveScriptInstances(true);
250 } 251 }
251 } 252 }
252 } 253 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index f7057fe..9963521 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -483,52 +483,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
483 { 483 {
484 if (m_creatorIdForAssetId.ContainsKey(assetId)) 484 if (m_creatorIdForAssetId.ContainsKey(assetId))
485 { 485 {
486 string xmlData = Utils.BytesToString(data); 486 data = SceneObjectSerializer.ModifySerializedObject(assetId, data,
487 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); 487 sog => {
488 bool modified = false;
489
490 foreach (SceneObjectPart sop in sog.Parts)
491 {
492 if (string.IsNullOrEmpty(sop.CreatorData))
493 {
494 sop.CreatorID = m_creatorIdForAssetId[assetId];
495 modified = true;
496 }
497 }
498
499 return modified;
500 });
488 501
489 CoalescedSceneObjects coa = null; 502 if (data == null)
490 if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) 503 return false;
491 {
492// m_log.DebugFormat(
493// "[INVENTORY ARCHIVER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count);
494
495 if (coa.Objects.Count == 0)
496 {
497 m_log.WarnFormat(
498 "[INVENTORY ARCHIVE READ REQUEST]: Aborting load of coalesced object from asset {0} as it has zero loaded components",
499 assetId);
500 return false;
501 }
502
503 sceneObjects.AddRange(coa.Objects);
504 }
505 else
506 {
507 SceneObjectGroup deserializedObject = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
508
509 if (deserializedObject != null)
510 {
511 sceneObjects.Add(deserializedObject);
512 }
513 else
514 {
515 m_log.WarnFormat(
516 "[INVENTORY ARCHIVE READ REQUEST]: Aborting load of object from asset {0} as deserialization failed",
517 assetId);
518
519 return false;
520 }
521 }
522
523 foreach (SceneObjectGroup sog in sceneObjects)
524 foreach (SceneObjectPart sop in sog.Parts)
525 if (string.IsNullOrEmpty(sop.CreatorData))
526 sop.CreatorID = m_creatorIdForAssetId[assetId];
527
528 if (coa != null)
529 data = Utils.StringToBytes(CoalescedSceneObjectsSerializer.ToXml(coa));
530 else
531 data = Utils.StringToBytes(SceneObjectSerializer.ToOriginalXmlFormat(sceneObjects[0]));
532 } 504 }
533 } 505 }
534 506
@@ -550,7 +522,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
550 return false; 522 return false;
551 } 523 }
552 } 524 }
553 525
554 /// <summary> 526 /// <summary>
555 /// Load control file 527 /// Load control file
556 /// </summary> 528 /// </summary>
@@ -656,4 +628,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
656 m_assetsLoaded = true; 628 m_assetsLoaded = true;
657 } 629 }
658 } 630 }
659} \ No newline at end of file 631}
diff --git a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
index 8838612..3849996 100644
--- a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
@@ -150,6 +150,8 @@ namespace OpenSim.Region.CoreModules.Framework.Search
150 150
151 void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart) 151 void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart)
152 { 152 {
153 queryText = queryText.Trim();
154
153 if (((DirFindFlags)queryFlags & DirFindFlags.People) == DirFindFlags.People) 155 if (((DirFindFlags)queryFlags & DirFindFlags.People) == DirFindFlags.People)
154 { 156 {
155 if (string.IsNullOrEmpty(queryText)) 157 if (string.IsNullOrEmpty(queryText))
@@ -194,4 +196,4 @@ namespace OpenSim.Region.CoreModules.Framework.Search
194 196
195 } 197 }
196 198
197} \ No newline at end of file 199}
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 9f0a719..3455e2c 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -278,7 +278,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
278 { 278 {
279 foreach (UserData data in m_UserCache.Values) 279 foreach (UserData data in m_UserCache.Values)
280 { 280 {
281 if (users.Find(delegate(UserData d) { return d.Id == data.Id; }) == null && 281 if (data.Id != UUID.Zero &&
282 users.Find(delegate(UserData d) { return d.Id == data.Id; }) == null &&
282 (data.FirstName.ToLower().StartsWith(query.ToLower()) || data.LastName.ToLower().StartsWith(query.ToLower()))) 283 (data.FirstName.ToLower().StartsWith(query.ToLower()) || data.LastName.ToLower().StartsWith(query.ToLower())))
283 users.Add(data); 284 users.Add(data);
284 } 285 }
@@ -725,4 +726,4 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
725 726
726 } 727 }
727 728
728} \ No newline at end of file 729}
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 2e638d4..7920748 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -189,8 +189,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
189 m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"] 189 m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"]
190 : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f); 190 : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f);
191 191
192 // Zero can never be a valid user id 192 // Zero can never be a valid user or group id
193 m_validUserUuids[UUID.Zero] = false; 193 m_validUserUuids[UUID.Zero] = false;
194 m_validGroupUuids[UUID.Zero] = false;
194 195
195 m_groupsModule = m_rootScene.RequestModuleInterface<IGroupsModule>(); 196 m_groupsModule = m_rootScene.RequestModuleInterface<IGroupsModule>();
196 m_assetService = m_rootScene.AssetService; 197 m_assetService = m_rootScene.AssetService;
@@ -523,58 +524,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
523 oldTelehubUUID = UUID.Zero; 524 oldTelehubUUID = UUID.Zero;
524 } 525 }
525 526
526 // Try to retain the original creator/owner/lastowner if their uuid is present on this grid 527 ModifySceneObject(scene, sceneObject);
527 // or creator data is present. Otherwise, use the estate owner instead.
528 foreach (SceneObjectPart part in sceneObject.Parts)
529 {
530 if (string.IsNullOrEmpty(part.CreatorData))
531 {
532 if (!ResolveUserUuid(scene, part.CreatorID))
533 part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
534 }
535 if (UserManager != null)
536 UserManager.AddUser(part.CreatorID, part.CreatorData);
537
538 if (!ResolveUserUuid(scene, part.OwnerID))
539 part.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
540
541 if (!ResolveUserUuid(scene, part.LastOwnerID))
542 part.LastOwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
543
544 if (!ResolveGroupUuid(part.GroupID))
545 part.GroupID = UUID.Zero;
546
547 // And zap any troublesome sit target information
548// part.SitTargetOrientation = new Quaternion(0, 0, 0, 1);
549// part.SitTargetPosition = new Vector3(0, 0, 0);
550
551 // Fix ownership/creator of inventory items
552 // Not doing so results in inventory items
553 // being no copy/no mod for everyone
554 lock (part.TaskInventory)
555 {
556 TaskInventoryDictionary inv = part.TaskInventory;
557 foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv)
558 {
559 if (!ResolveUserUuid(scene, kvp.Value.OwnerID))
560 {
561 kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
562 }
563
564 if (string.IsNullOrEmpty(kvp.Value.CreatorData))
565 {
566 if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
567 kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
568 }
569
570 if (UserManager != null)
571 UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData);
572
573 if (!ResolveGroupUuid(kvp.Value.GroupID))
574 kvp.Value.GroupID = UUID.Zero;
575 }
576 }
577 }
578 528
579 if (scene.AddRestoredSceneObject(sceneObject, true, false)) 529 if (scene.AddRestoredSceneObject(sceneObject, true, false))
580 { 530 {
@@ -598,6 +548,67 @@ namespace OpenSim.Region.CoreModules.World.Archiver
598 scene.RegionInfo.RegionSettings.ClearSpawnPoints(); 548 scene.RegionInfo.RegionSettings.ClearSpawnPoints();
599 } 549 }
600 } 550 }
551
552 /// <summary>
553 /// Optionally modify a loaded SceneObjectGroup. Currently this just ensures that the
554 /// User IDs and Group IDs are valid, but other manipulations could be done as well.
555 /// </summary>
556 private void ModifySceneObject(Scene scene, SceneObjectGroup sceneObject)
557 {
558 // Try to retain the original creator/owner/lastowner if their uuid is present on this grid
559 // or creator data is present. Otherwise, use the estate owner instead.
560 foreach (SceneObjectPart part in sceneObject.Parts)
561 {
562 if (string.IsNullOrEmpty(part.CreatorData))
563 {
564 if (!ResolveUserUuid(scene, part.CreatorID))
565 part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
566 }
567 if (UserManager != null)
568 UserManager.AddUser(part.CreatorID, part.CreatorData);
569
570 if (!(ResolveUserUuid(scene, part.OwnerID) || ResolveGroupUuid(part.OwnerID)))
571 part.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
572
573 if (!(ResolveUserUuid(scene, part.LastOwnerID) || ResolveGroupUuid(part.LastOwnerID)))
574 part.LastOwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
575
576 if (!ResolveGroupUuid(part.GroupID))
577 part.GroupID = UUID.Zero;
578
579 // And zap any troublesome sit target information
580 // part.SitTargetOrientation = new Quaternion(0, 0, 0, 1);
581 // part.SitTargetPosition = new Vector3(0, 0, 0);
582
583 // Fix ownership/creator of inventory items
584 // Not doing so results in inventory items
585 // being no copy/no mod for everyone
586 lock (part.TaskInventory)
587 {
588 TaskInventoryDictionary inv = part.TaskInventory;
589 foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv)
590 {
591 if (!(ResolveUserUuid(scene, kvp.Value.OwnerID) || ResolveGroupUuid(kvp.Value.OwnerID)))
592 {
593 kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
594 }
595
596 if (string.IsNullOrEmpty(kvp.Value.CreatorData))
597 {
598 if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
599 kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
600 }
601
602 if (UserManager != null)
603 UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData);
604
605 if (!ResolveGroupUuid(kvp.Value.GroupID))
606 kvp.Value.GroupID = UUID.Zero;
607 }
608 }
609 }
610 }
611
601 612
602 /// <summary> 613 /// <summary>
603 /// Load serialized parcels. 614 /// Load serialized parcels.
@@ -695,9 +706,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
695 /// <returns></returns> 706 /// <returns></returns>
696 private bool ResolveGroupUuid(UUID uuid) 707 private bool ResolveGroupUuid(UUID uuid)
697 { 708 {
698 if (uuid == UUID.Zero)
699 return true; // this means the object has no group
700
701 lock (m_validGroupUuids) 709 lock (m_validGroupUuids)
702 { 710 {
703 if (!m_validGroupUuids.ContainsKey(uuid)) 711 if (!m_validGroupUuids.ContainsKey(uuid))
@@ -754,7 +762,21 @@ namespace OpenSim.Region.CoreModules.World.Archiver
754 sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; 762 sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
755 763
756 if (assetType == (sbyte)AssetType.Unknown) 764 if (assetType == (sbyte)AssetType.Unknown)
765 {
757 m_log.WarnFormat("[ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, uuid); 766 m_log.WarnFormat("[ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, uuid);
767 }
768 else if (assetType == (sbyte)AssetType.Object)
769 {
770 data = SceneObjectSerializer.ModifySerializedObject(UUID.Parse(uuid), data,
771 sog =>
772 {
773 ModifySceneObject(m_rootScene, sog);
774 return true;
775 });
776
777 if (data == null)
778 return false;
779 }
758 780
759 //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); 781 //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType);
760 782
@@ -977,4 +999,4 @@ namespace OpenSim.Region.CoreModules.World.Archiver
977 return dearchivedScenes; 999 return dearchivedScenes;
978 } 1000 }
979 } 1001 }
980} \ No newline at end of file 1002}
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 3bd7b4a..cb9ad4a 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -1342,10 +1342,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1342 { 1342 {
1343 m_regionChangeTimer.Stop(); 1343 m_regionChangeTimer.Stop();
1344 m_regionChangeTimer.Start(); 1344 m_regionChangeTimer.Start();
1345 }
1346 1345
1347 protected void RaiseRegionInfoChange(object sender, ElapsedEventArgs e)
1348 {
1349 ChangeDelegate change = OnRegionInfoChange; 1346 ChangeDelegate change = OnRegionInfoChange;
1350 1347
1351 if (change != null) 1348 if (change != null)
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 7f17aff..0ecf13b 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -1340,6 +1340,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1340 1340
1341 m_scene.ForEachClient(SendParcelOverlay); 1341 m_scene.ForEachClient(SendParcelOverlay);
1342 land.SendLandUpdateToClient(true, remote_client); 1342 land.SendLandUpdateToClient(true, remote_client);
1343 UpdateLandObject(land.LandData.LocalID, land.LandData);
1343 } 1344 }
1344 } 1345 }
1345 } 1346 }
@@ -1360,8 +1361,10 @@ namespace OpenSim.Region.CoreModules.World.Land
1360 land.LandData.GroupID = UUID.Zero; 1361 land.LandData.GroupID = UUID.Zero;
1361 land.LandData.IsGroupOwned = false; 1362 land.LandData.IsGroupOwned = false;
1362 land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); 1363 land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
1364
1363 m_scene.ForEachClient(SendParcelOverlay); 1365 m_scene.ForEachClient(SendParcelOverlay);
1364 land.SendLandUpdateToClient(true, remote_client); 1366 land.SendLandUpdateToClient(true, remote_client);
1367 UpdateLandObject(land.LandData.LocalID, land.LandData);
1365 } 1368 }
1366 } 1369 }
1367 } 1370 }
@@ -1388,6 +1391,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1388 1391
1389 m_scene.ForEachClient(SendParcelOverlay); 1392 m_scene.ForEachClient(SendParcelOverlay);
1390 land.SendLandUpdateToClient(true, remote_client); 1393 land.SendLandUpdateToClient(true, remote_client);
1394 UpdateLandObject(land.LandData.LocalID, land.LandData);
1391 } 1395 }
1392 } 1396 }
1393 } 1397 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d16b73b..51f6c5e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1757,6 +1757,7 @@ namespace OpenSim.Region.Framework.Scenes
1757 { 1757 {
1758 if (group != null) 1758 if (group != null)
1759 { 1759 {
1760 group.HasGroupChanged = true;
1760 group.ProcessBackup(SimulationDataService, true); 1761 group.ProcessBackup(SimulationDataService, true);
1761 } 1762 }
1762 } 1763 }
@@ -2345,13 +2346,12 @@ namespace OpenSim.Region.Framework.Scenes
2345 { 2346 {
2346 if (!softDelete) 2347 if (!softDelete)
2347 { 2348 {
2348 // Force a database update so that the scene object group ID is accurate. It's possible that the 2349 // If the group contains prims whose SceneGroupID is incorrect then force a
2349 // group has recently been delinked from another group but that this change has not been persisted 2350 // database update, because RemoveObject() works by searching on the SceneGroupID.
2350 // to the DB.
2351 // This is an expensive thing to do so only do it if absolutely necessary. 2351 // This is an expensive thing to do so only do it if absolutely necessary.
2352 if (so.HasGroupChangedDueToDelink) 2352 if (so.GroupContainsForeignPrims)
2353 ForceSceneObjectBackup(so); 2353 ForceSceneObjectBackup(so);
2354 2354
2355 so.DetachFromBackup(); 2355 so.DetachFromBackup();
2356 SimulationDataService.RemoveObject(so.UUID, RegionInfo.RegionID); 2356 SimulationDataService.RemoveObject(so.UUID, RegionInfo.RegionID);
2357 } 2357 }
@@ -3413,6 +3413,7 @@ namespace OpenSim.Region.Framework.Scenes
3413 // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport 3413 // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport
3414 3414
3415 // Don't disable this log message - it's too helpful 3415 // Don't disable this log message - it's too helpful
3416 string curViewer = Util.GetViewerName(acd);
3416 m_log.DebugFormat( 3417 m_log.DebugFormat(
3417 "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})", 3418 "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})",
3418 RegionInfo.RegionName, 3419 RegionInfo.RegionName,
@@ -3422,7 +3423,7 @@ namespace OpenSim.Region.Framework.Scenes
3422 acd.AgentID, 3423 acd.AgentID,
3423 acd.circuitcode, 3424 acd.circuitcode,
3424 acd.IPAddress, 3425 acd.IPAddress,
3425 acd.Viewer, 3426 curViewer,
3426 ((TPFlags)teleportFlags).ToString(), 3427 ((TPFlags)teleportFlags).ToString(),
3427 acd.startpos 3428 acd.startpos
3428 ); 3429 );
@@ -3442,7 +3443,7 @@ namespace OpenSim.Region.Framework.Scenes
3442 { 3443 {
3443 foreach (string viewer in m_AllowedViewers) 3444 foreach (string viewer in m_AllowedViewers)
3444 { 3445 {
3445 if (viewer == acd.Viewer.Substring(0, viewer.Length).Trim().ToLower()) 3446 if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower())
3446 { 3447 {
3447 ViewerDenied = false; 3448 ViewerDenied = false;
3448 break; 3449 break;
@@ -3459,7 +3460,7 @@ namespace OpenSim.Region.Framework.Scenes
3459 { 3460 {
3460 foreach (string viewer in m_BannedViewers) 3461 foreach (string viewer in m_BannedViewers)
3461 { 3462 {
3462 if (viewer == acd.Viewer.Substring(0, viewer.Length).Trim().ToLower()) 3463 if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower())
3463 { 3464 {
3464 ViewerDenied = true; 3465 ViewerDenied = true;
3465 break; 3466 break;
@@ -3471,7 +3472,7 @@ namespace OpenSim.Region.Framework.Scenes
3471 { 3472 {
3472 m_log.DebugFormat( 3473 m_log.DebugFormat(
3473 "[SCENE]: Access denied for {0} {1} using {2}", 3474 "[SCENE]: Access denied for {0} {1} using {2}",
3474 acd.firstname, acd.lastname, acd.Viewer); 3475 acd.firstname, acd.lastname, curViewer);
3475 reason = "Access denied, your viewer is banned by the region owner"; 3476 reason = "Access denied, your viewer is banned by the region owner";
3476 return false; 3477 return false;
3477 } 3478 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 6f26176..b70e9df 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -150,12 +150,27 @@ namespace OpenSim.Region.Framework.Scenes
150 150
151 get { return m_hasGroupChanged; } 151 get { return m_hasGroupChanged; }
152 } 152 }
153
154 private bool m_groupContainsForeignPrims = false;
153 155
154 /// <summary> 156 /// <summary>
155 /// Has the group changed due to an unlink operation? We record this in order to optimize deletion, since 157 /// Whether the group contains prims that came from a different group. This happens when
156 /// an unlinked group currently has to be persisted to the database before we can perform an unlink operation. 158 /// linking or delinking groups. The implication is that until the group is persisted,
159 /// the prims in the database still use the old SceneGroupID. That's a problem if the group
160 /// is deleted, because we delete groups by searching for prims by their SceneGroupID.
157 /// </summary> 161 /// </summary>
158 public bool HasGroupChangedDueToDelink { get; private set; } 162 public bool GroupContainsForeignPrims
163 {
164 private set
165 {
166 m_groupContainsForeignPrims = value;
167 if (m_groupContainsForeignPrims)
168 HasGroupChanged = true;
169 }
170
171 get { return m_groupContainsForeignPrims; }
172 }
173
159 174
160 private bool isTimeToPersist() 175 private bool isTimeToPersist()
161 { 176 {
@@ -1624,7 +1639,7 @@ namespace OpenSim.Region.Framework.Scenes
1624 backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; 1639 backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity;
1625 backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem; 1640 backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem;
1626 HasGroupChanged = false; 1641 HasGroupChanged = false;
1627 HasGroupChangedDueToDelink = false; 1642 GroupContainsForeignPrims = false;
1628 1643
1629 m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this); 1644 m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this);
1630 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); 1645 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
@@ -1686,28 +1701,7 @@ namespace OpenSim.Region.Framework.Scenes
1686 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); 1701 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
1687 dupe.Backup = false; 1702 dupe.Backup = false;
1688 dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>(); 1703 dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>();
1689
1690 // Warning, The following code related to previousAttachmentStatus is needed so that clones of
1691 // attachments do not bordercross while they're being duplicated. This is hacktastic!
1692 // Normally, setting AbsolutePosition will bordercross a prim if it's outside the region!
1693 // unless IsAttachment is true!, so to prevent border crossing, we save it's attachment state
1694 // (which should be false anyway) set it as an Attachment and then set it's Absolute Position,
1695 // then restore it's attachment state
1696
1697 // This is only necessary when userExposed is false!
1698
1699 bool previousAttachmentStatus = dupe.IsAttachment;
1700
1701 if (!userExposed)
1702 dupe.IsAttachment = true;
1703
1704 dupe.m_sittingAvatars = new List<UUID>(); 1704 dupe.m_sittingAvatars = new List<UUID>();
1705
1706 if (!userExposed)
1707 {
1708 dupe.IsAttachment = previousAttachmentStatus;
1709 }
1710
1711 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 1705 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
1712 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; 1706 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
1713 1707
@@ -2388,6 +2382,8 @@ namespace OpenSim.Region.Framework.Scenes
2388 // If linking prims with different permissions, fix them 2382 // If linking prims with different permissions, fix them
2389 AdjustChildPrimPermissions(); 2383 AdjustChildPrimPermissions();
2390 2384
2385 GroupContainsForeignPrims = true;
2386
2391 AttachToBackup(); 2387 AttachToBackup();
2392 2388
2393 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the 2389 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
@@ -2531,9 +2527,16 @@ namespace OpenSim.Region.Framework.Scenes
2531 2527
2532 linkPart.Rezzed = RootPart.Rezzed; 2528 linkPart.Rezzed = RootPart.Rezzed;
2533 2529
2534 // When we delete a group, we currently have to force persist to the database if the object id has changed 2530 // We must persist the delinked group to the database immediately, for safety. The problem
2535 // (since delete works by deleting all rows which have a given object id) 2531 // is that although in memory the new group has a new SceneGroupID, in the database it
2536 objectGroup.HasGroupChangedDueToDelink = true; 2532 // still has the parent group's SceneGroupID (until the next backup). This means that if the
2533 // parent group is deleted then the delinked group will also be deleted from the database.
2534 // This problem will disappear if the region remains alive long enough for another backup,
2535 // since at that time the delinked group's new SceneGroupID will be written to the database.
2536 // But if the region crashes before that then the prims will be permanently gone, and this must
2537 // not happen. (We can't use a just-in-time trick like GroupContainsForeignPrims in this case
2538 // because the delinked group doesn't know when the source group is deleted.)
2539 m_scene.ForceSceneObjectBackup(objectGroup);
2537 2540
2538 return objectGroup; 2541 return objectGroup;
2539 } 2542 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 491d0bf..64c464d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -848,7 +848,7 @@ namespace OpenSim.Region.Framework.Scenes
848 848
849 public string Viewer 849 public string Viewer
850 { 850 {
851 get { return m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode).Viewer; } 851 get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); }
852 } 852 }
853 853
854 #endregion 854 #endregion
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
index 5cb271d..a556f9d 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
@@ -119,21 +119,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
119 return output; 119 return output;
120 } 120 }
121 } 121 }
122 122
123 public static bool TryFromXml(string xml, out CoalescedSceneObjects coa) 123 public static bool TryFromXml(string xml, out CoalescedSceneObjects coa)
124 { 124 {
125// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml); 125// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml);
126 126
127 coa = null; 127 coa = null;
128 int i = 0;
129 128
130 using (StringReader sr = new StringReader(xml)) 129 try
131 { 130 {
132 using (XmlTextReader reader = new XmlTextReader(sr)) 131 // Quickly check if this is a coalesced object, without fully parsing the XML
133 { 132 using (StringReader sr = new StringReader(xml))
134 try 133 {
134 using (XmlTextReader reader = new XmlTextReader(sr))
135 { 135 {
136 reader.Read(); 136 reader.MoveToContent(); // skip possible xml declaration
137
137 if (reader.Name != "CoalescedObject") 138 if (reader.Name != "CoalescedObject")
138 { 139 {
139 // m_log.DebugFormat( 140 // m_log.DebugFormat(
@@ -142,49 +143,49 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
142 143
143 return false; 144 return false;
144 } 145 }
145 146 }
146 coa = new CoalescedSceneObjects(UUID.Zero); 147 }
147 reader.Read();
148
149 while (reader.NodeType != XmlNodeType.EndElement && reader.Name != "CoalescedObject")
150 {
151 if (reader.Name == "SceneObjectGroup")
152 {
153 string soXml = reader.ReadOuterXml();
154
155 SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(soXml);
156
157 if (so != null)
158 {
159 coa.Add(so);
160 }
161 else
162 {
163 // XXX: Possibly we should fail outright here rather than continuing if a particular component of the
164 // coalesced object fails to load.
165 m_log.WarnFormat(
166 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.",
167 i);
168 }
169 148
170 i++; 149 XmlDocument doc = new XmlDocument();
171 } 150 doc.LoadXml(xml);
172 } 151 XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
152 if (e == null)
153 return false;
173 154
174 reader.ReadEndElement(); // CoalescedObject 155 coa = new CoalescedSceneObjects(UUID.Zero);
156
157 XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
158 int i = 0;
159
160 foreach (XmlNode n in groups)
161 {
162 SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
163 if (so != null)
164 {
165 coa.Add(so);
175 } 166 }
176 catch (Exception e) 167 else
177 { 168 {
178 m_log.ErrorFormat( 169 // XXX: Possibly we should fail outright here rather than continuing if a particular component of the
179 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed with {0} {1}", 170 // coalesced object fails to load.
180 e.Message, e.StackTrace); 171 m_log.WarnFormat(
181 172 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.",
182 return false; 173 i);
183 } 174 }
175
176 i++;
184 } 177 }
185 } 178 }
179 catch (Exception e)
180 {
181 m_log.Error(string.Format(
182 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed with {0} ",
183 e.Message), e);
184
185 return false;
186 }
186 187
187 return true; 188 return true;
188 } 189 }
189 } 190 }
190} \ No newline at end of file 191}
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index f07dee9..a93f3c8 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -299,6 +299,73 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
299 } 299 }
300 } 300 }
301 301
302
303 /// <summary>
304 /// Modifies a SceneObjectGroup.
305 /// </summary>
306 /// <param name="sog">The object</param>
307 /// <returns>Whether the object was actually modified</returns>
308 public delegate bool SceneObjectModifier(SceneObjectGroup sog);
309
310 /// <summary>
311 /// Modifies an object by deserializing it; applying 'modifier' to each SceneObjectGroup; and reserializing.
312 /// </summary>
313 /// <param name="assetId">The object's UUID</param>
314 /// <param name="data">Serialized data</param>
315 /// <param name="modifier">The function to run on each SceneObjectGroup</param>
316 /// <returns>The new serialized object's data, or null if an error occurred</returns>
317 public static byte[] ModifySerializedObject(UUID assetId, byte[] data, SceneObjectModifier modifier)
318 {
319 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
320 CoalescedSceneObjects coa = null;
321
322 string xmlData = Utils.BytesToString(data);
323
324 if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa))
325 {
326 // m_log.DebugFormat("[SERIALIZER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count);
327
328 if (coa.Objects.Count == 0)
329 {
330 m_log.WarnFormat("[SERIALIZER]: Aborting load of coalesced object from asset {0} as it has zero loaded components", assetId);
331 return null;
332 }
333
334 sceneObjects.AddRange(coa.Objects);
335 }
336 else
337 {
338 SceneObjectGroup deserializedObject = FromOriginalXmlFormat(xmlData);
339
340 if (deserializedObject != null)
341 {
342 sceneObjects.Add(deserializedObject);
343 }
344 else
345 {
346 m_log.WarnFormat("[SERIALIZER]: Aborting load of object from asset {0} as deserialization failed", assetId);
347 return null;
348 }
349 }
350
351 bool modified = false;
352 foreach (SceneObjectGroup sog in sceneObjects)
353 {
354 if (modifier(sog))
355 modified = true;
356 }
357
358 if (modified)
359 {
360 if (coa != null)
361 data = Utils.StringToBytes(CoalescedSceneObjectsSerializer.ToXml(coa));
362 else
363 data = Utils.StringToBytes(ToOriginalXmlFormat(sceneObjects[0]));
364 }
365
366 return data;
367 }
368
302 369
303 #region manual serialization 370 #region manual serialization
304 371
@@ -1230,7 +1297,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1230 if (m_UserManagement == null) 1297 if (m_UserManagement == null)
1231 m_UserManagement = sop.ParentGroup.Scene.RequestModuleInterface<IUserManagement>(); 1298 m_UserManagement = sop.ParentGroup.Scene.RequestModuleInterface<IUserManagement>();
1232 string name = m_UserManagement.GetUserName(sop.CreatorID); 1299 string name = m_UserManagement.GetUserName(sop.CreatorID);
1233 writer.WriteElementString("CreatorData", (string)options["home"] + ";" + name); 1300 writer.WriteElementString("CreatorData", ExternalRepresentationUtils.CalcCreatorData((string)options["home"], name));
1234 } 1301 }
1235 1302
1236 WriteUUID(writer, "FolderID", sop.FolderID, options); 1303 WriteUUID(writer, "FolderID", sop.FolderID, options);
@@ -1403,7 +1470,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1403 if (m_UserManagement == null) 1470 if (m_UserManagement == null)
1404 m_UserManagement = scene.RequestModuleInterface<IUserManagement>(); 1471 m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
1405 string name = m_UserManagement.GetUserName(item.CreatorID); 1472 string name = m_UserManagement.GetUserName(item.CreatorID);
1406 writer.WriteElementString("CreatorData", (string)options["home"] + ";" + name); 1473 writer.WriteElementString("CreatorData", ExternalRepresentationUtils.CalcCreatorData((string)options["home"], name));
1407 } 1474 }
1408 1475
1409 writer.WriteElementString("Description", item.Description); 1476 writer.WriteElementString("Description", item.Description);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
index 9378e20..c928b1e 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
@@ -91,7 +91,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests
91 grp2.RootPart.ClearUpdateSchedule(); 91 grp2.RootPart.ClearUpdateSchedule();
92 92
93 // Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated. 93 // Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated.
94 Assert.IsFalse(grp1.GroupContainsForeignPrims);
94 grp1.LinkToGroup(grp2); 95 grp1.LinkToGroup(grp2);
96 Assert.IsTrue(grp1.GroupContainsForeignPrims);
97
98 scene.Backup(true);
99 Assert.IsFalse(grp1.GroupContainsForeignPrims);
95 100
96 // FIXME: Can't do this test yet since group 2 still has its root part! We can't yet null this since 101 // FIXME: Can't do this test yet since group 2 still has its root part! We can't yet null this since
97 // it might cause SOG.ProcessBackup() to fail due to the race condition. This really needs to be fixed. 102 // it might cause SOG.ProcessBackup() to fail due to the race condition. This really needs to be fixed.
@@ -143,7 +148,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
143 148
144 Assert.That(grp1.Parts.Length, Is.EqualTo(1), "Group 1 still contained part2 after delink."); 149 Assert.That(grp1.Parts.Length, Is.EqualTo(1), "Group 1 still contained part2 after delink.");
145 Assert.That(part2.AbsolutePosition == Vector3.Zero, "The absolute position should be zero"); 150 Assert.That(part2.AbsolutePosition == Vector3.Zero, "The absolute position should be zero");
146 Assert.That(grp3.HasGroupChangedDueToDelink, Is.True);
147 } 151 }
148 152
149 [Test] 153 [Test]
@@ -335,30 +339,34 @@ namespace OpenSim.Region.Framework.Scenes.Tests
335 SceneObjectPart rootPart 339 SceneObjectPart rootPart
336 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 340 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
337 { Name = rootPartName, UUID = rootPartUuid }; 341 { Name = rootPartName, UUID = rootPartUuid };
342
338 SceneObjectPart linkPart 343 SceneObjectPart linkPart
339 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 344 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
340 { Name = linkPartName, UUID = linkPartUuid }; 345 { Name = linkPartName, UUID = linkPartUuid };
346 SceneObjectGroup linkGroup = new SceneObjectGroup(linkPart);
347 scene.AddNewSceneObject(linkGroup, true);
341 348
342 SceneObjectGroup sog = new SceneObjectGroup(rootPart); 349 SceneObjectGroup sog = new SceneObjectGroup(rootPart);
343 sog.AddPart(linkPart); 350 scene.AddNewSceneObject(sog, true);
344 scene.AddNewSceneObject(sog, true); 351
345 352 Assert.IsFalse(sog.GroupContainsForeignPrims);
346 // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked 353 sog.LinkToGroup(linkGroup);
347 // scene backup thread. 354 Assert.IsTrue(sog.GroupContainsForeignPrims);
355
348 scene.Backup(true); 356 scene.Backup(true);
349 357 Assert.AreEqual(1, scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID).Count);
358
350 // These changes should occur immediately without waiting for a backup pass 359 // These changes should occur immediately without waiting for a backup pass
351 SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); 360 SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false);
352 361 Assert.IsFalse(groupToDelete.GroupContainsForeignPrims);
353 Assert.That(groupToDelete.HasGroupChangedDueToDelink, Is.True); 362
354 scene.DeleteSceneObject(groupToDelete, false); 363 scene.DeleteSceneObject(groupToDelete, false);
355 Assert.That(groupToDelete.HasGroupChangedDueToDelink, Is.False);
356 364
357 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); 365 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID);
358 366
359 Assert.That(storedObjects.Count, Is.EqualTo(1)); 367 Assert.AreEqual(1, storedObjects.Count);
360 Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(1)); 368 Assert.AreEqual(1, storedObjects[0].Parts.Length);
361 Assert.That(storedObjects[0].ContainsPart(rootPartUuid)); 369 Assert.IsTrue(storedObjects[0].ContainsPart(rootPartUuid));
362 } 370 }
363 } 371 }
364} 372}
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index ec18db0..44d4e93 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -669,7 +669,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
669 aCircuit = new AgentCircuitData(); 669 aCircuit = new AgentCircuitData();
670 670
671 if (!llClient.SceneAgent.IsChildAgent) 671 if (!llClient.SceneAgent.IsChildAgent)
672 m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, aCircuit.Viewer, aCircuit.Id0); 672 m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0);
673 673
674 int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); 674 int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum();
675 avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); 675 avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1);
@@ -706,4 +706,4 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
706 m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum); 706 m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum);
707 } 707 }
708 } 708 }
709} \ No newline at end of file 709}
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs
index 8b0fdeb..7e61007 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -121,8 +121,10 @@ public class BSActorLockAxis : BSActor
121 // The constraint is tied to the world and oriented to the prim. 121 // The constraint is tied to the world and oriented to the prim.
122 122
123 // Free to move linearly in the region 123 // Free to move linearly in the region
124 OMV.Vector3 linearLow = OMV.Vector3.Zero; 124 // OMV.Vector3 linearLow = OMV.Vector3.Zero;
125 OMV.Vector3 linearHigh = m_physicsScene.TerrainManager.DefaultRegionSize; 125 // OMV.Vector3 linearHigh = m_physicsScene.TerrainManager.DefaultRegionSize;
126 OMV.Vector3 linearLow = new OMV.Vector3(-10000f, -10000f, -10000f);
127 OMV.Vector3 linearHigh = new OMV.Vector3(10000f, 10000f, 10000f);
126 if (m_controllingPrim.LockedLinearAxis.X != BSPhysObject.FreeAxis) 128 if (m_controllingPrim.LockedLinearAxis.X != BSPhysObject.FreeAxis)
127 { 129 {
128 linearLow.X = m_controllingPrim.RawPosition.X; 130 linearLow.X = m_controllingPrim.RawPosition.X;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index fc18960..c9b134c 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -426,7 +426,7 @@ public sealed class BSCharacter : BSPhysObject
426 m_targetVelocity = value; 426 m_targetVelocity = value;
427 OMV.Vector3 targetVel = value; 427 OMV.Vector3 targetVel = value;
428 if (_setAlwaysRun && !_flying) 428 if (_setAlwaysRun && !_flying)
429 targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 0f); 429 targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 1f);
430 430
431 if (m_moveActor != null) 431 if (m_moveActor != null)
432 m_moveActor.SetVelocityAndTarget(RawVelocity, targetVel, false /* inTaintTime */); 432 m_moveActor.SetVelocityAndTarget(RawVelocity, targetVel, false /* inTaintTime */);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 6264f5d..978e567 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -897,15 +897,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
897 Part.Name, Part.UUID, false); 897 Part.Name, Part.UUID, false);
898 898
899 899
900 m_log.DebugFormat( 900 m_log.Debug(string.Format(
901 "[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}", 901 "[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4} ",
902 ScriptName, 902 ScriptName,
903 PrimName, 903 PrimName,
904 Part.UUID, 904 Part.UUID,
905 Part.AbsolutePosition, 905 Part.AbsolutePosition,
906 Part.ParentGroup.Scene.Name, 906 Part.ParentGroup.Scene.Name),
907 text.Replace("\n", "\\n"), 907 e);
908 e.InnerException);
909 } 908 }
910 catch (Exception) 909 catch (Exception)
911 { 910 {
@@ -1220,4 +1219,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1220 return null; 1219 return null;
1221 } 1220 }
1222 } 1221 }
1223} \ No newline at end of file 1222}
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 08ba50d..c92e23c 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -280,11 +280,11 @@ namespace OpenSim.Server.Base
280 { 280 {
281 if (!(e is System.MissingMethodException)) 281 if (!(e is System.MissingMethodException))
282 { 282 {
283 m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}, {3}", 283 m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}",
284 interfaceName, 284 interfaceName,
285 dllName, 285 dllName,
286 e.InnerException == null ? e.Message : e.InnerException.Message, 286 e.InnerException == null ? e.Message : e.InnerException.Message),
287 e.StackTrace); 287 e);
288 } 288 }
289 m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1} args.Length {2}", dllName, e.Message, args.Length); 289 m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1} args.Length {2}", dllName, e.Message, args.Length);
290 return null; 290 return null;
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 0d7c136..5df3dda 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Server.Handlers.Asset
155 } 155 }
156 catch (Exception e) 156 catch (Exception e)
157 { 157 {
158 m_log.ErrorFormat("[XINVENTORY HANDLER]: Exception {0}", e.StackTrace); 158 m_log.Error(string.Format("[XINVENTORY HANDLER]: Exception {0} ", e.Message), e);
159 } 159 }
160 160
161 return FailureResult(); 161 return FailureResult();
diff --git a/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs b/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
index d30cc22..d55142e 100644
--- a/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
+++ b/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
@@ -273,10 +273,10 @@ namespace OpenSim.Server.Handlers
273 response.Result = OSD.SerializeMembers(note); 273 response.Result = OSD.SerializeMembers(note);
274 return true; 274 return true;
275 } 275 }
276 276
277 object Notes = (object) note; 277 response.Error.Code = ErrorCode.InternalError;
278 OSD.DeserializeMembers(ref Notes, (OSDMap)json["params"]); 278 response.Error.Message = "Error reading notes";
279 return true; 279 return false;
280 } 280 }
281 281
282 public bool NotesUpdate(OSDMap json, ref JsonRpcResponse response) 282 public bool NotesUpdate(OSDMap json, ref JsonRpcResponse response)
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index f869060..54191f6 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -50,6 +50,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
50 LogManager.GetLogger( 50 LogManager.GetLogger(
51 MethodBase.GetCurrentMethod().DeclaringType); 51 MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 private string m_ServerURLHost;
53 private string m_ServerURL; 54 private string m_ServerURL;
54 private GridRegion m_Gatekeeper; 55 private GridRegion m_Gatekeeper;
55 56
@@ -59,7 +60,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
59 60
60 public UserAgentServiceConnector(string url, bool dnsLookup) 61 public UserAgentServiceConnector(string url, bool dnsLookup)
61 { 62 {
62 m_ServerURL = url; 63 m_ServerURL = m_ServerURLHost = url;
63 64
64 if (dnsLookup) 65 if (dnsLookup)
65 { 66 {
@@ -75,7 +76,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
75 } 76 }
76 catch (Exception e) 77 catch (Exception e)
77 { 78 {
78 m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message); 79 m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", url, e.Message);
79 } 80 }
80 } 81 }
81 82
@@ -99,11 +100,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
99 m_log.Error("[USER AGENT CONNECTOR]: No Server URI named in section UserAgentService"); 100 m_log.Error("[USER AGENT CONNECTOR]: No Server URI named in section UserAgentService");
100 throw new Exception("UserAgent connector init error"); 101 throw new Exception("UserAgent connector init error");
101 } 102 }
102 m_ServerURL = serviceURI; 103
104 m_ServerURL = m_ServerURLHost = serviceURI;
103 if (!m_ServerURL.EndsWith("/")) 105 if (!m_ServerURL.EndsWith("/"))
104 m_ServerURL += "/"; 106 m_ServerURL += "/";
105 107
106 m_log.DebugFormat("[USER AGENT CONNECTOR]: UserAgentServiceConnector started for {0}", m_ServerURL); 108 //m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0}", m_ServerURL);
107 } 109 }
108 110
109 protected override string AgentPath() 111 protected override string AgentPath()
@@ -206,20 +208,20 @@ namespace OpenSim.Services.Connectors.Hypergrid
206 } 208 }
207 catch (Exception e) 209 catch (Exception e)
208 { 210 {
209 m_log.DebugFormat("[USER AGENT CONNECTOR]: {0} call to {1} failed: {2}", methodName, m_ServerURL, e.Message); 211 m_log.DebugFormat("[USER AGENT CONNECTOR]: {0} call to {1} failed: {2}", methodName, m_ServerURLHost, e.Message);
210 throw; 212 throw;
211 } 213 }
212 214
213 if (response.IsFault) 215 if (response.IsFault)
214 { 216 {
215 throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned an error: {2}", methodName, m_ServerURL, response.FaultString)); 217 throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned an error: {2}", methodName, m_ServerURLHost, response.FaultString));
216 } 218 }
217 219
218 hash = (Hashtable)response.Value; 220 hash = (Hashtable)response.Value;
219 221
220 if (hash == null) 222 if (hash == null)
221 { 223 {
222 throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned null", methodName, m_ServerURL)); 224 throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned null", methodName, m_ServerURLHost));
223 } 225 }
224 226
225 return hash; 227 return hash;
@@ -370,14 +372,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
370 } 372 }
371 catch 373 catch
372 { 374 {
373 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for StatusNotification", m_ServerURL); 375 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for StatusNotification", m_ServerURLHost);
374// reason = "Exception: " + e.Message; 376// reason = "Exception: " + e.Message;
375 return friendsOnline; 377 return friendsOnline;
376 } 378 }
377 379
378 if (response.IsFault) 380 if (response.IsFault)
379 { 381 {
380 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for StatusNotification returned an error: {1}", m_ServerURL, response.FaultString); 382 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for StatusNotification returned an error: {1}", m_ServerURLHost, response.FaultString);
381// reason = "XMLRPC Fault"; 383// reason = "XMLRPC Fault";
382 return friendsOnline; 384 return friendsOnline;
383 } 385 }
@@ -389,7 +391,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
389 { 391 {
390 if (hash == null) 392 if (hash == null)
391 { 393 {
392 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURL); 394 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURLHost);
393// reason = "Internal error 1"; 395// reason = "Internal error 1";
394 return friendsOnline; 396 return friendsOnline;
395 } 397 }
@@ -442,14 +444,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
442 } 444 }
443 catch 445 catch
444 { 446 {
445 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetOnlineFriends", m_ServerURL); 447 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetOnlineFriends", m_ServerURLHost);
446// reason = "Exception: " + e.Message; 448// reason = "Exception: " + e.Message;
447 return online; 449 return online;
448 } 450 }
449 451
450 if (response.IsFault) 452 if (response.IsFault)
451 { 453 {
452 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetOnlineFriends returned an error: {1}", m_ServerURL, response.FaultString); 454 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetOnlineFriends returned an error: {1}", m_ServerURLHost, response.FaultString);
453// reason = "XMLRPC Fault"; 455// reason = "XMLRPC Fault";
454 return online; 456 return online;
455 } 457 }
@@ -461,7 +463,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
461 { 463 {
462 if (hash == null) 464 if (hash == null)
463 { 465 {
464 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURL); 466 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURLHost);
465// reason = "Internal error 1"; 467// reason = "Internal error 1";
466 return online; 468 return online;
467 } 469 }
@@ -570,13 +572,13 @@ namespace OpenSim.Services.Connectors.Hypergrid
570 572
571 if (!hash.ContainsKey("UUID")) 573 if (!hash.ContainsKey("UUID"))
572 { 574 {
573 throw new Exception(string.Format("[USER AGENT CONNECTOR]: get_uuid call to {0} didn't return a UUID", m_ServerURL)); 575 throw new Exception(string.Format("[USER AGENT CONNECTOR]: get_uuid call to {0} didn't return a UUID", m_ServerURLHost));
574 } 576 }
575 577
576 UUID uuid; 578 UUID uuid;
577 if (!UUID.TryParse(hash["UUID"].ToString(), out uuid)) 579 if (!UUID.TryParse(hash["UUID"].ToString(), out uuid))
578 { 580 {
579 throw new Exception(string.Format("[USER AGENT CONNECTOR]: get_uuid call to {0} returned an invalid UUID: {1}", m_ServerURL, hash["UUID"].ToString())); 581 throw new Exception(string.Format("[USER AGENT CONNECTOR]: get_uuid call to {0} returned an invalid UUID: {1}", m_ServerURLHost, hash["UUID"].ToString()));
580 } 582 }
581 583
582 return uuid; 584 return uuid;
@@ -584,7 +586,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
584 586
585 private bool GetBoolResponse(XmlRpcRequest request, out string reason) 587 private bool GetBoolResponse(XmlRpcRequest request, out string reason)
586 { 588 {
587 //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); 589 //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURLHost);
588 XmlRpcResponse response = null; 590 XmlRpcResponse response = null;
589 try 591 try
590 { 592 {
@@ -592,14 +594,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
592 } 594 }
593 catch (Exception e) 595 catch (Exception e)
594 { 596 {
595 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetBoolResponse", m_ServerURL); 597 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetBoolResponse", m_ServerURLHost);
596 reason = "Exception: " + e.Message; 598 reason = "Exception: " + e.Message;
597 return false; 599 return false;
598 } 600 }
599 601
600 if (response.IsFault) 602 if (response.IsFault)
601 { 603 {
602 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetBoolResponse returned an error: {1}", m_ServerURL, response.FaultString); 604 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetBoolResponse returned an error: {1}", m_ServerURLHost, response.FaultString);
603 reason = "XMLRPC Fault"; 605 reason = "XMLRPC Fault";
604 return false; 606 return false;
605 } 607 }
@@ -611,7 +613,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
611 { 613 {
612 if (hash == null) 614 if (hash == null)
613 { 615 {
614 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got null response from {0}! THIS IS BAAAAD", m_ServerURL); 616 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got null response from {0}! THIS IS BAAAAD", m_ServerURLHost);
615 reason = "Internal error 1"; 617 reason = "Internal error 1";
616 return false; 618 return false;
617 } 619 }
@@ -622,7 +624,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
622 else 624 else
623 { 625 {
624 reason = "Internal error 2"; 626 reason = "Internal error 2";
625 m_log.WarnFormat("[USER AGENT CONNECTOR]: response from {0} does not have expected key 'result'", m_ServerURL); 627 m_log.WarnFormat("[USER AGENT CONNECTOR]: response from {0} does not have expected key 'result'", m_ServerURLHost);
626 } 628 }
627 629
628 return success; 630 return success;
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
index 0f8033d..eecf096 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
@@ -97,9 +97,9 @@ namespace OpenSim.Services.Connectors
97 } 97 }
98 catch (Exception e) 98 catch (Exception e)
99 { 99 {
100 m_log.WarnFormat( 100 m_log.Warn(string.Format(
101 "[NEIGHBOUR SERVICES CONNECTOR]: Unable to parse uri {0} to send HelloNeighbour from {1} to {2}. Exception {3}{4}", 101 "[NEIGHBOUR SERVICES CONNECTOR]: Unable to parse uri {0} to send HelloNeighbour from {1} to {2}. Exception {3} ",
102 uri, thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); 102 uri, thisRegion.RegionName, region.RegionName, e.Message), e);
103 103
104 return false; 104 return false;
105 } 105 }
@@ -116,9 +116,9 @@ namespace OpenSim.Services.Connectors
116 } 116 }
117 catch (Exception e) 117 catch (Exception e)
118 { 118 {
119 m_log.WarnFormat( 119 m_log.Warn(string.Format(
120 "[NEIGHBOUR SERVICES CONNECTOR]: PackRegionInfoData failed for HelloNeighbour from {0} to {1}. Exception {2}{3}", 120 "[NEIGHBOUR SERVICES CONNECTOR]: PackRegionInfoData failed for HelloNeighbour from {0} to {1}. Exception {2} ",
121 thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); 121 thisRegion.RegionName, region.RegionName, e.Message), e);
122 122
123 return false; 123 return false;
124 } 124 }
@@ -136,9 +136,9 @@ namespace OpenSim.Services.Connectors
136 } 136 }
137 catch (Exception e) 137 catch (Exception e)
138 { 138 {
139 m_log.WarnFormat( 139 m_log.Warn(string.Format(
140 "[NEIGHBOUR SERVICES CONNECTOR]: Exception thrown on serialization of HelloNeighbour from {0} to {1}. Exception {2}{3}", 140 "[NEIGHBOUR SERVICES CONNECTOR]: Exception thrown on serialization of HelloNeighbour from {0} to {1}. Exception {2} ",
141 thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); 141 thisRegion.RegionName, region.RegionName, e.Message), e);
142 142
143 return false; 143 return false;
144 } 144 }
@@ -153,9 +153,9 @@ namespace OpenSim.Services.Connectors
153 } 153 }
154 catch (Exception e) 154 catch (Exception e)
155 { 155 {
156 m_log.WarnFormat( 156 m_log.Warn(string.Format(
157 "[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}", 157 "[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1} (uri {2}). Exception {3} ",
158 thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); 158 thisRegion.RegionName, region.RegionName, uri, e.Message), e);
159 159
160 return false; 160 return false;
161 } 161 }
@@ -192,9 +192,9 @@ namespace OpenSim.Services.Connectors
192 } 192 }
193 catch (Exception e) 193 catch (Exception e)
194 { 194 {
195 m_log.WarnFormat( 195 m_log.Warn(string.Format(
196 "[NEIGHBOUR SERVICES CONNECTOR]: Exception on reply of DoHelloNeighbourCall from {0} back to {1}. Exception {2}{3}", 196 "[NEIGHBOUR SERVICES CONNECTOR]: Exception on reply of DoHelloNeighbourCall from {0} back to {1}. Exception {2} ",
197 region.RegionName, thisRegion.RegionName, e.Message, e.StackTrace); 197 region.RegionName, thisRegion.RegionName, e.Message), e);
198 198
199 return false; 199 return false;
200 } 200 }
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index aca414b..171beaa 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -421,11 +421,18 @@ namespace OpenSim.Services.Connectors.Simulation
421 args["destination_name"] = OSD.FromString(destination.RegionName); 421 args["destination_name"] = OSD.FromString(destination.RegionName);
422 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 422 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
423 423
424 WebUtil.PostToService(uri, args, 40000); 424 OSDMap result = WebUtil.PostToService(uri, args, 40000);
425
426 if (result == null)
427 return false;
428 bool success = result["success"].AsBoolean();
429 if (!success)
430 return false;
425 } 431 }
426 catch (Exception e) 432 catch (Exception e)
427 { 433 {
428 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString()); 434 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString());
435 return false;
429 } 436 }
430 437
431 return true; 438 return true;
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index f6136b5..7a0228b 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -228,17 +228,19 @@ namespace OpenSim.Services.HypergridService
228 aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionName, 228 aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionName,
229 aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0, aCircuit.teleportFlags.ToString()); 229 aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0, aCircuit.teleportFlags.ToString());
230 230
231 string curViewer = Util.GetViewerName(aCircuit);
232
231 // 233 //
232 // Check client 234 // Check client
233 // 235 //
234 if (m_AllowedClients != string.Empty) 236 if (m_AllowedClients != string.Empty)
235 { 237 {
236 Regex arx = new Regex(m_AllowedClients); 238 Regex arx = new Regex(m_AllowedClients);
237 Match am = arx.Match(aCircuit.Viewer); 239 Match am = arx.Match(curViewer);
238 240
239 if (!am.Success) 241 if (!am.Success)
240 { 242 {
241 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is not allowed", aCircuit.Viewer); 243 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is not allowed", curViewer);
242 return false; 244 return false;
243 } 245 }
244 } 246 }
@@ -246,11 +248,11 @@ namespace OpenSim.Services.HypergridService
246 if (m_DeniedClients != string.Empty) 248 if (m_DeniedClients != string.Empty)
247 { 249 {
248 Regex drx = new Regex(m_DeniedClients); 250 Regex drx = new Regex(m_DeniedClients);
249 Match dm = drx.Match(aCircuit.Viewer); 251 Match dm = drx.Match(curViewer);
250 252
251 if (dm.Success) 253 if (dm.Success)
252 { 254 {
253 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is denied", aCircuit.Viewer); 255 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is denied", curViewer);
254 return false; 256 return false;
255 } 257 }
256 } 258 }
diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs
index 84dec8d..5c804d4 100644
--- a/OpenSim/Services/HypergridService/HGAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGAssetService.cs
@@ -76,10 +76,10 @@ namespace OpenSim.Services.HypergridService
76 if (m_UserAccountService == null) 76 if (m_UserAccountService == null)
77 throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); 77 throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
78 78
79 // legacy configuration [obsolete] 79 m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI",
80 m_HomeURL = assetConfig.GetString("ProfileServerURI", string.Empty); 80 new string[] { "Startup", "Hypergrid", configName }, string.Empty);
81 // Preferred 81 if (m_HomeURL == string.Empty)
82 m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL); 82 throw new Exception("[HGAssetService] No HomeURI specified");
83 83
84 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); 84 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
85 85
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 90ce44a..1608039 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -215,25 +215,17 @@ namespace OpenSim.Services.HypergridService
215 if (suitcase == null) 215 if (suitcase == null)
216 { 216 {
217 m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder"); 217 m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder");
218 return null;
218 } 219 }
219 else 220
220 { 221 m_Database.StoreFolder(suitcase);
221 m_Database.StoreFolder(suitcase);
222
223 // Create System folders
224 CreateSystemFolders(principalID, suitcase.folderID);
225 222
226 SetAsNormalFolder(suitcase); 223 CreateSystemFolders(principalID, suitcase.folderID);
227
228 return ConvertToOpenSim(suitcase);
229 }
230 }
231 else
232 {
233 return ConvertToOpenSim(suitcase);
234 } 224 }
235 225
236 return null; 226 SetAsNormalFolder(suitcase);
227
228 return ConvertToOpenSim(suitcase);
237 } 229 }
238 230
239 protected void CreateSystemFolders(UUID principalID, UUID rootID) 231 protected void CreateSystemFolders(UUID principalID, UUID rootID)
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 46a5c18..b61b5e8 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -58,6 +58,7 @@ namespace OpenSim.Services.LLLoginService
58 protected IGridUserService m_GridUserService; 58 protected IGridUserService m_GridUserService;
59 protected IAuthenticationService m_AuthenticationService; 59 protected IAuthenticationService m_AuthenticationService;
60 protected IInventoryService m_InventoryService; 60 protected IInventoryService m_InventoryService;
61 protected IInventoryService m_HGInventoryService;
61 protected IGridService m_GridService; 62 protected IGridService m_GridService;
62 protected IPresenceService m_PresenceService; 63 protected IPresenceService m_PresenceService;
63 protected ISimulationService m_LocalSimulationService; 64 protected ISimulationService m_LocalSimulationService;
@@ -165,6 +166,15 @@ namespace OpenSim.Services.LLLoginService
165 if (agentService != string.Empty) 166 if (agentService != string.Empty)
166 m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(agentService, args); 167 m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(agentService, args);
167 168
169 // Get the Hypergrid inventory service (exists only if Hypergrid is enabled)
170 string hgInvServicePlugin = m_LoginServerConfig.GetString("HGInventoryServicePlugin", String.Empty);
171 if (hgInvServicePlugin != string.Empty)
172 {
173 string hgInvServiceArg = m_LoginServerConfig.GetString("HGInventoryServiceConstructorArg", String.Empty);
174 Object[] args2 = new Object[] { config, hgInvServiceArg };
175 m_HGInventoryService = ServerUtils.LoadPlugin<IInventoryService>(hgInvServicePlugin, args2);
176 }
177
168 // 178 //
169 // deal with the services given as argument 179 // deal with the services given as argument
170 // 180 //
@@ -350,6 +360,13 @@ namespace OpenSim.Services.LLLoginService
350 return LLFailedLoginResponse.InventoryProblem; 360 return LLFailedLoginResponse.InventoryProblem;
351 } 361 }
352 362
363 if (m_HGInventoryService != null)
364 {
365 // Give the Suitcase service a chance to create the suitcase folder.
366 // (If we're not using the Suitcase inventory service then this won't do anything.)
367 m_HGInventoryService.GetRootFolder(account.PrincipalID);
368 }
369
353 List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID); 370 List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID);
354 if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0))) 371 if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0)))
355 { 372 {
diff --git a/Prebuild/prebuild.xml b/Prebuild/prebuild.xml
index 588d788..f39175b 100644
--- a/Prebuild/prebuild.xml
+++ b/Prebuild/prebuild.xml
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.9.xsd" version="1.9"> 2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd" version="1.10">
3 <Solution name="Prebuild" version="2.0.5"> 3 <Solution name="Prebuild" version="2.0.6">
4 <Configuration name="Debug"> 4 <Configuration name="Debug">
5 <Options> 5 <Options>
6 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 6 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
@@ -31,7 +31,7 @@
31 type="Exe" 31 type="Exe"
32 rootNamespace="Prebuild" 32 rootNamespace="Prebuild"
33 startupObject="Prebuild.Prebuild" 33 startupObject="Prebuild.Prebuild"
34 version="2.0.5" 34 version="2.0.6"
35 frameworkVersion="v3_5" 35 frameworkVersion="v3_5"
36 > 36 >
37 <Author>Matthew Holmes (matthew@wildfiregames.com)</Author> 37 <Author>Matthew Holmes (matthew@wildfiregames.com)</Author>
@@ -66,7 +66,7 @@
66 <Reference name="System" /> 66 <Reference name="System" />
67 <Files> 67 <Files>
68 <Match pattern="App.ico" buildAction="EmbeddedResource"/> 68 <Match pattern="App.ico" buildAction="EmbeddedResource"/>
69 <Match path="data" pattern="prebuild-1.9.xsd" buildAction="EmbeddedResource"/> 69 <Match path="data" pattern="prebuild-1.10.xsd" buildAction="EmbeddedResource"/>
70 <Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/> 70 <Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/>
71 <Match pattern="*.cs" recurse="true"/> 71 <Match pattern="*.cs" recurse="true"/>
72 </Files> 72 </Files>
diff --git a/Prebuild/src/Core/Kernel.cs b/Prebuild/src/Core/Kernel.cs
index 67051d5..761962e 100644
--- a/Prebuild/src/Core/Kernel.cs
+++ b/Prebuild/src/Core/Kernel.cs
@@ -73,7 +73,7 @@ namespace Prebuild.Core
73 /// <summary> 73 /// <summary>
74 /// This must match the version of the schema that is embeeded 74 /// This must match the version of the schema that is embeeded
75 /// </summary> 75 /// </summary>
76 private const string m_SchemaVersion = "1.9"; 76 private const string m_SchemaVersion = "1.10";
77 private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd"; 77 private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd";
78 private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema; 78 private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema;
79 bool disposed; 79 bool disposed;
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs
index fb92b32..a822704 100644
--- a/Prebuild/src/Core/Nodes/ProjectNode.cs
+++ b/Prebuild/src/Core/Nodes/ProjectNode.cs
@@ -93,7 +93,15 @@ namespace Prebuild.Core.Nodes
93 /// .NET 4.0 93 /// .NET 4.0
94 /// </summary> 94 /// </summary>
95 v4_0, 95 v4_0,
96 } 96 /// <summary>
97 /// .NET 4.5
98 /// </summary>
99 v4_5,
100 /// <summary>
101 /// .NET 4.5.1
102 /// </summary>
103 v4_5_1
104 }
97 /// <summary> 105 /// <summary>
98 /// The Node object representing /Prebuild/Solution/Project elements 106 /// The Node object representing /Prebuild/Solution/Project elements
99 /// </summary> 107 /// </summary>
diff --git a/Prebuild/src/Core/Targets/VS2010Target.cs b/Prebuild/src/Core/Targets/VS2010Target.cs
index ea9f736..e8aeab5 100644
--- a/Prebuild/src/Core/Targets/VS2010Target.cs
+++ b/Prebuild/src/Core/Targets/VS2010Target.cs
@@ -1,138 +1,140 @@
1using System; 1using System;
2using System.IO; 2using System.IO;
3using System.Text; 3using System.Text;
4 4
5using Prebuild.Core.Attributes; 5using Prebuild.Core.Attributes;
6using Prebuild.Core.Interfaces; 6using Prebuild.Core.Interfaces;
7using Prebuild.Core.Nodes; 7using Prebuild.Core.Nodes;
8using Prebuild.Core.Utilities; 8using Prebuild.Core.Utilities;
9using System.CodeDom.Compiler; 9using System.CodeDom.Compiler;
10 10
11namespace Prebuild.Core.Targets 11namespace Prebuild.Core.Targets
12{ 12{
13 13
14 /// <summary> 14 /// <summary>
15 /// 15 ///
16 /// </summary> 16 /// </summary>
17 [Target("vs2010")] 17 [Target("vs2010")]
18 public class VS2010Target : VSGenericTarget 18 public class VS2010Target : VSGenericTarget
19 { 19 {
20 #region Fields 20 #region Fields
21 21
22 string solutionVersion = "11.00"; 22 string solutionVersion = "11.00";
23 string productVersion = "9.0.30729"; 23 string productVersion = "9.0.30729";
24 string schemaVersion = "2.0"; 24 string schemaVersion = "2.0";
25 string versionName = "Visual Studio 2010"; 25 string versionName = "Visual Studio 2010";
26 string name = "vs2010"; 26 string name = "vs2010";
27 VSVersion version = VSVersion.VS10; 27 VSVersion version = VSVersion.VS10;
28 28
29 #endregion 29 #endregion
30 30
31 #region Properties 31 #region Properties
32 32
33 /// <summary> 33 /// <summary>
34 /// Gets or sets the solution version. 34 /// Gets or sets the solution version.
35 /// </summary> 35 /// </summary>
36 /// <value>The solution version.</value> 36 /// <value>The solution version.</value>
37 public override string SolutionVersion 37 public override string SolutionVersion
38 { 38 {
39 get 39 get
40 { 40 {
41 return solutionVersion; 41 return solutionVersion;
42 } 42 }
43 } 43 }
44 44
45 /// <summary> 45 /// <summary>
46 /// Gets or sets the product version. 46 /// Gets or sets the product version.
47 /// </summary> 47 /// </summary>
48 /// <value>The product version.</value> 48 /// <value>The product version.</value>
49 public override string ProductVersion 49 public override string ProductVersion
50 { 50 {
51 get 51 get
52 { 52 {
53 return productVersion; 53 return productVersion;
54 } 54 }
55 } 55 }
56 56
57 /// <summary> 57 /// <summary>
58 /// Gets or sets the schema version. 58 /// Gets or sets the schema version.
59 /// </summary> 59 /// </summary>
60 /// <value>The schema version.</value> 60 /// <value>The schema version.</value>
61 public override string SchemaVersion 61 public override string SchemaVersion
62 { 62 {
63 get 63 get
64 { 64 {
65 return schemaVersion; 65 return schemaVersion;
66 } 66 }
67 } 67 }
68 68
69 /// <summary> 69 /// <summary>
70 /// Gets or sets the name of the version. 70 /// Gets or sets the name of the version.
71 /// </summary> 71 /// </summary>
72 /// <value>The name of the version.</value> 72 /// <value>The name of the version.</value>
73 public override string VersionName 73 public override string VersionName
74 { 74 {
75 get 75 get
76 { 76 {
77 return versionName; 77 return versionName;
78 } 78 }
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// Gets or sets the version. 82 /// Gets or sets the version.
83 /// </summary> 83 /// </summary>
84 /// <value>The version.</value> 84 /// <value>The version.</value>
85 public override VSVersion Version 85 public override VSVersion Version
86 { 86 {
87 get 87 get
88 { 88 {
89 return version; 89 return version;
90 } 90 }
91 } 91 }
92 92
93 /// <summary> 93 /// <summary>
94 /// Gets the name. 94 /// Gets the name.
95 /// </summary> 95 /// </summary>
96 /// <value>The name.</value> 96 /// <value>The name.</value>
97 public override string Name 97 public override string Name
98 { 98 {
99 get 99 get
100 { 100 {
101 return name; 101 return name;
102 } 102 }
103 } 103 }
104 104
105 protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) 105 protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
106 { 106 {
107 switch (frameworkVersion) 107 switch (frameworkVersion)
108 { 108 {
109 case FrameworkVersion.v4_0: 109 case FrameworkVersion.v4_5_1:
110 case FrameworkVersion.v3_5: 110 case FrameworkVersion.v4_5:
111 return "ToolsVersion=\"4.0\""; 111 case FrameworkVersion.v4_0:
112 case FrameworkVersion.v3_0: 112 case FrameworkVersion.v3_5:
113 return "ToolsVersion=\"3.0\""; 113 return "ToolsVersion=\"4.0\"";
114 default: 114 case FrameworkVersion.v3_0:
115 return "ToolsVersion=\"2.0\""; 115 return "ToolsVersion=\"3.0\"";
116 } 116 default:
117 } 117 return "ToolsVersion=\"2.0\"";
118 118 }
119 public override string SolutionTag 119 }
120 { 120
121 get { return "# Visual Studio 2010"; } 121 public override string SolutionTag
122 } 122 {
123 123 get { return "# Visual Studio 2010"; }
124 #endregion 124 }
125 125
126 #region Constructors 126 #endregion
127 127
128 /// <summary> 128 #region Constructors
129 /// Initializes a new instance of the <see cref="VS2005Target"/> class. 129
130 /// </summary> 130 /// <summary>
131 public VS2010Target() 131 /// Initializes a new instance of the <see cref="VS2005Target"/> class.
132 : base() 132 /// </summary>
133 { 133 public VS2010Target()
134 } 134 : base()
135 135 {
136 #endregion 136 }
137 } 137
138} 138 #endregion
139 }
140}
diff --git a/Prebuild/src/Properties/AssemblyInfo.cs b/Prebuild/src/Properties/AssemblyInfo.cs
index f3ac30f..013743d 100644
--- a/Prebuild/src/Properties/AssemblyInfo.cs
+++ b/Prebuild/src/Properties/AssemblyInfo.cs
@@ -61,7 +61,7 @@ using System.Resources;
61[assembly: AssemblyConfiguration(".NET CLR")] 61[assembly: AssemblyConfiguration(".NET CLR")]
62[assembly: AssemblyCompany("The Prebuild Project")] 62[assembly: AssemblyCompany("The Prebuild Project")]
63[assembly: AssemblyProduct("")] 63[assembly: AssemblyProduct("")]
64[assembly: AssemblyCopyright("Copyright 2004-2010 " + 64[assembly: AssemblyCopyright("Copyright 2004-2013 " +
65 "Matthew Holmes, " + 65 "Matthew Holmes, " +
66 "Dan Moorehead, " + 66 "Dan Moorehead, " +
67 "C.J. Adams-Collier, " + 67 "C.J. Adams-Collier, " +
@@ -71,7 +71,7 @@ using System.Resources;
71[assembly: AssemblyTrademark("")] 71[assembly: AssemblyTrademark("")]
72[assembly: AssemblyCulture("")] 72[assembly: AssemblyCulture("")]
73[assembly: NeutralResourcesLanguageAttribute("en-US")] 73[assembly: NeutralResourcesLanguageAttribute("en-US")]
74[assembly: AssemblyVersion("2.0.5.*")] 74[assembly: AssemblyVersion("2.0.6.*")]
75 75
76// 76//
77// Version information for an assembly consists of the following four values: 77// Version information for an assembly consists of the following four values:
diff --git a/Prebuild/src/data/prebuild-1.10.xsd b/Prebuild/src/data/prebuild-1.10.xsd
new file mode 100644
index 0000000..eee07a8
--- /dev/null
+++ b/Prebuild/src/data/prebuild-1.10.xsd
@@ -0,0 +1,338 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd">
3 <xs:annotation>
4 <xs:documentation>
5 Copyright (c) 2004-2007
6 Matthew Holmes (calefaction at houston . rr . com),
7 Dan Moorehead (dan05a at gmail . com),
8 David Hudson (jendave at yahoo dot com),
9 C.J. Adams-Collier (cjac at colliertech dot com)
10
11 .NET Prebuild is a cross-platform XML-driven pre-build tool which
12 allows developers to easily generate project or make files for major
13 IDE's and .NET development tools including: Visual Studio .NET 2002,
14 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools.
15
16 BSD License:
17
18 Redistribution and use in source and binary forms, with or without modification, are permitted
19 provided that the following conditions are met:
20
21 * Redistributions of source code must retain the above copyright notice, this list of conditions
22 and the following disclaimer.
23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
24 and the following disclaimer in the documentation and/or other materials provided with the
25 distribution.
26 * The name of the author may not be used to endorse or promote products derived from this software
27 without specific prior written permission.
28
29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 </xs:documentation>
37 </xs:annotation>
38
39 <xs:element name="Prebuild">
40 <xs:complexType>
41 <xs:sequence>
42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
43 <xs:element ref="Solution" minOccurs="1" maxOccurs="1" />
44 </xs:sequence>
45 <xs:attribute name="version" />
46 <xs:attribute name="checkOsVars" />
47 </xs:complexType>
48 </xs:element>
49
50 <xs:element name="Process" type="xs:string" />
51
52 <xs:element name="Solution">
53 <xs:complexType>
54 <xs:sequence>
55 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
56 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
57 <xs:element ref="Options" minOccurs="0" />
58 <xs:element ref="Files" minOccurs="0" />
59 <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" />
60 <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" />
61 <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" />
62 </xs:sequence>
63 <xs:attribute name="name" type="xs:string" use="required" />
64 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
65 <xs:attribute name="path" type="xs:string" default="" />
66 <xs:attribute name="version" type="xs:string" default="1.0.0" />
67 </xs:complexType>
68 </xs:element>
69
70 <xs:element name="EmbeddedSolution">
71 <xs:complexType>
72 <xs:sequence>
73 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
74 <xs:element ref="Files" minOccurs="0" />
75 <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" />
76 <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" />
77 <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" />
78 </xs:sequence>
79 <xs:attribute name="name" type="xs:string" use="required" />
80 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
81 <xs:attribute name="path" type="xs:string" default="" />
82 <xs:attribute name="version" type="xs:string" default="1.0.0" />
83 </xs:complexType>
84 </xs:element>
85
86 <xs:element name="DatabaseProject">
87 <xs:complexType>
88 <xs:sequence>
89 <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
90 <xs:element ref="DatabaseReference" minOccurs="0" maxOccurs="unbounded" />
91 </xs:sequence>
92 <xs:attribute name="name" type="xs:string" use="required" />
93 <xs:attribute name="path" type="xs:string" />
94 </xs:complexType>
95 </xs:element>
96
97 <xs:element name="DatabaseReference">
98 <xs:complexType>
99 <xs:attribute name="name" type="xs:string" use="required" />
100 <xs:attribute name="providerId" type="xs:string" />
101 <xs:attribute name="providerName" type="xs:string" />
102 <xs:attribute name="connectionString" type="xs:string" use="required" />
103 </xs:complexType>
104 </xs:element>
105
106 <xs:element name="Project">
107 <xs:complexType>
108 <xs:sequence>
109 <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
110 <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" />
111 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
112 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
113 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
114 <xs:complexType>
115 <xs:attribute name="name" type="xs:string" use="required" />
116 <xs:attribute name="path" type="xs:string" />
117 <xs:attribute name="localCopy" type="xs:boolean" />
118 <xs:attribute name="version" type="xs:string" />
119 </xs:complexType>
120 </xs:element>
121 <xs:element ref="Files" />
122 </xs:sequence>
123 <xs:attribute name="name" type="xs:string" use="required" />
124 <xs:attribute name="designerFolder" type="xs:string" default="" />
125 <xs:attribute name="filterGroups" type="xs:string" default="" />
126 <xs:attribute name="path" type="xs:string" default="" />
127 <xs:attribute name="icon" type="xs:string" default="" />
128 <xs:attribute name="configFile" type="xs:string" default="" />
129 <xs:attribute name="version" type="xs:string" default="1.0.0" />
130 <xs:attribute name="guid" type="xs:string"/>
131 <xs:attribute name="language" default="C#">
132 <xs:simpleType>
133 <xs:restriction base="xs:string">
134 <xs:enumeration value="C#" />
135 <xs:enumeration value="VB.NET" />
136 </xs:restriction>
137 </xs:simpleType>
138 </xs:attribute>
139 <xs:attribute name="type" default="Exe">
140 <xs:simpleType>
141 <xs:restriction base="xs:string">
142 <xs:enumeration value="Exe" />
143 <xs:enumeration value="WinExe" />
144 <xs:enumeration value="Library" />
145 <xs:enumeration value="Web" />
146 </xs:restriction>
147 </xs:simpleType>
148 </xs:attribute>
149 <xs:attribute name="runtime" default="Microsoft">
150 <xs:simpleType>
151 <xs:restriction base="xs:string">
152 <xs:enumeration value="Microsoft" />
153 <xs:enumeration value="Mono" />
154 </xs:restriction>
155 </xs:simpleType>
156 </xs:attribute>
157 <xs:attribute name="frameworkVersion" default="v2_0">
158 <xs:simpleType>
159 <xs:restriction base="xs:string">
160 <xs:enumeration value="v2_0" />
161 <xs:enumeration value="v3_0" />
162 <xs:enumeration value="v3_5" />
163 <xs:enumeration value="v4_0" />
164 <xs:enumeration value="v4_5" />
165 <xs:enumeration value="v4_5_1" />
166 </xs:restriction>
167 </xs:simpleType>
168 </xs:attribute>
169 <xs:attribute name="startupObject" type="xs:string" default="" />
170 <xs:attribute name="rootNamespace" type="xs:string" />
171 <xs:attribute name="assemblyName" type="xs:string" />
172 <xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false" />
173 </xs:complexType>
174 </xs:element>
175
176 <xs:element name="Configuration">
177 <xs:complexType>
178 <xs:sequence>
179 <xs:element ref="Options" minOccurs="0" />
180 </xs:sequence>
181 <xs:attribute name="name" type="xs:string" use="required" />
182 <xs:attribute name="platform" type="xs:string" use="required" />
183 </xs:complexType>
184 </xs:element>
185 <xs:element name="Options">
186 <xs:complexType>
187 <xs:all>
188 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
189 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
190 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
191 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
192 <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" />
193 <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" />
194 <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess">
195 <xs:simpleType>
196 <xs:restriction base="xs:string">
197 <xs:enumeration value="OnBuildSuccess" />
198 <xs:enumeration value="Always" />
199 <xs:enumeration value="OnOutputUpdated" />
200 </xs:restriction>
201 </xs:simpleType>
202 </xs:element>
203 <xs:element name="RunScript" type="xs:string" minOccurs="0" />
204 <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" />
205 <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" />
206 <xs:element name="WarningLevel" minOccurs="0">
207 <xs:simpleType>
208 <xs:restriction base="xs:integer">
209 <xs:minInclusive value="0" />
210 <xs:maxInclusive value="4" />
211 </xs:restriction>
212 </xs:simpleType>
213 </xs:element>
214 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
215 <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" />
216 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
217 <xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" />
218 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
219 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
220 <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" />
221 <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" />
222 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
223 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
224 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
225 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
226 <xs:element name="KeyFile" type="xs:string" minOccurs="0" />
227 </xs:all>
228 </xs:complexType>
229 </xs:element>
230 <xs:element name="Files">
231 <xs:complexType>
232 <xs:sequence>
233 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
234 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
235 </xs:sequence>
236 </xs:complexType>
237 </xs:element>
238 <xs:element name="File">
239 <xs:complexType>
240 <xs:simpleContent>
241 <xs:extension base="xs:string">
242 <xs:attribute name="resourceName" type="xs:string" default="" />
243 <xs:attribute name="buildAction" default="Compile">
244 <xs:simpleType>
245 <xs:restriction base="xs:string">
246 <xs:enumeration value="None" />
247 <xs:enumeration value="Compile" />
248 <xs:enumeration value="Content" />
249 <xs:enumeration value="EmbeddedResource" />
250 <xs:enumeration value="ApplicationDefinition" />
251 <xs:enumeration value="Page" />
252 </xs:restriction>
253 </xs:simpleType>
254 </xs:attribute>
255 <xs:attribute name="subType" default="Code">
256 <xs:simpleType>
257 <xs:restriction base="xs:string">
258 <xs:enumeration value="Code" />
259 <xs:enumeration value="CodeBehind" />
260 <xs:enumeration value="Component" />
261 <xs:enumeration value="Form" />
262 <xs:enumeration value="Settings" />
263 <xs:enumeration value="UserControl" />
264 </xs:restriction>
265 </xs:simpleType>
266 </xs:attribute>
267 <xs:attribute name="link" type="xs:boolean" />
268 <xs:attribute name="copyToOutput" default="Never">
269 <xs:simpleType>
270 <xs:restriction base="xs:string">
271 <xs:enumeration value="Never" />
272 <xs:enumeration value="Always" />
273 <xs:enumeration value="PreserveNewest" />
274 </xs:restriction>
275 </xs:simpleType>
276 </xs:attribute>
277 <xs:attribute name="preservePath" type="xs:boolean" />
278 <xs:attribute name="linkPath" type="xs:string" />
279 </xs:extension>
280 </xs:simpleContent>
281 </xs:complexType>
282 </xs:element>
283 <xs:element name="Match">
284 <xs:complexType>
285 <xs:sequence>
286 <xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" />
287 </xs:sequence>
288 <xs:attribute name="path" type="xs:string" />
289 <xs:attribute name="pattern" type="xs:string" use="required" />
290 <xs:attribute name="recurse" type="xs:boolean" default="false" />
291 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
292 <xs:attribute name="buildAction" default="Compile">
293 <xs:simpleType>
294 <xs:restriction base="xs:string">
295 <xs:enumeration value="None" />
296 <xs:enumeration value="Compile" />
297 <xs:enumeration value="Content" />
298 <xs:enumeration value="EmbeddedResource" />
299 <xs:enumeration value="ApplicationDefinition" />
300 <xs:enumeration value="Page" />
301 </xs:restriction>
302 </xs:simpleType>
303 </xs:attribute>
304 <xs:attribute name="resourceName" type="xs:string" default="" />
305 <xs:attribute name="subType" default="Code">
306 <xs:simpleType>
307 <xs:restriction base="xs:string">
308 <xs:enumeration value="Code" />
309 <xs:enumeration value="CodeBehind" />
310 <xs:enumeration value="Component" />
311 <xs:enumeration value="Designer" />
312 <xs:enumeration value="Form" />
313 <xs:enumeration value="Settings" />
314 <xs:enumeration value="UserControl" />
315 </xs:restriction>
316 </xs:simpleType>
317 </xs:attribute>
318 <xs:attribute name="link" type="xs:boolean" />
319 <xs:attribute name="copyToOutput" default="Never">
320 <xs:simpleType>
321 <xs:restriction base="xs:string">
322 <xs:enumeration value="Never" />
323 <xs:enumeration value="Always" />
324 <xs:enumeration value="PreserveNewest" />
325 </xs:restriction>
326 </xs:simpleType>
327 </xs:attribute>
328 <xs:attribute name="preservePath" type="xs:boolean" />
329 <xs:attribute name="linkPath" type="xs:string" />
330 </xs:complexType>
331 </xs:element>
332 <xs:element name="Exclude">
333 <xs:complexType>
334 <xs:attribute name="name" type="xs:string" />
335 <xs:attribute name="pattern" type="xs:string" />
336 </xs:complexType>
337 </xs:element>
338</xs:schema>
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index d8474d3..4f2563c 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -57,6 +57,12 @@
57 ; when running with the SmartThreadPool option above 57 ; when running with the SmartThreadPool option above
58 MaxPoolThreads = 15 58 MaxPoolThreads = 15
59 59
60 ; Plugin Registry Location
61 ; Set path to directory for plugin registry. Information about the
62 ; registered repositories and installed plugins will be stored here.
63 ; The OpenSim.exe process must have R/W access to the location.
64 ; RegistryLocation = "."
65
60 ; ## 66 ; ##
61 ; ## CLIENTS 67 ; ## CLIENTS
62 ; ## 68 ; ##
diff --git a/bin/Prebuild.exe b/bin/Prebuild.exe
index 1d4a8e8..cc64706 100755
--- a/bin/Prebuild.exe
+++ b/bin/Prebuild.exe
Binary files differ
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index 245f363..14e9bff 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -335,6 +335,10 @@ HGAssetServiceConnector = "HGAssetService@8002/OpenSim.Server.Handlers.dll:Asset
335 UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" 335 UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
336 FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" 336 FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
337 337
338 ; This inventory service will be used to initialize the user's inventory
339 HGInventoryServicePlugin = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService"
340 HGInventoryServiceConstructorArg = "HGInventoryService"
341
338 ;; Ask co-operative viewers to use a different currency name 342 ;; Ask co-operative viewers to use a different currency name
339 ;Currency = "" 343 ;Currency = ""
340 344
@@ -634,7 +638,7 @@ HGAssetServiceConnector = "HGAssetService@8002/OpenSim.Server.Handlers.dll:Asset
634 ;; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;" 638 ;; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;"
635 ;; Realm = UserProfiles 639 ;; Realm = UserProfiles
636 UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService 640 UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService
637 AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService 641 AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
638 642
639[BakedTextureService] 643[BakedTextureService]
640 LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" 644 LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes"
diff --git a/prebuild.xml b/prebuild.xml
index c16d6e6..80ee2c0 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<Prebuild version="1.7" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> 2<Prebuild version="1.10" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd">
3 <Solution activeConfig="Debug" name="OpenSim" path="./" version="0.5.0-$Rev$"> 3 <Solution activeConfig="Debug" name="OpenSim" path="./" version="0.5.0-$Rev$">
4 <Configuration name="Debug"> 4 <Configuration name="Debug">
5 <Options> 5 <Options>
diff --git a/runprebuild.bat b/runprebuild.bat
index 5f75982..ed2def1 100755
--- a/runprebuild.bat
+++ b/runprebuild.bat
@@ -7,11 +7,19 @@ setlocal ENABLEEXTENSIONS
7set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" 7set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"
8set VALUE_NAME=MSBuildToolsPath 8set VALUE_NAME=MSBuildToolsPath
9 9
10rem We have to use find here as req query spits out 4 lines before Windows 7 10rem We have to use grep or find to locate the correct line, because reg query spits
11rem But 2 lines after Windows 7. Unfortunately, this screws up cygwin 11rem out 4 lines before Windows 7 but 2 lines after Windows 7.
12rem as it uses its own find command. This could be fixed but it could be 12rem We use grep if it's on the path; otherwise we use the built-in find command
13rem complex to find the location of find on all windows systems 13rem from Windows. (We must use grep on Cygwin because it overrides the "find" command.)
14FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| FIND "%VALUE_NAME%"`) DO ( 14
15for %%X in (grep.exe) do (set FOUNDGREP=%%~$PATH:X)
16if defined FOUNDGREP (
17 set FINDCMD=grep
18) else (
19 set FINDCMD=find
20)
21
22FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| %FINDCMD% "%VALUE_NAME%"`) DO (
15 set ValueName=%%A 23 set ValueName=%%A
16 set ValueType=%%B 24 set ValueType=%%B
17 set ValueValue=%%C 25 set ValueValue=%%C