aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs120
1 files changed, 0 insertions, 120 deletions
diff --git a/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs b/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
deleted file mode 100644
index 407ebe0..0000000
--- a/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs
+++ /dev/null
@@ -1,120 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenSim.Framework.Interfaces;
32
33namespace OpenSim
34{
35
36 public class NetworkServersInfo
37 {
38 public string AssetURL = "http://127.0.0.1:8003/";
39 public string AssetSendKey = "";
40
41 public string GridURL = "";
42 public string GridSendKey = "";
43 public string GridRecvKey = "";
44 public string UserURL = "";
45 public string UserSendKey = "";
46 public string UserRecvKey = "";
47 public bool isSandbox;
48
49 public void InitConfig(bool sandboxMode, IGenericConfig configData)
50 {
51 this.isSandbox = sandboxMode;
52
53 try
54 {
55 if (!isSandbox)
56 {
57 string attri = "";
58 //Grid Server URL
59 attri = "";
60 attri = configData.GetAttribute("GridServerURL");
61 if (attri == "")
62 {
63 this.GridURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/");
64 configData.SetAttribute("GridServerURL", this.GridURL);
65 }
66 else
67 {
68 this.GridURL = attri;
69 }
70
71 //Grid Send Key
72 attri = "";
73 attri = configData.GetAttribute("GridSendKey");
74 if (attri == "")
75 {
76 this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server", "null");
77 configData.SetAttribute("GridSendKey", this.GridSendKey);
78 }
79 else
80 {
81 this.GridSendKey = attri;
82 }
83
84 //Grid Receive Key
85 attri = "";
86 attri = configData.GetAttribute("GridRecvKey");
87 if (attri == "")
88 {
89 this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server", "null");
90 configData.SetAttribute("GridRecvKey", this.GridRecvKey);
91 }
92 else
93 {
94 this.GridRecvKey = attri;
95 }
96
97 attri = "";
98 attri = configData.GetAttribute("AssetServerURL");
99 if (attri == "")
100 {
101 this.AssetURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/");
102 configData.SetAttribute("AssetServerURL", this.GridURL);
103 }
104 else
105 {
106 this.AssetURL = attri;
107 }
108
109 }
110 configData.Commit();
111 }
112 catch (Exception e)
113 {
114 OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
115 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
116 }
117 }
118 }
119
120}