aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
authorSean Dague2007-10-05 15:45:45 +0000
committerSean Dague2007-10-05 15:45:45 +0000
commitc3d8f1f4253f72484100394940e62f2912cbc4ff (patch)
tree8a9f237ed3c1140b4059ec121e0d4ede82eae416 /OpenSim/Grid
parent* So, ok, maybe renaming serialized fields on a friday wasn't the smartest of... (diff)
downloadopensim-SC_OLD-c3d8f1f4253f72484100394940e62f2912cbc4ff.zip
opensim-SC_OLD-c3d8f1f4253f72484100394940e62f2912cbc4ff.tar.gz
opensim-SC_OLD-c3d8f1f4253f72484100394940e62f2912cbc4ff.tar.bz2
opensim-SC_OLD-c3d8f1f4253f72484100394940e62f2912cbc4ff.tar.xz
getting all our line endings consistant again
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/ScriptServer/Application.cs64
-rw-r--r--OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs32
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs146
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs10
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs82
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServerMain.cs96
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs192
8 files changed, 344 insertions, 344 deletions
diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs
index 780f037..7fc9a53 100644
--- a/OpenSim/Grid/ScriptServer/Application.cs
+++ b/OpenSim/Grid/ScriptServer/Application.cs
@@ -24,35 +24,35 @@
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 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. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Grid.ScriptServer 32namespace OpenSim.Grid.ScriptServer
33{ 33{
34 class OpenScript_Main 34 class OpenScript_Main
35 { 35 {
36 36
37 public static ScriptServerMain SE; 37 public static ScriptServerMain SE;
38 38
39 static void Main(string[] args) 39 static void Main(string[] args)
40 { 40 {
41 // Application is starting 41 // Application is starting
42 SE = new ScriptServerMain(); 42 SE = new ScriptServerMain();
43 43
44 System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); 44 System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
45 } 45 }
46 46
47 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) 47 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
48 { 48 {
49 Console.WriteLine(""); 49 Console.WriteLine("");
50 Console.WriteLine("APPLICATION EXCEPTION DETECTED"); 50 Console.WriteLine("APPLICATION EXCEPTION DETECTED");
51 Console.WriteLine(""); 51 Console.WriteLine("");
52 Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString()); 52 Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString());
53 Console.WriteLine("Exception:"); 53 Console.WriteLine("Exception:");
54 Console.WriteLine(e.ExceptionObject.ToString()); 54 Console.WriteLine(e.ExceptionObject.ToString());
55 } 55 }
56 56
57 } 57 }
58} 58}
diff --git a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs
index d60dbb4..63f40d4 100644
--- a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Grid.ScriptServer")] 8[assembly: AssemblyTitle("OpenSim.Grid.ScriptServer")]
9[assembly: AssemblyDescription("")] 9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")] 10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")] 11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Grid.ScriptServer")] 12[assembly: AssemblyProduct("OpenSim.Grid.ScriptServer")]
13[assembly: AssemblyCopyright("Copyright © 2007")] 13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
22// The following GUID is for the ID of the typelib if this project is exposed to COM 22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("b6861b87-5203-4040-b756-fd4774932f82")] 23[assembly: Guid("b6861b87-5203-4040-b756-fd4774932f82")]
24 24
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
index 7171b82..e808f82 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
@@ -1,16 +1,16 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Grid.ScriptServer 5namespace OpenSim.Grid.ScriptServer
6{ 6{
7 // Maintains connection and communication to a region 7 // Maintains connection and communication to a region
8 internal class RegionConnectionManager 8 internal class RegionConnectionManager
9 { 9 {
10 10
11 public RegionConnectionManager() 11 public RegionConnectionManager()
12 { 12 {
13 } 13 }
14 14
15 } 15 }
16} 16}
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
index d609d63..c6564ad 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
@@ -24,76 +24,76 @@
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 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. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using System.Threading; 31using System.Threading;
32using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
33 33
34namespace OpenSim.Grid.ScriptServer 34namespace OpenSim.Grid.ScriptServer
35{ 35{
36 // Waiting for incoming script requests from region 36 // Waiting for incoming script requests from region
37 internal class RegionCommManager 37 internal class RegionCommManager
38 { 38 {
39 private Thread listenThread; 39 private Thread listenThread;
40 40
41 private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); 41 private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>();
42 42
43 private LogBase m_log; 43 private LogBase m_log;
44 private ScriptServerMain m_ScriptServerMain; 44 private ScriptServerMain m_ScriptServerMain;
45 public RegionCommManager(ScriptServerMain scm, LogBase logger) 45 public RegionCommManager(ScriptServerMain scm, LogBase logger)
46 { 46 {
47 m_ScriptServerMain = scm; 47 m_ScriptServerMain = scm;
48 m_log = logger; 48 m_log = logger;
49 } 49 }
50 ~RegionCommManager() 50 ~RegionCommManager()
51 { 51 {
52 Stop(); 52 Stop();
53 } 53 }
54 54
55 /// <summary> 55 /// <summary>
56 /// Starts listening for region requests 56 /// Starts listening for region requests
57 /// </summary> 57 /// </summary>
58 public void Start() 58 public void Start()
59 { 59 {
60 // Start listener 60 // Start listener
61 Stop(); 61 Stop();
62 listenThread = new Thread(ListenThreadLoop); 62 listenThread = new Thread(ListenThreadLoop);
63 listenThread.Name = "listenThread"; 63 listenThread.Name = "listenThread";
64 listenThread.IsBackground = true; 64 listenThread.IsBackground = true;
65 listenThread.Start(); 65 listenThread.Start();
66 } 66 }
67 /// <summary> 67 /// <summary>
68 /// Stops listening for region requests 68 /// Stops listening for region requests
69 /// </summary> 69 /// </summary>
70 public void Stop() 70 public void Stop()
71 { 71 {
72 // Stop listener, clean up 72 // Stop listener, clean up
73 if (listenThread != null) 73 if (listenThread != null)
74 { 74 {
75 try 75 try
76 { 76 {
77 if (listenThread.IsAlive) 77 if (listenThread.IsAlive)
78 listenThread.Abort(); 78 listenThread.Abort();
79 listenThread.Join(1000); // Wait 1 second for thread to shut down 79 listenThread.Join(1000); // Wait 1 second for thread to shut down
80 } 80 }
81 catch { } 81 catch { }
82 listenThread = null; 82 listenThread = null;
83 } 83 }
84 } 84 }
85 85
86 private void ListenThreadLoop() 86 private void ListenThreadLoop()
87 { 87 {
88 // * Listen for requests from regions 88 // * Listen for requests from regions
89 // * When a request is received: 89 // * When a request is received:
90 // - Authenticate region 90 // - Authenticate region
91 // - Authenticate user 91 // - Authenticate user
92 // - Have correct scriptengine load script 92 // - Have correct scriptengine load script
93 // ~ ask scriptengines if they will accept script? 93 // ~ ask scriptengines if they will accept script?
94 // - Add script to shared communication channel towards that region 94 // - Add script to shared communication channel towards that region
95 95
96 } 96 }
97 97
98 } 98 }
99} 99}
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
index 8b07ab0..a259b1b 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using OpenSim.Framework.Console; 31using OpenSim.Framework.Console;
32 32
33namespace OpenSim.Grid.ScriptServer 33namespace OpenSim.Grid.ScriptServer
34{ 34{
35 internal class ScriptEngineLoader 35 internal class ScriptEngineLoader
@@ -39,7 +39,7 @@ namespace OpenSim.Grid.ScriptServer
39 39
40 public ScriptEngineLoader(LogBase logger) 40 public ScriptEngineLoader(LogBase logger)
41 { 41 {
42 m_log = logger; 42 m_log = logger;
43 } 43 }
44 44
45 public ScriptEngineInterface LoadScriptEngine(string EngineName) 45 public ScriptEngineInterface LoadScriptEngine(string EngineName)
@@ -121,5 +121,5 @@ namespace OpenSim.Grid.ScriptServer
121 return ret; 121 return ret;
122 } 122 }
123 } 123 }
124} 124}
125 125
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs
index faa859d..bfcee79 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs
@@ -1,41 +1,41 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Console; 4using OpenSim.Framework.Console;
5 5
6namespace OpenSim.Grid.ScriptServer 6namespace OpenSim.Grid.ScriptServer
7{ 7{
8 internal class ScriptEngineManager 8 internal class ScriptEngineManager
9 { 9 {
10 private LogBase m_log; 10 private LogBase m_log;
11 private ScriptEngineLoader ScriptEngineLoader; 11 private ScriptEngineLoader ScriptEngineLoader;
12 private List<ScriptEngineInterface> scriptEngines = new List<ScriptEngineInterface>(); 12 private List<ScriptEngineInterface> scriptEngines = new List<ScriptEngineInterface>();
13 private ScriptServerMain m_ScriptServerMain; 13 private ScriptServerMain m_ScriptServerMain;
14 14
15 // Initialize 15 // Initialize
16 public ScriptEngineManager(ScriptServerMain scm, LogBase logger) 16 public ScriptEngineManager(ScriptServerMain scm, LogBase logger)
17 { 17 {
18 m_ScriptServerMain = scm; 18 m_ScriptServerMain = scm;
19 m_log = logger; 19 m_log = logger;
20 ScriptEngineLoader = new ScriptEngineLoader(m_log); 20 ScriptEngineLoader = new ScriptEngineLoader(m_log);
21 21
22 // Temp - we should not load during initialize... Loading should be done later. 22 // Temp - we should not load during initialize... Loading should be done later.
23 LoadEngine("DotNetScriptEngine"); 23 LoadEngine("DotNetScriptEngine");
24 } 24 }
25 ~ScriptEngineManager() 25 ~ScriptEngineManager()
26 { 26 {
27 } 27 }
28 28
29 public void LoadEngine(string engineName) 29 public void LoadEngine(string engineName)
30 { 30 {
31 // Load and add to list of ScriptEngines 31 // Load and add to list of ScriptEngines
32 ScriptEngineInterface sei = ScriptEngineLoader.LoadScriptEngine(engineName); 32 ScriptEngineInterface sei = ScriptEngineLoader.LoadScriptEngine(engineName);
33 if (sei != null) 33 if (sei != null)
34 { 34 {
35 scriptEngines.Add(sei); 35 scriptEngines.Add(sei);
36 } 36 }
37 } 37 }
38 38
39 39
40 } 40 }
41} 41}
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
index 8352859..37541c9 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
@@ -1,48 +1,48 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using System.IO; 4using System.IO;
5using OpenSim.Framework.Console; 5using OpenSim.Framework.Console;
6using OpenSim.Framework.Utilities; 6using OpenSim.Framework.Utilities;
7 7
8namespace OpenSim.Grid.ScriptServer 8namespace OpenSim.Grid.ScriptServer
9{ 9{
10 public class ScriptServerMain : conscmd_callback 10 public class ScriptServerMain : conscmd_callback
11 { 11 {
12 private readonly string m_logFilename = ("region-console.log"); 12 private readonly string m_logFilename = ("region-console.log");
13 internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region 13 internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region
14 internal ScriptEngineManager ScriptEngines; // Loads scriptengines 14 internal ScriptEngineManager ScriptEngines; // Loads scriptengines
15 private LogBase m_log; 15 private LogBase m_log;
16 16
17 public ScriptServerMain() 17 public ScriptServerMain()
18 { 18 {
19 m_log = CreateLog(); 19 m_log = CreateLog();
20 20
21 RegionScriptDaemon = new RegionCommManager(this, m_log); 21 RegionScriptDaemon = new RegionCommManager(this, m_log);
22 ScriptEngines = new ScriptEngineManager(this, m_log); 22 ScriptEngines = new ScriptEngineManager(this, m_log);
23 23
24 } 24 }
25 25
26 ~ScriptServerMain() 26 ~ScriptServerMain()
27 { 27 {
28 } 28 }
29 29
30 protected LogBase CreateLog() 30 protected LogBase CreateLog()
31 { 31 {
32 if (!Directory.Exists(Util.logDir())) 32 if (!Directory.Exists(Util.logDir()))
33 { 33 {
34 Directory.CreateDirectory(Util.logDir()); 34 Directory.CreateDirectory(Util.logDir());
35 } 35 }
36 36
37 return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, false); 37 return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, false);
38 } 38 }
39 39
40 public void RunCmd(string command, string[] cmdparams) 40 public void RunCmd(string command, string[] cmdparams)
41 { 41 {
42 } 42 }
43 public void Show(string ShowWhat) 43 public void Show(string ShowWhat)
44 { 44 {
45 } 45 }
46 46
47 } 47 }
48} 48}
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index b42427b..e18191f 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -1,96 +1,96 @@
1using System; 1using System;
2using System.Collections; 2using System.Collections;
3using System.Net; 3using System.Net;
4using Nwc.XmlRpc; 4using Nwc.XmlRpc;
5using OpenSim.Framework.Data; 5using OpenSim.Framework.Data;
6using OpenSim.Framework.UserManagement; 6using OpenSim.Framework.UserManagement;
7using OpenSim.Framework.Utilities; 7using OpenSim.Framework.Utilities;
8using OpenSim.Framework.Configuration; 8using OpenSim.Framework.Configuration;
9using OpenSim.Framework.Types; 9using OpenSim.Framework.Types;
10 10
11namespace OpenSim.Grid.UserServer 11namespace OpenSim.Grid.UserServer
12{ 12{
13 public class UserLoginService : LoginService 13 public class UserLoginService : LoginService
14 { 14 {
15 public UserConfig m_config; 15 public UserConfig m_config;
16 16
17 public UserLoginService(UserManagerBase userManager, UserConfig config, string welcomeMess) 17 public UserLoginService(UserManagerBase userManager, UserConfig config, string welcomeMess)
18 : base(userManager, welcomeMess) 18 : base(userManager, welcomeMess)
19 { 19 {
20 m_config = config; 20 m_config = config;
21 } 21 }
22 22
23 /// <summary> 23 /// <summary>
24 /// Customises the login response and fills in missing values. 24 /// Customises the login response and fills in missing values.
25 /// </summary> 25 /// </summary>
26 /// <param name="response">The existing response</param> 26 /// <param name="response">The existing response</param>
27 /// <param name="theUser">The user profile</param> 27 /// <param name="theUser">The user profile</param>
28 public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) 28 public override void CustomiseResponse(LoginResponse response, UserProfileData theUser)
29 { 29 {
30 // Load information from the gridserver 30 // Load information from the gridserver
31 SimProfileData SimInfo = new SimProfileData(); 31 SimProfileData SimInfo = new SimProfileData();
32 SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); 32 SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
33 33
34 // Customise the response 34 // Customise the response
35 // Home Location 35 // Home Location
36 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " + 36 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " +
37 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 37 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
38 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; 38 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
39 39
40 // Destination 40 // Destination
41 Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY); 41 Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
42 response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); 42 response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
43 response.SimPort = (Int32)SimInfo.serverPort; 43 response.SimPort = (Int32)SimInfo.serverPort;
44 response.RegionX = SimInfo.regionLocX; 44 response.RegionX = SimInfo.regionLocX;
45 response.RegionY = SimInfo.regionLocY; 45 response.RegionY = SimInfo.regionLocY;
46 46
47 //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI 47 //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI
48 string capsPath = Util.GetRandomCapsPath(); 48 string capsPath = Util.GetRandomCapsPath();
49 response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; 49 response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/";
50 50
51 // Notify the target of an incoming user 51 // Notify the target of an incoming user
52 Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); 52 Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")");
53 53
54 // Prepare notification 54 // Prepare notification
55 Hashtable SimParams = new Hashtable(); 55 Hashtable SimParams = new Hashtable();
56 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); 56 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
57 SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); 57 SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
58 SimParams["firstname"] = theUser.username; 58 SimParams["firstname"] = theUser.username;
59 SimParams["lastname"] = theUser.surname; 59 SimParams["lastname"] = theUser.surname;
60 SimParams["agent_id"] = theUser.UUID.ToString(); 60 SimParams["agent_id"] = theUser.UUID.ToString();
61 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); 61 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
62 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); 62 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
63 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); 63 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
64 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); 64 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
65 SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); 65 SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
66 SimParams["caps_path"] = capsPath; 66 SimParams["caps_path"] = capsPath;
67 ArrayList SendParams = new ArrayList(); 67 ArrayList SendParams = new ArrayList();
68 SendParams.Add(SimParams); 68 SendParams.Add(SimParams);
69 69
70 // Update agent with target sim 70 // Update agent with target sim
71 theUser.currentAgent.currentRegion = SimInfo.UUID; 71 theUser.currentAgent.currentRegion = SimInfo.UUID;
72 theUser.currentAgent.currentHandle = SimInfo.regionHandle; 72 theUser.currentAgent.currentHandle = SimInfo.regionHandle;
73 73
74 System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI); 74 System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI);
75 // Send 75 // Send
76 try 76 try
77 { 77 {
78 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); 78 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
79 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); 79 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
80 } 80 }
81 catch( WebException e ) 81 catch( WebException e )
82 { 82 {
83 switch( e.Status ) 83 switch( e.Status )
84 { 84 {
85 case WebExceptionStatus.Timeout: 85 case WebExceptionStatus.Timeout:
86 //TODO: Send him to nearby or default region instead 86 //TODO: Send him to nearby or default region instead
87 break; 87 break;
88 88
89 default: 89 default:
90 throw; 90 throw;
91 } 91 }
92 } 92 }
93 } 93 }
94 } 94 }
95} 95}
96 96