aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Communications/RestClient.cs2
-rw-r--r--OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs119
-rw-r--r--OpenSim/Framework/Configuration/HTTP/RemoteConfigSettings.cs63
-rw-r--r--OpenSim/Framework/Configuration/XML/XmlConfiguration.cs141
-rw-r--r--OpenSim/Framework/Watchdog.cs6
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs15
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs9
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs13
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs18
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs40
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
-rw-r--r--OpenSim/Services/GridService/GridService.cs3
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs103
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs16
-rw-r--r--OpenSim/Tools/Configger/ConfigurationLoader.cs15
19 files changed, 472 insertions, 114 deletions
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index 97b3b60..42c0b18 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -363,7 +363,7 @@ namespace OpenSim.Framework.Communications
363 _request = (HttpWebRequest) WebRequest.Create(buildUri()); 363 _request = (HttpWebRequest) WebRequest.Create(buildUri());
364 _request.KeepAlive = false; 364 _request.KeepAlive = false;
365 _request.ContentType = "application/xml"; 365 _request.ContentType = "application/xml";
366 _request.Timeout = 900000; 366 _request.Timeout = 30000;
367 _request.Method = RequestMethod; 367 _request.Method = RequestMethod;
368 _asyncException = null; 368 _asyncException = null;
369 _request.ContentLength = src.Length; 369 _request.ContentLength = src.Length;
diff --git a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
new file mode 100644
index 0000000..3dce578
--- /dev/null
+++ b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
@@ -0,0 +1,119 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using System.Net;
31using System.Reflection;
32using System.Text;
33using log4net;
34using OpenSim.Framework.Configuration.XML;
35
36namespace OpenSim.Framework.Configuration.HTTP
37{
38 public class HTTPConfiguration : IGenericConfig
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41
42 private RemoteConfigSettings remoteConfigSettings;
43
44 private XmlConfiguration xmlConfig;
45
46 private string configFileName = String.Empty;
47
48 public HTTPConfiguration()
49 {
50 remoteConfigSettings = new RemoteConfigSettings("remoteconfig.xml");
51 xmlConfig = new XmlConfiguration();
52 }
53
54 public void SetFileName(string fileName)
55 {
56 configFileName = fileName;
57 }
58
59 public void LoadData()
60 {
61 try
62 {
63 StringBuilder sb = new StringBuilder();
64
65 byte[] buf = new byte[8192];
66 HttpWebRequest request =
67 (HttpWebRequest) WebRequest.Create(remoteConfigSettings.baseConfigURL + configFileName);
68 HttpWebResponse response = (HttpWebResponse) request.GetResponse();
69
70 Stream resStream = response.GetResponseStream();
71
72 string tempString = null;
73 int count = 0;
74
75 do
76 {
77 count = resStream.Read(buf, 0, buf.Length);
78 if (count != 0)
79 {
80 tempString = Util.UTF8.GetString(buf, 0, count);
81 sb.Append(tempString);
82 }
83 } while (count > 0);
84 LoadDataFromString(sb.ToString());
85 }
86 catch (WebException)
87 {
88 m_log.Warn("Unable to connect to remote configuration file (" +
89 remoteConfigSettings.baseConfigURL + configFileName +
90 "). Creating local file instead.");
91 xmlConfig.SetFileName(configFileName);
92 xmlConfig.LoadData();
93 }
94 }
95
96 public void LoadDataFromString(string data)
97 {
98 xmlConfig.LoadDataFromString(data);
99 }
100
101 public string GetAttribute(string attributeName)
102 {
103 return xmlConfig.GetAttribute(attributeName);
104 }
105
106 public bool SetAttribute(string attributeName, string attributeValue)
107 {
108 return true;
109 }
110
111 public void Commit()
112 {
113 }
114
115 public void Close()
116 {
117 }
118 }
119}
diff --git a/OpenSim/Framework/Configuration/HTTP/RemoteConfigSettings.cs b/OpenSim/Framework/Configuration/HTTP/RemoteConfigSettings.cs
new file mode 100644
index 0000000..10bc88a
--- /dev/null
+++ b/OpenSim/Framework/Configuration/HTTP/RemoteConfigSettings.cs
@@ -0,0 +1,63 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29
30namespace OpenSim.Framework.Configuration.HTTP
31{
32 public class RemoteConfigSettings
33 {
34 private ConfigurationMember configMember;
35
36 public string baseConfigURL = String.Empty;
37
38 public RemoteConfigSettings(string filename)
39 {
40 configMember =
41 new ConfigurationMember(filename, "REMOTE CONFIG SETTINGS", loadConfigurationOptions,
42 handleIncomingConfiguration,true);
43 configMember.forceConfigurationPluginLibrary("OpenSim.Framework.Configuration.XML.dll");
44 configMember.performConfigurationRetrieve();
45 }
46
47 public void loadConfigurationOptions()
48 {
49 configMember.addConfigurationOption("base_config_url",
50 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
51 "URL Containing Configuration Files", "http://localhost/", false);
52 }
53
54 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
55 {
56 if (configuration_key == "base_config_url")
57 {
58 baseConfigURL = (string) configuration_result;
59 }
60 return true;
61 }
62 }
63}
diff --git a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
new file mode 100644
index 0000000..43162fc
--- /dev/null
+++ b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
@@ -0,0 +1,141 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using System.Xml;
31
32namespace OpenSim.Framework.Configuration.XML
33{
34 public class XmlConfiguration : IGenericConfig
35 {
36 private XmlDocument doc;
37 private XmlNode rootNode;
38 private XmlNode configNode;
39 private string fileName;
40 private bool createdFile = false;
41
42 public void SetFileName(string file)
43 {
44 fileName = file;
45 }
46
47 private void LoadDataToClass()
48 {
49 rootNode = doc.SelectSingleNode("Root");
50 if (null == rootNode)
51 throw new Exception("Error: Invalid .xml File. Missing <Root>");
52
53 configNode = rootNode.SelectSingleNode("Config");
54 if (null == configNode)
55 throw new Exception("Error: Invalid .xml File. <Root> should contain a <Config>");
56 }
57
58 public void LoadData()
59 {
60 lock (this)
61 {
62 doc = new XmlDocument();
63 if (File.Exists(fileName))
64 {
65 XmlTextReader reader = new XmlTextReader(fileName);
66 reader.WhitespaceHandling = WhitespaceHandling.None;
67 doc.Load(reader);
68 reader.Close();
69 }
70 else
71 {
72 createdFile = true;
73 rootNode = doc.CreateNode(XmlNodeType.Element, "Root", String.Empty);
74 doc.AppendChild(rootNode);
75 configNode = doc.CreateNode(XmlNodeType.Element, "Config", String.Empty);
76 rootNode.AppendChild(configNode);
77 }
78
79 LoadDataToClass();
80
81 if (createdFile)
82 {
83 Commit();
84 }
85 }
86 }
87
88 public void LoadDataFromString(string data)
89 {
90 doc = new XmlDocument();
91 doc.LoadXml(data);
92
93 LoadDataToClass();
94 }
95
96 public string GetAttribute(string attributeName)
97 {
98 string result = null;
99 if (configNode.Attributes[attributeName] != null)
100 {
101 result = ((XmlAttribute) configNode.Attributes.GetNamedItem(attributeName)).Value;
102 }
103 return result;
104 }
105
106 public bool SetAttribute(string attributeName, string attributeValue)
107 {
108 if (configNode.Attributes[attributeName] != null)
109 {
110 ((XmlAttribute) configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue;
111 }
112 else
113 {
114 XmlAttribute attri;
115 attri = doc.CreateAttribute(attributeName);
116 attri.Value = attributeValue;
117 configNode.Attributes.Append(attri);
118 }
119 return true;
120 }
121
122 public void Commit()
123 {
124 if (fileName == null || fileName == String.Empty)
125 return;
126
127 if (!Directory.Exists(Util.configDir()))
128 {
129 Directory.CreateDirectory(Util.configDir());
130 }
131 doc.Save(fileName);
132 }
133
134 public void Close()
135 {
136 configNode = null;
137 rootNode = null;
138 doc = null;
139 }
140 }
141}
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs
index 5d46905..bc19dd1 100644
--- a/OpenSim/Framework/Watchdog.cs
+++ b/OpenSim/Framework/Watchdog.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Framework
51 public ThreadWatchdogInfo(Thread thread) 51 public ThreadWatchdogInfo(Thread thread)
52 { 52 {
53 Thread = thread; 53 Thread = thread;
54 LastTick = Environment.TickCount & Int32.MaxValue; 54 LastTick = Environment.TickCount;
55 } 55 }
56 } 56 }
57 57
@@ -143,7 +143,7 @@ namespace OpenSim.Framework
143 try 143 try
144 { 144 {
145 if (m_threads.TryGetValue(threadID, out threadInfo)) 145 if (m_threads.TryGetValue(threadID, out threadInfo))
146 threadInfo.LastTick = Environment.TickCount & Int32.MaxValue; 146 threadInfo.LastTick = Environment.TickCount;
147 else 147 else
148 AddThread(new ThreadWatchdogInfo(Thread.CurrentThread)); 148 AddThread(new ThreadWatchdogInfo(Thread.CurrentThread));
149 } 149 }
@@ -160,7 +160,7 @@ namespace OpenSim.Framework
160 160
161 lock (m_threads) 161 lock (m_threads)
162 { 162 {
163 int now = Environment.TickCount & Int32.MaxValue; 163 int now = Environment.TickCount;
164 164
165 foreach (ThreadWatchdogInfo threadInfo in m_threads.Values) 165 foreach (ThreadWatchdogInfo threadInfo in m_threads.Values)
166 { 166 {
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index cac5fa9..09f7bea 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -308,21 +308,6 @@ namespace OpenSim
308 } 308 }
309 309
310 { 310 {
311 IConfig config = defaultConfig.Configs["StandAlone"];
312
313 if (null == config)
314 config = defaultConfig.AddConfig("StandAlone");
315
316 config.Set("accounts_authenticate", true);
317 config.Set("welcome_message", "Welcome to OpenSimulator");
318 config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll");
319 config.Set("inventory_source", "");
320 config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll");
321 config.Set("user_source", "");
322 config.Set("LibrariesXMLFile", string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar));
323 }
324
325 {
326 IConfig config = defaultConfig.Configs["Network"]; 311 IConfig config = defaultConfig.Configs["Network"];
327 312
328 if (null == config) 313 if (null == config)
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index a9f9d60..4ab719d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3485,6 +3485,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3485 /// </summary> 3485 /// </summary>
3486 public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) 3486 public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
3487 { 3487 {
3488 if (entity is SceneObjectPart)
3489 {
3490 SceneObjectPart e = (SceneObjectPart)entity;
3491 SceneObjectGroup g = e.ParentGroup;
3492 if (g.RootPart.Shape.State > 30) // HUD
3493 if (g.OwnerID != AgentId)
3494 return; // Don't send updates for other people's HUDs
3495 }
3496
3488 double priority = m_prioritizer.GetUpdatePriority(this, entity); 3497 double priority = m_prioritizer.GetUpdatePriority(this, entity);
3489 3498
3490 lock (m_entityUpdates.SyncRoot) 3499 lock (m_entityUpdates.SyncRoot)
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 50d2f9d..06b1b00 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -218,7 +218,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
218 fromPos = avatar.AbsolutePosition; 218 fromPos = avatar.AbsolutePosition;
219 fromName = avatar.Name; 219 fromName = avatar.Name;
220 fromID = c.Sender.AgentId; 220 fromID = c.Sender.AgentId;
221 if (avatar.GodLevel > 200) 221 if (avatar.GodLevel >= 200)
222 { 222 {
223 fromNamePrefix = m_adminPrefix; 223 fromNamePrefix = m_adminPrefix;
224 } 224 }
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
index ffdac58..cbea54c 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -187,7 +187,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
187 delegate(bool success) 187 delegate(bool success)
188 { 188 {
189 if (dialog == (uint)InstantMessageDialog.StartTyping || 189 if (dialog == (uint)InstantMessageDialog.StartTyping ||
190 dialog == (uint)InstantMessageDialog.StopTyping) 190 dialog == (uint)InstantMessageDialog.StopTyping ||
191 dialog == (uint)InstantMessageDialog.MessageFromObject)
191 { 192 {
192 return; 193 return;
193 } 194 }
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index 83209fc..d025f0c 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -185,13 +185,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
185 { 185 {
186 UndeliveredMessage handlerUndeliveredMessage = OnUndeliveredMessage; 186 UndeliveredMessage handlerUndeliveredMessage = OnUndeliveredMessage;
187 187
188 // If this event has handlers, then the IM will be considered 188 // If this event has handlers, then an IM from an agent will be
189 // delivered. This will suppress the error message. 189 // considered delivered. This will suppress the error message.
190 // 190 //
191 if (handlerUndeliveredMessage != null) 191 if (handlerUndeliveredMessage != null)
192 { 192 {
193 handlerUndeliveredMessage(im); 193 handlerUndeliveredMessage(im);
194 result(true); 194 if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
195 result(true);
196 else
197 result(false);
195 return; 198 return;
196 } 199 }
197 200
@@ -504,14 +507,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
504 // 507 //
505 if (upd.RegionID == prevRegionID) 508 if (upd.RegionID == prevRegionID)
506 { 509 {
507 m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message"); 510 // m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message");
508 HandleUndeliveredMessage(im, result); 511 HandleUndeliveredMessage(im, result);
509 return; 512 return;
510 } 513 }
511 } 514 }
512 else 515 else
513 { 516 {
514 m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message"); 517 // m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message");
515 HandleUndeliveredMessage(im, result); 518 HandleUndeliveredMessage(im, result);
516 return; 519 return;
517 } 520 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 0d04491..98545f9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -153,7 +153,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
153 153
154 private void OnInstantMessage(IClientAPI client, GridInstantMessage im) 154 private void OnInstantMessage(IClientAPI client, GridInstantMessage im)
155 { 155 {
156 m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog); 156 //m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog);
157 157
158 Scene scene = FindClientScene(client.AgentId); 158 Scene scene = FindClientScene(client.AgentId);
159 159
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 927eeab..1d1a0a1 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -549,6 +549,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
549 549
550 if (uinfo != null) 550 if (uinfo != null)
551 { 551 {
552 if (uinfo.HomeRegionID == UUID.Zero)
553 {
554 // can't find the Home region: Tell viewer and abort
555 client.SendTeleportFailed("You don't have a home position set.");
556 return;
557 }
552 GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID); 558 GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID);
553 if (regionInfo == null) 559 if (regionInfo == null)
554 { 560 {
@@ -556,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
556 client.SendTeleportFailed("Your home region could not be found."); 562 client.SendTeleportFailed("Your home region could not be found.");
557 return; 563 return;
558 } 564 }
559 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})", 565 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})",
560 regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize); 566 regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize);
561 567
562 // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point... 568 // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point...
@@ -564,6 +570,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
564 client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, 570 client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt,
565 (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); 571 (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome));
566 } 572 }
573 else
574 {
575 // can't find the Home region: Tell viewer and abort
576 client.SendTeleportFailed("Your home region could not be found.");
577 return;
578 }
567 } 579 }
568 580
569 #endregion 581 #endregion
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index efe3365..d857a1c 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1935,8 +1935,14 @@ namespace OpenSim.Region.Framework.Scenes
1935//Console.WriteLine("Scripted, unoccupied"); 1935//Console.WriteLine("Scripted, unoccupied");
1936 part.SetAvatarOnSitTarget(UUID); // set that Av will be on it 1936 part.SetAvatarOnSitTarget(UUID); // set that Av will be on it
1937 offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z); // change ofset to the scripted one 1937 offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z); // change ofset to the scripted one
1938 sitOrientation = avSitOrientation; // Change rotatione to the scripted one 1938
1939 OffsetRotation = avSitOrientation; 1939 Quaternion nrot = avSitOrientation;
1940 if (!part.IsRoot)
1941 {
1942 nrot = part.RotationOffset * avSitOrientation;
1943 }
1944 sitOrientation = nrot; // Change rotatione to the scripted one
1945 OffsetRotation = nrot;
1940 autopilot = false; // Jump direct to scripted llSitPos() 1946 autopilot = false; // Jump direct to scripted llSitPos()
1941 } 1947 }
1942 else 1948 else
@@ -2010,7 +2016,7 @@ namespace OpenSim.Region.Framework.Scenes
2010 // offsetr = (part.OffsetPosition * Quaternion.Inverse(part.ParentGroup.RootPart.RotationOffset)) + (offset * partIRot); 2016 // offsetr = (part.OffsetPosition * Quaternion.Inverse(part.ParentGroup.RootPart.RotationOffset)) + (offset * partIRot);
2011 // if (part.LinkNum < 2) 091216 All this was necessary because of the GetWorldRotation error. 2017 // if (part.LinkNum < 2) 091216 All this was necessary because of the GetWorldRotation error.
2012 // { // Single, or Root prim of linkset, target is ClickOffset * RootRot 2018 // { // Single, or Root prim of linkset, target is ClickOffset * RootRot
2013 offsetr = offset * partIRot; 2019 //offsetr = offset * partIRot;
2014// 2020//
2015 // else 2021 // else
2016 // { // Child prim, offset is (ChildOffset * RootRot) + (ClickOffset * ChildRot) 2022 // { // Child prim, offset is (ChildOffset * RootRot) + (ClickOffset * ChildRot)
@@ -2029,7 +2035,7 @@ namespace OpenSim.Region.Framework.Scenes
2029//Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); 2035//Console.WriteLine("Camera Eye ={0}", cameraEyeOffset);
2030 2036
2031 //NOTE: SendSitResponse should be relative to the GROUP *NOT* THE PRIM if we're sitting on a child 2037 //NOTE: SendSitResponse should be relative to the GROUP *NOT* THE PRIM if we're sitting on a child
2032 ControllingClient.SendSitResponse(part.ParentGroup.UUID, offsetr + part.OffsetPosition, sitOrientation, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook); 2038 ControllingClient.SendSitResponse(part.ParentGroup.UUID, ((offset * part.RotationOffset) + part.OffsetPosition), sitOrientation, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook);
2033 2039
2034 m_requestedSitTargetUUID = part.UUID; //KF: Correct autopilot target 2040 m_requestedSitTargetUUID = part.UUID; //KF: Correct autopilot target
2035 // This calls HandleAgentSit twice, once from here, and the client calls 2041 // This calls HandleAgentSit twice, once from here, and the client calls
@@ -2343,6 +2349,10 @@ namespace OpenSim.Region.Framework.Scenes
2343 Quaternion sitTargetOrient = part.SitTargetOrientation; 2349 Quaternion sitTargetOrient = part.SitTargetOrientation;
2344 m_pos = new Vector3(sitTargetPos.X, sitTargetPos.Y, sitTargetPos.Z); 2350 m_pos = new Vector3(sitTargetPos.X, sitTargetPos.Y, sitTargetPos.Z);
2345 m_pos += SIT_TARGET_ADJUSTMENT; 2351 m_pos += SIT_TARGET_ADJUSTMENT;
2352 if (!part.IsRoot)
2353 {
2354 m_pos *= part.RotationOffset;
2355 }
2346 m_bodyRot = sitTargetOrient; 2356 m_bodyRot = sitTargetOrient;
2347 m_parentPosition = part.AbsolutePosition; 2357 m_parentPosition = part.AbsolutePosition;
2348 part.IsOccupied = true; 2358 part.IsOccupied = true;
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
index 6aa28e0..2105be1 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
@@ -131,6 +131,7 @@ namespace OpenSim.Region.Physics.OdePlugin
131 //public GCHandle gc; 131 //public GCHandle gc;
132 private CollisionLocker ode; 132 private CollisionLocker ode;
133 133
134 private bool m_meshfailed = false;
134 private bool m_taintforce = false; 135 private bool m_taintforce = false;
135 private bool m_taintaddangularforce = false; 136 private bool m_taintaddangularforce = false;
136 private Vector3 m_force; 137 private Vector3 m_force;
@@ -1882,12 +1883,20 @@ namespace OpenSim.Region.Physics.OdePlugin
1882 1883
1883 m_targetSpace = targetspace; 1884 m_targetSpace = targetspace;
1884 1885
1885 if (_mesh == null) 1886 if (_mesh == null && m_meshfailed == false)
1886 { 1887 {
1887 if (_parent_scene.needsMeshing(_pbs)) 1888 if (_parent_scene.needsMeshing(_pbs))
1888 { 1889 {
1889 // Don't need to re-enable body.. it's done in SetMesh 1890 // Don't need to re-enable body.. it's done in SetMesh
1890 _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical); 1891 try
1892 {
1893 _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
1894 }
1895 catch
1896 {
1897 //Don't continuously try to mesh prims when meshing has failed
1898 m_meshfailed = true;
1899 }
1891 // createmesh returns null when it's a shape that isn't a cube. 1900 // createmesh returns null when it's a shape that isn't a cube.
1892 // m_log.Debug(m_localID); 1901 // m_log.Debug(m_localID);
1893 } 1902 }
@@ -2127,7 +2136,7 @@ Console.WriteLine(" JointCreateFixed");
2127 // we don't need to do space calculation because the client sends a position update also. 2136 // we don't need to do space calculation because the client sends a position update also.
2128 2137
2129 // Construction of new prim 2138 // Construction of new prim
2130 if (_parent_scene.needsMeshing(_pbs)) 2139 if (_parent_scene.needsMeshing(_pbs) && m_meshfailed == false)
2131 { 2140 {
2132 float meshlod = _parent_scene.meshSculptLOD; 2141 float meshlod = _parent_scene.meshSculptLOD;
2133 2142
@@ -2137,8 +2146,15 @@ Console.WriteLine(" JointCreateFixed");
2137 2146
2138 IMesh mesh = null; 2147 IMesh mesh = null;
2139 2148
2140 if (_parent_scene.needsMeshing(_pbs)) 2149 try
2141 mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); 2150 {
2151 if (_parent_scene.needsMeshing(_pbs))
2152 mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
2153 }
2154 catch
2155 {
2156 m_meshfailed = true;
2157 }
2142 2158
2143 //IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); 2159 //IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
2144//Console.WriteLine("changesize 1"); 2160//Console.WriteLine("changesize 1");
@@ -2233,17 +2249,23 @@ Console.WriteLine(" JointCreateFixed");
2233 if (_size.Z <= 0) _size.Z = 0.01f; 2249 if (_size.Z <= 0) _size.Z = 0.01f;
2234 // Construction of new prim 2250 // Construction of new prim
2235 2251
2236 if (_parent_scene.needsMeshing(_pbs)) 2252 if (_parent_scene.needsMeshing(_pbs) && m_meshfailed == false)
2237 { 2253 {
2238 // Don't need to re-enable body.. it's done in SetMesh 2254 // Don't need to re-enable body.. it's done in SetMesh
2239 float meshlod = _parent_scene.meshSculptLOD; 2255 float meshlod = _parent_scene.meshSculptLOD;
2240 2256
2241 if (IsPhysical) 2257 if (IsPhysical)
2242 meshlod = _parent_scene.MeshSculptphysicalLOD; 2258 meshlod = _parent_scene.MeshSculptphysicalLOD;
2243 2259 try
2244 IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); 2260 {
2261 IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
2262 CreateGeom(m_targetSpace, mesh);
2263 }
2264 catch
2265 {
2266 m_meshfailed = true;
2267 }
2245 // createmesh returns null when it doesn't mesh. 2268 // createmesh returns null when it doesn't mesh.
2246 CreateGeom(m_targetSpace, mesh);
2247 } 2269 }
2248 else 2270 else
2249 { 2271 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 52d3285..0a1a10c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2116,7 +2116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2116 } 2116 }
2117 else 2117 else
2118 { 2118 {
2119 LSL_Vector rel_vec = SetPosAdjust(currentPos, targetPos); 2119 LSL_Vector rel_vec = SetPosAdjust(new LSL_Vector(part.OffsetPosition.X, part.OffsetPosition.Y, part.OffsetPosition.Z), targetPos);
2120 part.OffsetPosition = new Vector3((float)rel_vec.x, (float)rel_vec.y, (float)rel_vec.z); 2120 part.OffsetPosition = new Vector3((float)rel_vec.x, (float)rel_vec.y, (float)rel_vec.z);
2121 SceneObjectGroup parent = part.ParentGroup; 2121 SceneObjectGroup parent = part.ParentGroup;
2122 parent.HasGroupChanged = true; 2122 parent.HasGroupChanged = true;
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index f49d86d..ebaed42 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Services.GridService
124 { 124 {
125 // Regions reserved for the null key cannot be taken. 125 // Regions reserved for the null key cannot be taken.
126 if ((string)region.Data["PrincipalID"] == UUID.Zero.ToString()) 126 if ((string)region.Data["PrincipalID"] == UUID.Zero.ToString())
127 return "Region location us reserved"; 127 return "Region location is reserved";
128 128
129 // Treat it as an auth request 129 // Treat it as an auth request
130 // 130 //
@@ -210,6 +210,7 @@ namespace OpenSim.Services.GridService
210 { 210 {
211 int newFlags = 0; 211 int newFlags = 0;
212 string regionName = rdata.RegionName.Trim().Replace(' ', '_'); 212 string regionName = rdata.RegionName.Trim().Replace(' ', '_');
213 newFlags = ParseFlags(newFlags, gridConfig.GetString("DefaultRegionFlags", String.Empty));
213 newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + regionName, String.Empty)); 214 newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + regionName, String.Empty));
214 newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + rdata.RegionID.ToString(), String.Empty)); 215 newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + rdata.RegionID.ToString(), String.Empty));
215 rdata.Data["flags"] = newFlags.ToString(); 216 rdata.Data["flags"] = newFlags.ToString();
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index c5cfe75..3fc9327 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -49,61 +49,64 @@ namespace OpenSim.Services.HypergridService
49 LogManager.GetLogger( 49 LogManager.GetLogger(
50 MethodBase.GetCurrentMethod().DeclaringType); 50 MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 IGridService m_GridService; 52 private static bool m_Initialized = false;
53 IPresenceService m_PresenceService;
54 IUserAccountService m_UserAccountService;
55 IUserAgentService m_UserAgentService;
56 ISimulationService m_SimulationService;
57 53
58 string m_AuthDll; 54 private static IGridService m_GridService;
55 private static IPresenceService m_PresenceService;
56 private static IUserAccountService m_UserAccountService;
57 private static IUserAgentService m_UserAgentService;
58 private static ISimulationService m_SimulationService;
59 59
60 UUID m_ScopeID; 60 private static UUID m_ScopeID;
61 bool m_AllowTeleportsToAnyRegion; 61 private static bool m_AllowTeleportsToAnyRegion;
62 string m_ExternalName; 62 private static string m_ExternalName;
63 GridRegion m_DefaultGatewayRegion; 63 private static GridRegion m_DefaultGatewayRegion;
64 64
65 public GatekeeperService(IConfigSource config, ISimulationService simService) 65 public GatekeeperService(IConfigSource config, ISimulationService simService)
66 { 66 {
67 IConfig serverConfig = config.Configs["GatekeeperService"]; 67 if (!m_Initialized)
68 if (serverConfig == null) 68 {
69 throw new Exception(String.Format("No section GatekeeperService in config file")); 69 m_Initialized = true;
70 70
71 string accountService = serverConfig.GetString("UserAccountService", String.Empty); 71 IConfig serverConfig = config.Configs["GatekeeperService"];
72 string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty); 72 if (serverConfig == null)
73 string gridService = serverConfig.GetString("GridService", String.Empty); 73 throw new Exception(String.Format("No section GatekeeperService in config file"));
74 string presenceService = serverConfig.GetString("PresenceService", String.Empty); 74
75 string simulationService = serverConfig.GetString("SimulationService", String.Empty); 75 string accountService = serverConfig.GetString("UserAccountService", String.Empty);
76 76 string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty);
77 //m_AuthDll = serverConfig.GetString("AuthenticationService", String.Empty); 77 string gridService = serverConfig.GetString("GridService", String.Empty);
78 78 string presenceService = serverConfig.GetString("PresenceService", String.Empty);
79 // These 3 are mandatory, the others aren't 79 string simulationService = serverConfig.GetString("SimulationService", String.Empty);
80 if (gridService == string.Empty || presenceService == string.Empty || m_AuthDll == string.Empty) 80
81 throw new Exception("Incomplete specifications, Gatekeeper Service cannot function."); 81 // These 3 are mandatory, the others aren't
82 82 if (gridService == string.Empty || presenceService == string.Empty)
83 string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString()); 83 throw new Exception("Incomplete specifications, Gatekeeper Service cannot function.");
84 UUID.TryParse(scope, out m_ScopeID); 84
85 //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); 85 string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString());
86 m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); 86 UUID.TryParse(scope, out m_ScopeID);
87 m_ExternalName = serverConfig.GetString("ExternalName", string.Empty); 87 //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
88 88 m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true);
89 Object[] args = new Object[] { config }; 89 m_ExternalName = serverConfig.GetString("ExternalName", string.Empty);
90 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 90
91 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); 91 Object[] args = new Object[] { config };
92 92 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
93 if (accountService != string.Empty) 93 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
94 m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); 94
95 if (homeUsersService != string.Empty) 95 if (accountService != string.Empty)
96 m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args); 96 m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
97 97 if (homeUsersService != string.Empty)
98 if (simService != null) 98 m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args);
99 m_SimulationService = simService; 99
100 else if (simulationService != string.Empty) 100 if (simService != null)
101 m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args); 101 m_SimulationService = simService;
102 102 else if (simulationService != string.Empty)
103 if (m_GridService == null || m_PresenceService == null || m_SimulationService == null) 103 m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
104 throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function."); 104
105 105 if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
106 m_log.Debug("[GATEKEEPER SERVICE]: Starting..."); 106 throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function.");
107
108 m_log.Debug("[GATEKEEPER SERVICE]: Starting...");
109 }
107 } 110 }
108 111
109 public GatekeeperService(IConfigSource config) 112 public GatekeeperService(IConfigSource config)
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index aec82e8..4bee4b5 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -61,7 +61,8 @@ namespace OpenSim.Services.HypergridService
61 61
62 protected static IGridUserService m_GridUserService; 62 protected static IGridUserService m_GridUserService;
63 protected static IGridService m_GridService; 63 protected static IGridService m_GridService;
64 protected static GatekeeperServiceConnector m_GatekeeperConnector; 64 //protected static GatekeeperServiceConnector m_GatekeeperConnector;
65 protected static IGatekeeperService m_GatekeeperService;
65 66
66 protected static bool m_BypassClientVerification; 67 protected static bool m_BypassClientVerification;
67 68
@@ -69,6 +70,8 @@ namespace OpenSim.Services.HypergridService
69 { 70 {
70 if (!m_Initialized) 71 if (!m_Initialized)
71 { 72 {
73 m_Initialized = true;
74
72 m_log.DebugFormat("[HOME USERS SECURITY]: Starting..."); 75 m_log.DebugFormat("[HOME USERS SECURITY]: Starting...");
73 76
74 IConfig serverConfig = config.Configs["UserAgentService"]; 77 IConfig serverConfig = config.Configs["UserAgentService"];
@@ -77,18 +80,18 @@ namespace OpenSim.Services.HypergridService
77 80
78 string gridService = serverConfig.GetString("GridService", String.Empty); 81 string gridService = serverConfig.GetString("GridService", String.Empty);
79 string gridUserService = serverConfig.GetString("GridUserService", String.Empty); 82 string gridUserService = serverConfig.GetString("GridUserService", String.Empty);
83 string gatekeeperService = serverConfig.GetString("GatekeeperService", String.Empty);
80 84
81 m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false); 85 m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false);
82 86
83 if (gridService == string.Empty || gridUserService == string.Empty) 87 if (gridService == string.Empty || gridUserService == string.Empty || gatekeeperService == string.Empty)
84 throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); 88 throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function."));
85 89
86 Object[] args = new Object[] { config }; 90 Object[] args = new Object[] { config };
87 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 91 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
88 m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); 92 m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
89 m_GatekeeperConnector = new GatekeeperServiceConnector(); 93 //m_GatekeeperConnector = new GatekeeperServiceConnector();
90 94 m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(gatekeeperService, args);
91 m_Initialized = true;
92 } 95 }
93 } 96 }
94 97
@@ -135,7 +138,8 @@ namespace OpenSim.Services.HypergridService
135 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); 138 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random();
136 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 139 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
137 140
138 bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); 141 //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
142 bool success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
139 143
140 if (!success) 144 if (!success)
141 { 145 {
diff --git a/OpenSim/Tools/Configger/ConfigurationLoader.cs b/OpenSim/Tools/Configger/ConfigurationLoader.cs
index 1619a22..3d1b668 100644
--- a/OpenSim/Tools/Configger/ConfigurationLoader.cs
+++ b/OpenSim/Tools/Configger/ConfigurationLoader.cs
@@ -242,21 +242,6 @@ namespace OpenSim.Tools.Configger
242 } 242 }
243 243
244 { 244 {
245 IConfig config = defaultConfig.Configs["StandAlone"];
246
247 if (null == config)
248 config = defaultConfig.AddConfig("StandAlone");
249
250 config.Set("accounts_authenticate", true);
251 config.Set("welcome_message", "Welcome to OpenSimulator");
252 config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll");
253 config.Set("inventory_source", "");
254 config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll");
255 config.Set("user_source", "");
256 config.Set("LibrariesXMLFile", string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar));
257 }
258
259 {
260 IConfig config = defaultConfig.Configs["Network"]; 245 IConfig config = defaultConfig.Configs["Network"];
261 246
262 if (null == config) 247 if (null == config)