diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs
index da953bbef0..0db7bb970f 100644
--- a/OpenSim/Framework/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Capabilities/Caps.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Framework.Capabilities
m_httpListenPort = httpPort;
- if (httpServer.UseSSL)
+ if (httpServer != null && httpServer.UseSSL)
{
m_httpListenPort = httpServer.SSLPort;
httpListen = httpServer.SSLCommonName;
@@ -151,7 +151,7 @@ namespace OpenSim.Framework.Capabilities
m_agentID = agent;
m_dumpAssetsToFile = dumpAssetsToFile;
- m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, httpServer.UseSSL);
+ m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, (httpServer == null) ? false : httpServer.UseSSL);
m_regionName = regionName;
}
diff --git a/OpenSim/Framework/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Capabilities/CapsHandlers.cs
index f000aed3c2..864e6ddb7e 100644
--- a/OpenSim/Framework/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Framework/Capabilities/CapsHandlers.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Framework.Capabilities
m_httpListenerHostName = httpListenerHostname;
m_httpListenerPort = httpListenerPort;
m_useSSL = https;
- if (m_useSSL)
+ if (httpListener != null && m_useSSL)
{
m_httpListenerHostName = httpListener.SSLCommonName;
m_httpListenerPort = httpListener.SSLPort;
diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs
index 5757061efc..1b1aaf2bc4 100644
--- a/OpenSim/Framework/Constants.cs
+++ b/OpenSim/Framework/Constants.cs
@@ -83,7 +83,9 @@ namespace OpenSim.Framework
/// Finished, Sim Changed
FinishedViaNewSim = 1 << 28,
/// Finished, Same Sim
- FinishedViaSameSim = 1 << 29
+ FinishedViaSameSim = 1 << 29,
+ /// Agent coming into the grid from another grid
+ ViaHGLogin = 1 << 30
}
}
diff --git a/OpenSim/Framework/NetworkUtil.cs b/OpenSim/Framework/NetworkUtil.cs
index 831ff70e77..2e94b0d5b4 100644
--- a/OpenSim/Framework/NetworkUtil.cs
+++ b/OpenSim/Framework/NetworkUtil.cs
@@ -181,16 +181,8 @@ namespace OpenSim.Framework
throw new ArgumentException("[NetworkUtil] Unable to resolve defaultHostname to an IPv4 address for an IPv4 client");
}
- static IPAddress externalIPAddress;
-
static NetworkUtil()
{
- try
- {
- externalIPAddress = GetExternalIP();
- }
- catch { /* ignore */ }
-
try
{
foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
@@ -254,79 +246,5 @@ namespace OpenSim.Framework
return defaultHostname;
}
- public static IPAddress GetExternalIPOf(IPAddress user)
- {
- if (externalIPAddress == null)
- return user;
-
- if (user.ToString() == "127.0.0.1")
- {
- m_log.Info("[NetworkUtil] 127.0.0.1 user detected, sending '" + externalIPAddress + "' instead of '" + user + "'");
- return externalIPAddress;
- }
- // Check if we're accessing localhost.
- foreach (IPAddress host in Dns.GetHostAddresses(Dns.GetHostName()))
- {
- if (host.Equals(user) && host.AddressFamily == AddressFamily.InterNetwork)
- {
- m_log.Info("[NetworkUtil] Localhost user detected, sending '" + externalIPAddress + "' instead of '" + user + "'");
- return externalIPAddress;
- }
- }
-
- // Check for same LAN segment
- foreach (KeyValuePair subnet in m_subnets)
- {
- byte[] subnetBytes = subnet.Value.GetAddressBytes();
- byte[] localBytes = subnet.Key.GetAddressBytes();
- byte[] destBytes = user.GetAddressBytes();
-
- if (subnetBytes.Length != destBytes.Length || subnetBytes.Length != localBytes.Length)
- return user;
-
- bool valid = true;
-
- for (int i = 0; i < subnetBytes.Length; i++)
- {
- if ((localBytes[i] & subnetBytes[i]) != (destBytes[i] & subnetBytes[i]))
- {
- valid = false;
- break;
- }
- }
-
- if (subnet.Key.AddressFamily != AddressFamily.InterNetwork)
- valid = false;
-
- if (valid)
- {
- m_log.Info("[NetworkUtil] Local LAN user detected, sending '" + externalIPAddress + "' instead of '" + user + "'");
- return externalIPAddress;
- }
- }
-
- // Otherwise, return user address
- return user;
- }
-
- private static IPAddress GetExternalIP()
- {
- string whatIsMyIp = "http://www.whatismyip.com/automation/n09230945.asp";
- WebClient wc = new WebClient();
- UTF8Encoding utf8 = new UTF8Encoding();
- string requestHtml = "";
- try
- {
- requestHtml = utf8.GetString(wc.DownloadData(whatIsMyIp));
- }
- catch (WebException we)
- {
- m_log.Info("[NetworkUtil]: Exception in GetExternalIP: " + we.ToString());
- return null;
- }
-
- IPAddress externalIp = IPAddress.Parse(requestHtml);
- return externalIp;
- }
}
}
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 2a74e7938d..ec25118ebc 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -394,7 +394,7 @@ namespace OpenSim.Framework
if (!File.Exists(filename)) // New region config request
{
IniConfigSource newFile = new IniConfigSource();
- ReadNiniConfig(newFile, String.Empty);
+ ReadNiniConfig(newFile, configName);
newFile.Save(filename);
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index bbc42e62b4..072e4d3689 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -308,8 +308,13 @@ namespace OpenSim
"Persist objects to the database now", RunCommand);
m_console.Commands.AddCommand("region", false, "create region",
- "create region",
- "Create a new region", HandleCreateRegion);
+ "create region [\"region name\"] ",
+ "Create a new region.",
+ "The settings for \"region name\" are read from ."
+ + " If \"region name\" does not exist in , it will be added." + Environment.NewLine
+ + "Without \"region name\", the first region found in will be created." + Environment.NewLine
+ + "If does not exist, it will be created.",
+ HandleCreateRegion);
m_console.Commands.AddCommand("region", false, "restart",
"restart",
@@ -513,47 +518,47 @@ namespace OpenSim
/// Creates a new region based on the parameters specified. This will ask the user questions on the console
///
///
- /// 0,1,region name, region XML file
+ /// 0,1,region name, region ini or XML file
private void HandleCreateRegion(string module, string[] cmd)
{
- if (cmd.Length < 4)
+ string regionName = string.Empty;
+ string regionFile = string.Empty;
+ if (cmd.Length == 3)
{
- MainConsole.Instance.Output("Usage: create region ");
+ regionFile = cmd[2];
+ }
+ else if (cmd.Length > 3)
+ {
+ regionName = cmd[2];
+ regionFile = cmd[3];
+ }
+ string extension = Path.GetExtension(regionFile).ToLower();
+ bool isXml = extension.Equals(".xml");
+ bool isIni = extension.Equals(".ini");
+ if (!isXml && !isIni)
+ {
+ MainConsole.Instance.Output("Usage: create region [\"region name\"] ");
return;
}
- if (cmd[3].EndsWith(".xml"))
+ if (!Path.IsPathRooted(regionFile))
{
string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
- string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]);
- // Allow absolute and relative specifiers
- if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith(".."))
- regionFile = cmd[3];
-
- IScene scene;
- RegionInfo regInfo = new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source);
- PopulateRegionEstateInfo(regInfo);
- CreateRegion(regInfo, true, out scene);
- regInfo.EstateSettings.Save();
+ regionFile = Path.Combine(regionsDir, regionFile);
}
- else if (cmd[3].EndsWith(".ini"))
- {
- string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
- string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]);
- // Allow absolute and relative specifiers
- if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith(".."))
- regionFile = cmd[3];
- IScene scene;
- RegionInfo regInfo = new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source, cmd[2]);
- PopulateRegionEstateInfo(regInfo);
- CreateRegion(regInfo, true, out scene);
- regInfo.EstateSettings.Save();
+ RegionInfo regInfo;
+ if (isXml)
+ {
+ regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source);
}
else
{
- MainConsole.Instance.Output("Usage: create region ");
- return;
+ regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName);
}
+ IScene scene;
+ PopulateRegionEstateInfo(regInfo);
+ CreateRegion(regInfo, true, out scene);
+ regInfo.EstateSettings.Save();
}
///
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index a6f5d97ad2..c023a6f738 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -109,9 +109,9 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
Caps caps
= new Caps(m_scene,
m_scene.AssetService, MainServer.Instance, m_scene.RegionInfo.ExternalHostName,
- MainServer.Instance.Port,
+ (MainServer.Instance == null) ? 0: MainServer.Instance.Port,
capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName);
-
+
caps.RegisterHandlers();
m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps);
@@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
caps.TaskScriptUpdatedCall = m_scene.CapsUpdateTaskInventoryScriptAsset;
caps.CAPSFetchInventoryDescendents = m_scene.HandleFetchInventoryDescendentsCAPS;
caps.GetClient = m_scene.SceneContents.GetControllingClient;
-
+
m_capsHandlers[agentId] = caps;
}
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 1498dbaf09..a514a83542 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -1,223 +1,242 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using log4net;
-using Nini.Config;
-using OpenMetaverse;
-using OpenSim.Framework;
-
-using OpenSim.Region.Framework.Interfaces;
-using OpenSim.Region.Framework.Scenes;
-using OpenSim.Services.Interfaces;
-
-namespace OpenSim.Region.CoreModules.Avatar.Dialog
-{
- public class DialogModule : IRegionModule, IDialogModule
- {
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- protected Scene m_scene;
-
- public void Initialise(Scene scene, IConfigSource source)
- {
- m_scene = scene;
- m_scene.RegisterModuleInterface(this);
-
- m_scene.AddCommand(
- this, "alert", "alert ", "Send an alert to a user", HandleAlertConsoleCommand);
-
- m_scene.AddCommand(
- this, "alert general", "alert general ", "Send an alert to everyone", HandleAlertConsoleCommand);
-
- m_scene.AddCommand(
- this, "alert dialog", "alert dialog ", "Send a dialog alert to everyone", HandleAlertConsoleCommand);
-
-
- }
-
- public void PostInitialise() {}
- public void Close() {}
- public string Name { get { return "Dialog Module"; } }
- public bool IsSharedModule { get { return false; } }
-
- public void SendAlertToUser(IClientAPI client, string message)
- {
- SendAlertToUser(client, message, false);
- }
-
- public void SendAlertToUser(IClientAPI client, string message, bool modal)
- {
- client.SendAgentAlertMessage(message, modal);
- }
-
- public void SendAlertToUser(UUID agentID, string message)
- {
- SendAlertToUser(agentID, message, false);
- }
-
- public void SendAlertToUser(UUID agentID, string message, bool modal)
- {
- ScenePresence sp = m_scene.GetScenePresence(agentID);
-
- if (sp != null)
- sp.ControllingClient.SendAgentAlertMessage(message, modal);
- }
-
- public void SendAlertToUser(string firstName, string lastName, string message, bool modal)
- {
- ScenePresence presence = m_scene.GetScenePresence(firstName, lastName);
- if (presence != null)
- presence.ControllingClient.SendAgentAlertMessage(message, modal);
- }
-
- public void SendGeneralAlert(string message)
- {
- m_scene.ForEachScenePresence(delegate(ScenePresence presence)
- {
- if (!presence.IsChildAgent)
- {
- presence.ControllingClient.SendAlertMessage(message);
- }
- });
- }
-
- public void SendDialogToUser(
- UUID avatarID, string objectName, UUID objectID, UUID ownerID,
- string message, UUID textureID, int ch, string[] buttonlabels)
- {
- UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerID);
- string ownerFirstName, ownerLastName;
- if (account != null)
- {
- ownerFirstName = account.FirstName;
- ownerLastName = account.LastName;
- }
- else
- {
- ownerFirstName = "(unknown";
- ownerLastName = "user)";
- }
-
- ScenePresence sp = m_scene.GetScenePresence(avatarID);
- if (sp != null)
- sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels);
- }
-
- public void SendUrlToUser(
- UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
- {
- ScenePresence sp = m_scene.GetScenePresence(avatarID);
-
- if (sp != null)
- sp.ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, message, url);
- }
-
- public void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid)
- {
- UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid);
- string ownerFirstName, ownerLastName;
- if (account != null)
- {
- ownerFirstName = account.FirstName;
- ownerLastName = account.LastName;
- }
- else
- {
- ownerFirstName = "(unknown";
- ownerLastName = "user)";
- }
-
- ScenePresence sp = m_scene.GetScenePresence(avatarid);
-
- if (sp != null)
- sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerFirstName, ownerLastName, objectid);
- }
-
- public void SendNotificationToUsersInRegion(
- UUID fromAvatarID, string fromAvatarName, string message)
- {
- m_scene.ForEachScenePresence(delegate(ScenePresence presence)
- {
- if (!presence.IsChildAgent)
- presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message);
- });
- }
-
- ///
- /// Handle an alert command from the console.
- ///
- ///
- ///
- public void HandleAlertConsoleCommand(string module, string[] cmdparams)
- {
- if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene)
- return;
-
- if (cmdparams[1] == "general")
- {
- string message = CombineParams(cmdparams, 2);
-
- m_log.InfoFormat(
- "[DIALOG]: Sending general alert in region {0} with message {1}", m_scene.RegionInfo.RegionName, message);
- SendGeneralAlert(message);
- }
- else if (cmdparams[1] == "dialog")
- {
- string message = CombineParams(cmdparams, 2);
-
- m_log.InfoFormat(
- "[DIALOG]: Sending dialog alert in region {0} with message {1}", m_scene.RegionInfo.RegionName, message);
- SendNotificationToUsersInRegion(UUID.Zero, "System", message);
- }
- else
- {
- string firstName = cmdparams[1];
- string lastName = cmdparams[2];
- string message = CombineParams(cmdparams, 3);
-
- m_log.InfoFormat(
- "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
- m_scene.RegionInfo.RegionName, firstName, lastName, message);
- SendAlertToUser(firstName, lastName, message, false);
- }
- }
-
- private string CombineParams(string[] commandParams, int pos)
- {
- string result = string.Empty;
- for (int i = pos; i < commandParams.Length; i++)
- {
- result += commandParams[i] + " ";
- }
-
- return result;
- }
- }
-}
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using log4net;
+using Nini.Config;
+using OpenMetaverse;
+using OpenSim.Framework;
+
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Services.Interfaces;
+
+namespace OpenSim.Region.CoreModules.Avatar.Dialog
+{
+ public class DialogModule : IRegionModule, IDialogModule
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ protected Scene m_scene;
+
+ public void Initialise(Scene scene, IConfigSource source)
+ {
+ m_scene = scene;
+ m_scene.RegisterModuleInterface(this);
+
+ m_scene.AddCommand(
+ this, "alert", "alert ",
+ "Send an alert to a user",
+ HandleAlertConsoleCommand);
+
+ m_scene.AddCommand(
+ this, "alert general", "alert [general] ",
+ "Send an alert to everyone",
+ "If keyword 'general' is omitted, then must be surrounded by quotation marks.",
+ HandleAlertConsoleCommand);
+ }
+
+ public void PostInitialise() {}
+ public void Close() {}
+ public string Name { get { return "Dialog Module"; } }
+ public bool IsSharedModule { get { return false; } }
+
+ public void SendAlertToUser(IClientAPI client, string message)
+ {
+ SendAlertToUser(client, message, false);
+ }
+
+ public void SendAlertToUser(IClientAPI client, string message, bool modal)
+ {
+ client.SendAgentAlertMessage(message, modal);
+ }
+
+ public void SendAlertToUser(UUID agentID, string message)
+ {
+ SendAlertToUser(agentID, message, false);
+ }
+
+ public void SendAlertToUser(UUID agentID, string message, bool modal)
+ {
+ ScenePresence sp = m_scene.GetScenePresence(agentID);
+
+ if (sp != null)
+ sp.ControllingClient.SendAgentAlertMessage(message, modal);
+ }
+
+ public void SendAlertToUser(string firstName, string lastName, string message, bool modal)
+ {
+ ScenePresence presence = m_scene.GetScenePresence(firstName, lastName);
+ if (presence != null)
+ presence.ControllingClient.SendAgentAlertMessage(message, modal);
+ }
+
+ public void SendGeneralAlert(string message)
+ {
+ m_scene.ForEachScenePresence(delegate(ScenePresence presence)
+ {
+ if (!presence.IsChildAgent)
+ presence.ControllingClient.SendAlertMessage(message);
+ });
+ }
+
+ public void SendDialogToUser(
+ UUID avatarID, string objectName, UUID objectID, UUID ownerID,
+ string message, UUID textureID, int ch, string[] buttonlabels)
+ {
+ UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerID);
+ string ownerFirstName, ownerLastName;
+ if (account != null)
+ {
+ ownerFirstName = account.FirstName;
+ ownerLastName = account.LastName;
+ }
+ else
+ {
+ ownerFirstName = "(unknown";
+ ownerLastName = "user)";
+ }
+
+ ScenePresence sp = m_scene.GetScenePresence(avatarID);
+ if (sp != null)
+ sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels);
+ }
+
+ public void SendUrlToUser(
+ UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
+ {
+ ScenePresence sp = m_scene.GetScenePresence(avatarID);
+
+ if (sp != null)
+ sp.ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, message, url);
+ }
+
+ public void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid)
+ {
+ UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid);
+ string ownerFirstName, ownerLastName;
+ if (account != null)
+ {
+ ownerFirstName = account.FirstName;
+ ownerLastName = account.LastName;
+ }
+ else
+ {
+ ownerFirstName = "(unknown";
+ ownerLastName = "user)";
+ }
+
+ ScenePresence sp = m_scene.GetScenePresence(avatarid);
+
+ if (sp != null)
+ sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerFirstName, ownerLastName, objectid);
+ }
+
+ public void SendNotificationToUsersInRegion(
+ UUID fromAvatarID, string fromAvatarName, string message)
+ {
+ m_scene.ForEachScenePresence(delegate(ScenePresence presence)
+ {
+ if (!presence.IsChildAgent)
+ presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message);
+ });
+ }
+
+ ///
+ /// Handle an alert command from the console.
+ ///
+ ///
+ ///
+ public void HandleAlertConsoleCommand(string module, string[] cmdparams)
+ {
+ if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene)
+ return;
+
+ bool isGeneral = false;
+ string firstName = string.Empty;
+ string lastName = string.Empty;
+ string message = string.Empty;
+
+ if (cmdparams.Length > 1)
+ {
+ firstName = cmdparams[1];
+ isGeneral = firstName.ToLower().Equals("general");
+ }
+ if (cmdparams.Length == 2 && !isGeneral)
+ {
+ // alert "message"
+ message = cmdparams[1];
+ isGeneral = true;
+ }
+ else if (cmdparams.Length > 2 && isGeneral)
+ {
+ // alert general
+ message = CombineParams(cmdparams, 2);
+ }
+ else if (cmdparams.Length > 3)
+ {
+ // alert
+ lastName = cmdparams[2];
+ message = CombineParams(cmdparams, 3);
+ }
+ else
+ {
+ OpenSim.Framework.Console.MainConsole.Instance.Output(
+ "Usage: alert \"message\" | alert general | alert ");
+ return;
+ }
+
+ if (isGeneral)
+ {
+ m_log.InfoFormat(
+ "[DIALOG]: Sending general alert in region {0} with message {1}",
+ m_scene.RegionInfo.RegionName, message);
+ SendGeneralAlert(message);
+ }
+ else
+ {
+ m_log.InfoFormat(
+ "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
+ m_scene.RegionInfo.RegionName, firstName, lastName, message);
+ SendAlertToUser(firstName, lastName, message, false);
+ }
+ }
+
+ private string CombineParams(string[] commandParams, int pos)
+ {
+ string result = string.Empty;
+ for (int i = pos; i < commandParams.Length; i++)
+ {
+ result += commandParams[i] + " ";
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index 87a0a8dd7b..fd0e879e05 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
bool enabled = false;
IConfig cfg = null;
IConfig httpcfg = null;
- IConfig startupcfg = null;
+// IConfig startupcfg = null;
try
{
cfg = config.Configs["OpenGridProtocol"];
@@ -117,14 +117,14 @@ namespace OpenSim.Region.CoreModules.InterGrid
{
}
- try
- {
- startupcfg = config.Configs["Startup"];
- }
- catch (NullReferenceException)
- {
-
- }
+// try
+// {
+// startupcfg = config.Configs["Startup"];
+// }
+// catch (NullReferenceException)
+// {
+//
+// }
// if (startupcfg != null)
// {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 98c46bdec1..32211c4cb3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2584,18 +2584,25 @@ namespace OpenSim.Region.Framework.Scenes
///
public override void AddNewClient(IClientAPI client)
{
+ AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
bool vialogin = false;
- m_clientManager.Add(client);
+ if (aCircuit == null) // no good, didn't pass NewUserConnection successfully
+ return;
+
+ vialogin = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 ||
+ (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
CheckHeartbeat();
- SubscribeToClientEvents(client);
ScenePresence presence;
if (m_restorePresences.ContainsKey(client.AgentId))
{
m_log.DebugFormat("[SCENE]: Restoring agent {0} {1} in {2}", client.Name, client.AgentId, RegionInfo.RegionName);
+ m_clientManager.Add(client);
+ SubscribeToClientEvents(client);
+
presence = m_restorePresences[client.AgentId];
m_restorePresences.Remove(client.AgentId);
@@ -2618,49 +2625,35 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
- AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
-
- // Do the verification here
- System.Net.IPEndPoint ep = (System.Net.IPEndPoint)client.GetClientEP();
- if (aCircuit != null)
+ if (GetScenePresence(client.AgentId) == null) // ensure there is no SP here
{
- if (!VerifyClient(aCircuit, ep, out vialogin))
+ m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
+
+ m_clientManager.Add(client);
+ SubscribeToClientEvents(client);
+
+ ScenePresence sp = CreateAndAddScenePresence(client);
+ if (aCircuit != null)
+ sp.Appearance = aCircuit.Appearance;
+
+ // HERE!!! Do the initial attachments right here
+ // first agent upon login is a root agent by design.
+ // All other AddNewClient calls find aCircuit.child to be true
+ if (aCircuit == null || (aCircuit != null && aCircuit.child == false))
{
- // uh-oh, this is fishy
- m_log.WarnFormat("[SCENE]: Agent {0} with session {1} connecting with unidentified end point {2}. Refusing service.",
- client.AgentId, client.SessionId, ep.ToString());
- try
- {
- client.Close();
- }
- catch (Exception e)
- {
- m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace);
- }
- return;
+ sp.IsChildAgent = false;
+ Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
}
}
-
- m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
-
- ScenePresence sp = CreateAndAddScenePresence(client);
- if (aCircuit != null)
- sp.Appearance = aCircuit.Appearance;
-
- // HERE!!! Do the initial attachments right here
- // first agent upon login is a root agent by design.
- // All other AddNewClient calls find aCircuit.child to be true
- if (aCircuit == null || (aCircuit != null && aCircuit.child == false))
- {
- sp.IsChildAgent = false;
- Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
- }
}
- m_LastLogin = Util.EnvironmentTickCount();
- EventManager.TriggerOnNewClient(client);
- if (vialogin)
- EventManager.TriggerOnClientLogin(client);
+ if (GetScenePresence(client.AgentId) != null)
+ {
+ m_LastLogin = Util.EnvironmentTickCount();
+ EventManager.TriggerOnNewClient(client);
+ if (vialogin)
+ EventManager.TriggerOnClientLogin(client);
+ }
}
private bool VerifyClient(AgentCircuitData aCircuit, System.Net.IPEndPoint ep, out bool vialogin)
@@ -2668,16 +2661,14 @@ namespace OpenSim.Region.Framework.Scenes
vialogin = false;
// Do the verification here
- if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0)
+ if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
{
- m_log.DebugFormat("[SCENE]: Incoming client {0} {1} in region {2} via Login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName);
+ m_log.DebugFormat("[SCENE]: Incoming client {0} {1} in region {2} via HG login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName);
vialogin = true;
IUserAgentVerificationModule userVerification = RequestModuleInterface();
if (userVerification != null && ep != null)
{
- System.Net.IPAddress addr = NetworkUtil.GetExternalIPOf(ep.Address);
-
- if (!userVerification.VerifyClient(aCircuit, /*ep.Address.ToString() */ addr.ToString()))
+ if (!userVerification.VerifyClient(aCircuit, ep.Address.ToString()))
{
// uh-oh, this is fishy
m_log.DebugFormat("[SCENE]: User Client Verification for {0} {1} in {2} returned false", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName);
@@ -2688,6 +2679,13 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ else if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0)
+ {
+ m_log.DebugFormat("[SCENE]: Incoming client {0} {1} in region {2} via regular login. Client IP verification not performed.",
+ aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName);
+ vialogin = true;
+ }
+
return true;
}
@@ -3343,7 +3341,8 @@ namespace OpenSim.Region.Framework.Scenes
/// also return a reason.
public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason)
{
- TeleportFlags tp = (TeleportFlags)teleportFlags;
+ bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 ||
+ (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0);
reason = String.Empty;
//Teleport flags:
@@ -3380,7 +3379,7 @@ namespace OpenSim.Region.Framework.Scenes
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
//On login test land permisions
- if (tp == TeleportFlags.ViaLogin)
+ if (vialogin)
{
if (land != null && !TestLandRestrictions(agent, land, out reason))
{
@@ -3440,7 +3439,7 @@ namespace OpenSim.Region.Framework.Scenes
agent.teleportFlags = teleportFlags;
m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
- if (tp == TeleportFlags.ViaLogin)
+ if (vialogin)
{
if (TestBorderCross(agent.startpos, Cardinals.E))
{
@@ -3561,7 +3560,7 @@ namespace OpenSim.Region.Framework.Scenes
IPresenceService presence = RequestModuleInterface();
if (presence == null)
{
- reason = String.Format("Failed to verify user {0} {1} in region {2}. Presence service does not exist.", agent.firstname, agent.lastname, RegionInfo.RegionName);
+ reason = String.Format("Failed to verify user presence in the grid for {0} {1} in region {2}. Presence service does not exist.", agent.firstname, agent.lastname, RegionInfo.RegionName);
return false;
}
@@ -3569,7 +3568,7 @@ namespace OpenSim.Region.Framework.Scenes
if (pinfo == null)
{
- reason = String.Format("Failed to verify user {0} {1}, access denied to region {2}.", agent.firstname, agent.lastname, RegionInfo.RegionName);
+ reason = String.Format("Failed to verify user presence in the grid for {0} {1}, access denied to region {2}.", agent.firstname, agent.lastname, RegionInfo.RegionName);
return false;
}
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index d4f9f1876d..54b32601b9 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -130,11 +130,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
{
TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure();
-
+
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
-
+
TestScene scene = SceneSetupHelpers.SetupScene();
-
+
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
sogd.Enabled = false;
@@ -147,7 +147,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
Assert.That(retrievedPart, Is.Not.Null);
-
+
sogd.InventoryDeQueueAndDelete();
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index 501207e041..e39a362883 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -104,8 +104,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
agent.AgentID = agent1;
agent.firstname = firstName;
agent.lastname = "testlastname";
- agent.SessionID = UUID.Zero;
- agent.SecureSessionID = UUID.Zero;
+ agent.SessionID = UUID.Random();
+ agent.SecureSessionID = UUID.Random();
agent.circuitcode = 123;
agent.BaseFolder = UUID.Zero;
agent.InventoryFolder = UUID.Zero;
@@ -114,6 +114,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
agent.ChildrenCapSeeds = new Dictionary();
agent.child = true;
+ if (scene.PresenceService == null)
+ Console.WriteLine("Presence Service is null");
+
+ scene.PresenceService.LoginAgent(agent.AgentID.ToString(), agent.SessionID, agent.SecureSessionID);
+
string reason;
scene.NewUserConnection(agent, (uint)TeleportFlags.ViaLogin, out reason);
testclient = new TestClient(agent, scene);
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 9739e5a45f..05b00e5428 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -183,6 +183,8 @@ namespace OpenSim.Server.Handlers.Simulation
resp["reason"] = OSD.FromString(reason);
resp["success"] = OSD.FromBoolean(result);
+ // Let's also send out the IP address of the caller back to the caller (HG 1.5)
+ resp["your_ip"] = OSD.FromString(GetCallerIP(request));
// TODO: add reason if not String.Empty?
responsedata["int_response_code"] = HttpStatusCode.OK;
@@ -375,6 +377,24 @@ namespace OpenSim.Server.Handlers.Simulation
{
m_SimulationService.ReleaseAgent(regionID, id, "");
}
+
+ private string GetCallerIP(Hashtable req)
+ {
+ if (req.ContainsKey("headers"))
+ {
+ try
+ {
+ Hashtable headers = (Hashtable)req["headers"];
+ if (headers.ContainsKey("remote_addr") && headers["remote_addr"] != null)
+ return headers["remote_addr"].ToString();
+ }
+ catch (Exception e)
+ {
+ m_log.WarnFormat("[AGENT HANDLER]: exception in GetCallerIP: {0}", e.Message);
+ }
+ }
+ return string.Empty;
+ }
}
}
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 6f159a0b7f..cabee4c800 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -38,6 +38,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using OpenMetaverse;
using OpenMetaverse.Imaging;
+using OpenMetaverse.StructuredData;
using Nwc.XmlRpc;
using log4net;
@@ -278,5 +279,48 @@ namespace OpenSim.Services.Connectors.Hypergrid
return null;
}
+ public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string myipaddress, out string reason)
+ {
+ HttpWebRequest AgentCreateRequest = null;
+ myipaddress = String.Empty;
+ reason = String.Empty;
+
+ if (SendRequest(destination, aCircuit, flags, out reason, out AgentCreateRequest))
+ {
+ string response = GetResponse(AgentCreateRequest, out reason);
+ bool success = true;
+ UnpackResponse(response, out success, out reason, out myipaddress);
+ return success;
+ }
+
+ return false;
+ }
+
+ protected void UnpackResponse(string response, out bool result, out string reason, out string ipaddress)
+ {
+ result = true;
+ reason = string.Empty;
+ ipaddress = string.Empty;
+
+ if (!String.IsNullOrEmpty(response))
+ {
+ try
+ {
+ // we assume we got an OSDMap back
+ OSDMap r = Util.GetOSDMap(response);
+ result = r["success"].AsBoolean();
+ reason = r["reason"].AsString();
+ ipaddress = r["your_ip"].AsString();
+ }
+ catch (NullReferenceException e)
+ {
+ m_log.InfoFormat("[GATEKEEPER SERVICE CONNECTOR]: exception on UnpackResponse of DoCreateChildAgentCall {0}", e.Message);
+ reason = "Internal error";
+ result = false;
+ }
+ }
+ }
+
+
}
}
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 69dff3cd4d..c1e594947e 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -73,6 +73,13 @@ namespace OpenSim.Services.Connectors.Hypergrid
{
}
+ public bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint ipaddress, out string reason)
+ {
+ // not available over remote calls
+ reason = "Method not available over remote calls";
+ return false;
+ }
+
public bool LoginAgentToGrid(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, out string reason)
{
reason = String.Empty;
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 957df3547c..9e30044b31 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -77,8 +77,26 @@ namespace OpenSim.Services.Connectors.Simulation
public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
{
+ HttpWebRequest AgentCreateRequest = null;
reason = String.Empty;
+ if (SendRequest(destination, aCircuit, flags, out reason, out AgentCreateRequest))
+ {
+ string response = GetResponse(AgentCreateRequest, out reason);
+ bool success = true;
+ UnpackResponse(response, out success, out reason);
+ return success;
+ }
+
+ return false;
+ }
+
+
+ protected bool SendRequest(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason, out HttpWebRequest AgentCreateRequest)
+ {
+ reason = String.Empty;
+ AgentCreateRequest = null;
+
if (destination == null)
{
reason = "Destination is null";
@@ -101,7 +119,7 @@ namespace OpenSim.Services.Connectors.Simulation
//Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
- HttpWebRequest AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri);
+ AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri);
AgentCreateRequest.Method = "POST";
AgentCreateRequest.ContentType = "application/json";
AgentCreateRequest.Timeout = 10000;
@@ -134,7 +152,7 @@ namespace OpenSim.Services.Connectors.Simulation
AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send
os = AgentCreateRequest.GetRequestStream();
os.Write(buffer, 0, strBuffer.Length); //Send it
- m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
+ m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY);
}
//catch (WebException ex)
@@ -150,11 +168,18 @@ namespace OpenSim.Services.Connectors.Simulation
os.Close();
}
+ return true;
+ }
+
+ protected string GetResponse(HttpWebRequest AgentCreateRequest, out string reason)
+ {
// Let's wait for the response
//m_log.Info("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after DoCreateChildAgentCall");
+ reason = string.Empty;
WebResponse webResponse = null;
StreamReader sr = null;
+ string response = string.Empty;
try
{
webResponse = AgentCreateRequest.GetResponse();
@@ -166,37 +191,15 @@ namespace OpenSim.Services.Connectors.Simulation
{
sr = new StreamReader(webResponse.GetResponseStream());
- string response = sr.ReadToEnd().Trim();
+ response = sr.ReadToEnd().Trim();
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
-
- if (!String.IsNullOrEmpty(response))
- {
- try
- {
- // we assume we got an OSDMap back
- OSDMap r = Util.GetOSDMap(response);
- bool success = r["success"].AsBoolean();
- reason = r["reason"].AsString();
- return success;
- }
- catch (NullReferenceException e)
- {
- m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
-
- // check for old style response
- if (response.ToLower().StartsWith("true"))
- return true;
-
- return false;
- }
- }
}
}
catch (WebException ex)
{
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message);
reason = "Destination did not reply";
- return false;
+ return string.Empty;
}
finally
{
@@ -204,7 +207,33 @@ namespace OpenSim.Services.Connectors.Simulation
sr.Close();
}
- return true;
+ return response;
+ }
+
+ protected void UnpackResponse(string response, out bool result, out string reason)
+ {
+ result = true;
+ reason = string.Empty;
+ if (!String.IsNullOrEmpty(response))
+ {
+ try
+ {
+ // we assume we got an OSDMap back
+ OSDMap r = Util.GetOSDMap(response);
+ result = r["success"].AsBoolean();
+ reason = r["reason"].AsString();
+ }
+ catch (NullReferenceException e)
+ {
+ m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
+
+ // check for old style response
+ if (response.ToLower().StartsWith("true"))
+ result = true;
+
+ result = false;
+ }
+ }
}
protected virtual OSDMap PackCreateAgentArguments(AgentCircuitData aCircuit, GridRegion destination, uint flags)
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 6f041dae21..3f5c4f1400 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -225,17 +225,23 @@ namespace OpenSim.Services.HypergridService
// May want to authorize
+ bool isFirstLogin = false;
//
- // Login the presence
+ // Login the presence, if it's not there yet (by the login service)
//
- if (!m_PresenceService.LoginAgent(aCircuit.AgentID.ToString(), aCircuit.SessionID, aCircuit.SecureSessionID))
- {
- reason = "Unable to login presence";
- m_log.InfoFormat("[GATEKEEPER SERVICE]: Presence login failed for foreign agent {0} {1}. Refusing service.",
- aCircuit.firstname, aCircuit.lastname);
- return false;
- }
- m_log.DebugFormat("[GATEKEEPER SERVICE]: Login presence ok");
+ PresenceInfo presence = m_PresenceService.GetAgent(aCircuit.SessionID);
+ if (presence != null) // it has been placed there by the login service
+ isFirstLogin = true;
+
+ else
+ if (!m_PresenceService.LoginAgent(aCircuit.AgentID.ToString(), aCircuit.SessionID, aCircuit.SecureSessionID))
+ {
+ reason = "Unable to login presence";
+ m_log.InfoFormat("[GATEKEEPER SERVICE]: Presence login failed for foreign agent {0} {1}. Refusing service.",
+ aCircuit.firstname, aCircuit.lastname);
+ return false;
+ }
+ m_log.DebugFormat("[GATEKEEPER SERVICE]: Login presence ok");
//
// Get the region
@@ -274,7 +280,9 @@ namespace OpenSim.Services.HypergridService
//
// Finally launch the agent at the destination
//
- return m_SimulationService.CreateAgent(destination, aCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
+ Constants.TeleportFlags loginFlag = isFirstLogin ? Constants.TeleportFlags.ViaLogin : Constants.TeleportFlags.ViaHGLogin;
+ m_log.DebugFormat("[GATEKEEPER SERVICE]: launching agent {0}", loginFlag);
+ return m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason);
}
protected bool Authenticate(AgentCircuitData aCircuit)
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 181d7f26d1..8c3be7023b 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -131,10 +131,11 @@ namespace OpenSim.Services.HypergridService
return home;
}
- public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, out string reason)
+ public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint clientIP, out string reason)
{
- m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} to grid {2}",
- agentCircuit.firstname, agentCircuit.lastname, gatekeeper.ExternalHostName +":"+ gatekeeper.HttpPort);
+ m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}",
+ agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()),
+ gatekeeper.ExternalHostName +":"+ gatekeeper.HttpPort);
// Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination
GridRegion region = new GridRegion(gatekeeper);
@@ -149,11 +150,12 @@ namespace OpenSim.Services.HypergridService
//bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
bool success = false;
+ string myExternalIP = string.Empty;
string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort;
if (m_GridName == gridName)
success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
else
- success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
+ success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out myExternalIP, out reason);
if (!success)
{
@@ -167,15 +169,26 @@ namespace OpenSim.Services.HypergridService
return false;
}
+ m_log.DebugFormat("[USER AGENT SERVICE]: Gatekeeper sees me as {0}", myExternalIP);
+ // else set the IP addresses associated with this client
+ if (clientIP != null)
+ m_TravelingAgents[agentCircuit.SessionID].ClientIPAddress = clientIP.Address.ToString();
+ m_TravelingAgents[agentCircuit.SessionID].MyIpAddress = myExternalIP;
return true;
}
- public void SetClientToken(UUID sessionID, string token)
+ public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, out string reason)
+ {
+ reason = string.Empty;
+ return LoginAgentToGrid(agentCircuit, gatekeeper, finalDestination, null, out reason);
+ }
+
+ private void SetClientIP(UUID sessionID, string ip)
{
if (m_TravelingAgents.ContainsKey(sessionID))
{
- m_log.DebugFormat("[USER AGENT SERVICE]: Setting token {0} for session {1}", token, sessionID);
- m_TravelingAgents[sessionID].ClientToken = token;
+ m_log.DebugFormat("[USER AGENT SERVICE]: Setting IP {0} for session {1}", ip, sessionID);
+ m_TravelingAgents[sessionID].ClientIPAddress = ip;
}
}
@@ -196,7 +209,7 @@ namespace OpenSim.Services.HypergridService
travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort;
travel.ServiceToken = agentCircuit.ServiceSessionID;
if (old != null)
- travel.ClientToken = old.ClientToken;
+ travel.ClientIPAddress = old.ClientIPAddress;
return old;
}
@@ -233,15 +246,22 @@ namespace OpenSim.Services.HypergridService
return travel.GridExternalName == thisGridExternalName;
}
- public bool VerifyClient(UUID sessionID, string token)
+ public bool VerifyClient(UUID sessionID, string reportedIP)
{
if (m_BypassClientVerification)
return true;
- m_log.DebugFormat("[USER AGENT SERVICE]: Verifying Client session {0} with token {1}", sessionID, token);
+ m_log.DebugFormat("[USER AGENT SERVICE]: Verifying Client session {0} with reported IP {1}.",
+ sessionID, reportedIP);
if (m_TravelingAgents.ContainsKey(sessionID))
- return m_TravelingAgents[sessionID].ClientToken == token;
+ {
+ m_log.DebugFormat("[USER AGENT SERVICE]: Comparing with login IP {0} and MyIP {1}",
+ m_TravelingAgents[sessionID].ClientIPAddress, m_TravelingAgents[sessionID].MyIpAddress);
+
+ return m_TravelingAgents[sessionID].ClientIPAddress == reportedIP ||
+ m_TravelingAgents[sessionID].MyIpAddress == reportedIP; // NATed
+ }
return false;
}
@@ -266,7 +286,8 @@ namespace OpenSim.Services.HypergridService
public UUID UserID;
public string GridExternalName = string.Empty;
public string ServiceToken = string.Empty;
- public string ClientToken = string.Empty;
+ public string ClientIPAddress = string.Empty; // as seen from this user agent service
+ public string MyIpAddress = string.Empty; // the user agent service's external IP, as seen from the next gatekeeper
}
}
diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs
index 2d397bc03d..aac82936b0 100644
--- a/OpenSim/Services/Interfaces/IGatekeeperService.cs
+++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs
@@ -48,13 +48,15 @@ namespace OpenSim.Services.Interfaces
///
public interface IUserAgentService
{
+ // called by login service only
+ bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint clientIP, out string reason);
+ // called by simulators
bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, out string reason);
- void SetClientToken(UUID sessionID, string token);
void LogoutAgent(UUID userID, UUID sessionID);
GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt);
bool AgentIsComingHome(UUID sessionID, string thisGridExternalName);
bool VerifyAgent(UUID sessionID, string token);
- bool VerifyClient(UUID sessionID, string token);
+ bool VerifyClient(UUID sessionID, string reportedIP);
}
}
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 0bf75b0352..09be4a2e11 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -761,12 +761,8 @@ namespace OpenSim.Services.LLLoginService
private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)
{
m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName);
- if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason))
- {
- IPAddress addr = NetworkUtil.GetExternalIPOf(clientIP.Address);
- m_UserAgentService.SetClientToken(aCircuit.SessionID, addr.ToString() /* clientIP.Address.ToString() */);
+ if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, clientIP, out reason))
return true;
- }
return false;
}
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 4a356e2943..eaa0d33b4b 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -46,6 +46,7 @@ using OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
+using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common.Mock;
@@ -63,6 +64,7 @@ namespace OpenSim.Tests.Common.Setup
private static ISharedRegionModule m_inventoryService = null;
private static ISharedRegionModule m_gridService = null;
private static ISharedRegionModule m_userAccountService = null;
+ private static ISharedRegionModule m_presenceService = null;
///
/// Set up a test scene
@@ -180,7 +182,7 @@ namespace OpenSim.Tests.Common.Setup
else
StartAssetService(testScene, false);
- // For now, always started a 'real' authenication service
+ // For now, always started a 'real' authentication service
StartAuthenticationService(testScene, true);
if (realServices.Contains("inventory"))
@@ -188,10 +190,9 @@ namespace OpenSim.Tests.Common.Setup
else
StartInventoryService(testScene, false);
- if (realServices.Contains("grid"))
- StartGridService(testScene, true);
-
+ StartGridService(testScene, true);
StartUserAccountService(testScene);
+ StartPresenceService(testScene);
}
// If not, make sure the shared module gets references to this new scene
else
@@ -202,11 +203,15 @@ namespace OpenSim.Tests.Common.Setup
m_inventoryService.RegionLoaded(testScene);
m_userAccountService.AddRegion(testScene);
m_userAccountService.RegionLoaded(testScene);
+ m_presenceService.AddRegion(testScene);
+ m_presenceService.RegionLoaded(testScene);
+
}
m_inventoryService.PostInitialise();
m_assetService.PostInitialise();
m_userAccountService.PostInitialise();
+ m_presenceService.PostInitialise();
testScene.RegionInfo.EstateSettings.EstateOwner = UUID.Random();
testScene.SetModuleInterfaces();
@@ -225,7 +230,11 @@ namespace OpenSim.Tests.Common.Setup
m_inventoryService = null;
m_gridService = null;
m_userAccountService = null;
-
+ m_presenceService = null;
+
+ testScene.RegionInfo.EstateSettings = new EstateSettings();
+ testScene.LoginsDisabled = false;
+
return testScene;
}
@@ -336,6 +345,32 @@ namespace OpenSim.Tests.Common.Setup
testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService);
}
+ ///
+ /// Start a presence service
+ ///
+ ///
+ private static void StartPresenceService(Scene testScene)
+ {
+ IConfigSource config = new IniConfigSource();
+ config.AddConfig("Modules");
+ config.AddConfig("PresenceService");
+ config.Configs["Modules"].Set("PresenceServices", "LocalPresenceServicesConnector");
+ config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
+ config.Configs["PresenceService"].Set(
+ "LocalServiceModule", "OpenSim.Services.PresenceService.dll:PresenceService");
+
+ if (m_presenceService == null)
+ {
+ ISharedRegionModule presenceService = new LocalPresenceServicesConnector();
+ presenceService.Initialise(config);
+ m_presenceService = presenceService;
+ }
+
+ m_presenceService.AddRegion(testScene);
+ m_presenceService.RegionLoaded(testScene);
+ testScene.AddRegionModule(m_presenceService.Name, m_presenceService);
+ }
+
///
/// Setup modules for a scene using their default settings.
///
@@ -446,9 +481,14 @@ namespace OpenSim.Tests.Common.Setup
{
string reason;
- // We emulate the proper login sequence here by doing things in three stages
+ // We emulate the proper login sequence here by doing things in four stages
+
+ // Stage 0: log the presence
+ scene.PresenceService.LoginAgent(agentData.AgentID.ToString(), agentData.SessionID, agentData.SecureSessionID);
+
// Stage 1: simulate login by telling the scene to expect a new user connection
- scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason);
+ if (!scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason))
+ Console.WriteLine("NewUserConnection failed: " + reason);
// Stage 2: add the new client as a child agent to the scene
TestClient client = new TestClient(agentData, scene);
@@ -459,7 +499,7 @@ namespace OpenSim.Tests.Common.Setup
//scene.AgentCrossing(agentData.AgentID, new Vector3(90, 90, 90), false); OBSOLETE
ScenePresence scp = scene.GetScenePresence(agentData.AgentID);
- scp.MakeRootAgent(new Vector3(90,90,90), true);
+ scp.MakeRootAgent(new Vector3(90, 90, 90), true);
return client;
}
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index cf9e217481..674a45445c 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -300,7 +300,7 @@
; What is reported as the "X-Secondlife-Shard"
; Defaults to the user server url if not set
- ; The old default is "OpenSim", set here fro compatibility
+ ; The old default is "OpenSim", set here for compatibility
shard = "OpenSim"
; What is reported as the "User-Agent" when using llHTTPRequest
@@ -309,6 +309,18 @@
; " (Mozilla Compatible)" to the text where there are problems with a web server
;user_agent = "OpenSim LSL (Mozilla Compatible)"
+[XMLRPC]
+ ; ##
+ ; ## Scripting XMLRPC mapper
+ ; ##
+
+ ; If enabled, this will post an event, "xmlrpc_uri(string)" to the
+ ; script concurrently with the first remote_data event.
+ ; This will contain the fully qualified URI an external site needs
+ ; to use to send XMLRPC requests to that script
+
+ ;XmlRpcRouterModule = "XmlRpcRouterModule"
+ ;XmlRpcPort = 20800
[ClientStack.LindenUDP]
; Set this to true to process incoming packets asynchronously. Networking is
@@ -1180,37 +1192,38 @@ UseSafetyCommit = true
;vivox_channel_clamping_distance = 10
[FreeSwitchVoice]
- ; In order for this to work you need a functioning freeswitch pbx set
- ; up. Configuration for that will be posted in the wiki soon.
+ ; In order for this to work you need a functioning FreeSWITCH PBX set up.
+ ; Configuration details at http://opensimulator.org/wiki/Freeswitch_Module
enabled = false
- ;FreeSwitch server is going to contact us and ask us all
- ;sorts of things.
+ ; FreeSWITCH server is going to contact us and ask us all sorts of things
freeswitch_server_user = freeswitch
freeswitch_server_pass = password
freeswitch_api_prefix = /api
- ; this is the IP of your sim
+ ; external IP address of your OpenSim voice enabled region
+ ; note: all regions running on same OpenSim.exe will be enabled
freeswitch_service_server = ip.address.of.your.sim
- ;freeswitch_service_port = 80
; this should be the same port the region listens on
freeswitch_service_port = 9000
freeswitch_realm = ip.address.of.freeswitch.server
freeswitch_sip_proxy = ip.address.of.freeswitch.server:5060
+ ; STUN = Simple Traversal of UDP through NATs
+ ; See http://wiki.freeswitch.org/wiki/NAT_Traversal
+ ; stun.freeswitch.org is not guaranteed to be running so use it in production at your own risk
freeswitch_attempt_stun = false
- freeswitch_stun_server = ip.address.of.freeswitch.server
+ freeswitch_stun_server = ip.address.of.stun.server
freeswitch_echo_server = ip.address.of.freeswitch.server
freeswitch_echo_port = 50505
freeswitch_well_known_ip = ip.address.of.freeswitch.server
-
- ;Type the address of your http server here, hostname is allowed. This is provided so you can specify a hostname
- ;This is used by client for account verification. By default, it's the same as the freeswitch service server.
-
- ;opensim_well_known_http_address = Address_Of_your_SIM_HTTP_Server_Hostname_Allowed
-
+ ;
+ ; Type the address of your http server here, hostname is allowed. This is provided so you can specify a hostname
+ ; This is used by client for account verification. By default, it's the same as the freeswitch service server.
+ ;
+ ; opensim_well_known_http_address = Address_Of_Your_SIM_HTTP_Server_Hostname_Allowed
+ ;
freeswitch_default_timeout = 5000
freeswitch_subscribe_retry = 120
; freeswitch_password_reset_url =
-
[Groups]
Enabled = false
@@ -1331,16 +1344,8 @@ Message = "The MOTD module is working!"
[Modules]
Include-modules = "addon-modules/*/config/*.ini"
-[XMLRPC]
- ; ##
- ; ## Scripting XMLRPC mapper
- ; ##
-
- ; If enabled, this will post an event, "xmlrpc_uri(string)" to the
- ; script concurrently with the first remote_data event.
- ; This will contain the fully qualified URI an external site needs
- ; to use to send XMLRPC requests to that script
-
- ;XmlRpcRouterModule = "XmlRpcRouterModule"
- ;XmlRpcPort = 20800
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ENSURE [Architecture] and [Modules] Sections with their "includes"
+;; are last to allow for overrides
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index 15b4d39c1d..122ba2e5f5 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -1,15 +1,25 @@
-;; Configurations for enabling HG1.5
-;;
-;; Run
-;; $ Robust.exe -inifile Robust.HG.ini
-
-;; HG1.5 handlers are: OpenSim.Server.Handlers.dll:GatekeeperService
-;; OpenSim.Server.Handlers.dll:UserAgentService
-;; Additional OpenSim.Server.Handlers.dll:AssetServiceConnector and
-;; OpenSim.Server.Handlers.dll:XInventoryInConnector
-;; are started in port 8002, outside the firewall
-;;
+; * Run
+; * $ Robust.exe -inifile Robust.HG.ini
+; *
+; * Configurations for enabling HG1.5
+; *
+; * HG1.5 handlers are: OpenSim.Server.Handlers.dll:GatekeeperService
+; * OpenSim.Server.Handlers.dll:UserAgentService
+; * Additional OpenSim.Server.Handlers.dll:AssetServiceConnector and
+; * OpenSim.Server.Handlers.dll:XInventoryInConnector
+; * are started in port 8002, outside the firewall
+; *
+; * The startup section lists all the connectors to start up in this server
+; * instance. This may be only one, or it may be the entire server suite.
+; * Multiple connectors should be separated by commas.
+; *
+; * These are the IN connectors the server uses, the in connectors
+; * read this config file and load the needed service and database connectors
+; *
+; * The full syntax of a connector string is:
+; * [[@]/][:]
+; *
[Startup]
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:AssetServiceConnector"
@@ -52,10 +62,10 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; *
[GridService]
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
- Realm = "regions"
+ ; Realm = "regions"
; AllowDuplicateNames = "True"
; Check4096 = "False"
-
+
;; Next, we can specify properties of regions, including default and fallback regions
;; The syntax is: Region_ = ""
;; or: Region_ = ""
@@ -70,12 +80,13 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; * This is the new style authentication service. Currently, only MySQL
; * is implemented. "Realm" is the table that is used for user lookup.
-; * By setting it to "users", you can use the old style users table
-; * as an authentication source.
+; * It defaults to "useraccounts", which uses the new style.
+; * Realm = "users" will use the legacy tables as an authentication source
; *
[AuthenticationService]
; for the server connector
LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
+ ; Realm = "useraccounts"
[OpenIdService]
; for the server connector
@@ -89,7 +100,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
[UserAccountService]
; for the server connector
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
- ;; These are for creating new accounts by the service
+ ; Realm = "usersaccounts"
+
+ ; These are for creating new accounts by the service
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
@@ -161,32 +174,25 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; login page: optional: if it exists it will be used to tell the client to use
; this as splash page
- ; currently unused
;welcome = http://127.0.0.1/welcome
; helper uri: optional: if it exists if will be used to tell the client to use
; this for all economy related things
- ; currently unused
;economy = http://127.0.0.1:9000/
; web page of grid: optional: page providing further information about your grid
- ; currently unused
;about = http://127.0.0.1/about/
; account creation: optional: page providing further information about obtaining
; a user account on your grid
- ; currently unused
;register = http://127.0.0.1/register
; help: optional: page providing further assistance for users of your grid
- ; currently unused
;help = http://127.0.0.1/help
; password help: optional: page providing password assistance for users of your grid
- ; currently unused
;password = http://127.0.0.1/password
-
[GatekeeperService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:GatekeeperService"
;; for the service
@@ -200,9 +206,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; CHANGE THIS
ExternalName = "http://127.0.0.1:8002"
- ; Does this grid allow incoming links to any region in it?
- ; If false, HG TPs happen only to the Default regions specified in [GridService] section
- AllowTeleportsToAnyRegion = true
+ ; Does this grid allow incoming links to any region in it?
+ ; If false, HG TPs happen only to the Default regions specified in [GridService] section
+ AllowTeleportsToAnyRegion = true
[UserAgentService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
@@ -211,12 +217,12 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
GridService = "OpenSim.Services.GridService.dll:GridService"
GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService"
-;; The interface that local users get when they are in other grids.
-;; This restricts the inventory operations while in other grids.
-;; Still not completely safe, especially if users perform inventory operations
-;; while in those grids. The more the user accesses his/her inventory, the more
-;; those simulators will know about the user's inventory.
+; * The interface that local users get when they are in other grids.
+; * This restricts the inventory operations while in other grids.
+; * Still not completely safe, especially if users perform inventory operations
+; * while in those grids. The more the user accesses his/her inventory, the more
+; * those simulators will know about the user's inventory.
+; *
[HGInventoryService]
; For the InventoryServiceInConnector
- LocalServiceModule = "OpenSim.Services.InventoryService.dll:HGInventoryService"
-
+ LocalServiceModule = "OpenSim.Services.InventoryService.dll:HGInventoryService"
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index 96dfc01add..0353eec65c 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -1,16 +1,18 @@
+; * Run
+; * $ Robust.exe -inifile Robust.ini
+; *
+
; * The startup section lists all the connectors to start up in this server
; * instance. This may be only one, or it may be the entire server suite.
-; * Multiple connectors should be seaprated by commas.
-; * The startup section lists all the connectors to start up in this server
-; * instance. This may be only one, or it may be the entire server suite.
-; * Multiple connectors should be seaprated by commas.
+; * Multiple connectors should be separated by commas.
; *
; * These are the IN connectors the server uses, the in connectors
; * read this config file and load the needed service and database connectors
; *
+; * The full syntax of a connector string is:
+; * [[@]/][:]
; *
[Startup]
-
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector"
; * This is common for all services, it's the network setup for the entire
@@ -30,7 +32,6 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;"
-
; * As an example, the below configuration precisely mimicks the legacy
; * asset server. It is read by the asset IN connector (defined above)
; * and it then loads the OUT connector (a local database module). That,
@@ -54,8 +55,10 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; *
[GridService]
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
- Realm = "regions"
+ ; Realm = "regions"
; AllowDuplicateNames = "True"
+ ; Check4096 = "False"
+
;; Next, we can specify properties of regions, including default and fallback regions
;; The syntax is: Region_ = ""
;; or: Region_ = ""
@@ -70,8 +73,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; * This is the new style authentication service. Currently, only MySQL
; * is implemented. "Realm" is the table that is used for user lookup.
-; * By setting it to "users", you can use the old style users table
-; * as an authentication source.
+; * It defaults to "users", which uses the legacy tables as an
+; * authentication source.
; *
[AuthenticationService]
; for the server connector
@@ -82,15 +85,17 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
UserAccountServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
-; * This is the new style user service.
-; * "Realm" is the table that is used for user lookup.
-; * It defaults to "users", which uses the legacy tables
+; * This is the new style authentication service. Currently, only MySQL
+; * is implemented. "Realm" is the table that is used for user lookup.
+; * It defaults to "useraccounts", which uses the new style.
+; * Realm = "users" will use the legacy tables as an authentication source
; *
[UserAccountService]
; for the server connector
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
; Realm = "useraccounts"
- ;; These are for creating new accounts by the service
+
+ ; These are for creating new accounts by the service
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
@@ -158,27 +163,21 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; login page: optional: if it exists it will be used to tell the client to use
; this as splash page
- ; currently unused
;welcome = http://127.0.0.1/welcome
; helper uri: optional: if it exists if will be used to tell the client to use
; this for all economy related things
- ; currently unused
;economy = http://127.0.0.1:9000/
; web page of grid: optional: page providing further information about your grid
- ; currently unused
;about = http://127.0.0.1/about/
; account creation: optional: page providing further information about obtaining
; a user account on your grid
- ; currently unused
;register = http://127.0.0.1/register
; help: optional: page providing further assistance for users of your grid
- ; currently unused
;help = http://127.0.0.1/help
; password help: optional: page providing password assistance for users of your grid
- ; currently unused
;password = http://127.0.0.1/password