diff options
author | Jeff Ames | 2007-12-06 18:17:44 +0000 |
---|---|---|
committer | Jeff Ames | 2007-12-06 18:17:44 +0000 |
commit | 73599c0f25f67b6a2de61a36849bb8ce0b7b5279 (patch) | |
tree | 6e653c7a057655b25b760cc6fa0ad07444718dd4 | |
parent | more minor cleanup. added some command descriptions to region server help. (diff) | |
download | opensim-SC-73599c0f25f67b6a2de61a36849bb8ce0b7b5279.zip opensim-SC-73599c0f25f67b6a2de61a36849bb8ce0b7b5279.tar.gz opensim-SC-73599c0f25f67b6a2de61a36849bb8ce0b7b5279.tar.bz2 opensim-SC-73599c0f25f67b6a2de61a36849bb8ce0b7b5279.tar.xz |
removed obsolete Verbose() function
-rw-r--r-- | OpenSim/Framework/Console/LogBase.cs | 15 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer.Config/DbGridConfig.cs | 135 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer.Config/DbUserConfig.cs | 164 | ||||
-rw-r--r-- | OpenSim/Region/Application/IApplicationPlugin.cs | 31 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 27 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/ExtensionsScriptModule/Script.cs | 2 |
11 files changed, 215 insertions, 194 deletions
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs index c226fcb..045970e 100644 --- a/OpenSim/Framework/Console/LogBase.cs +++ b/OpenSim/Framework/Console/LogBase.cs | |||
@@ -164,21 +164,6 @@ namespace OpenSim.Framework.Console | |||
164 | } | 164 | } |
165 | 165 | ||
166 | /// <summary> | 166 | /// <summary> |
167 | /// Sends a informational message to the current log output | ||
168 | /// </summary> | ||
169 | /// <param name="format">The message to send</param> | ||
170 | /// <param name="args">WriteLine-style message arguments</param> | ||
171 | [Obsolete("Please tag your console messages with the location your calling from")] | ||
172 | public void Verbose(string format, params object[] args) | ||
173 | { | ||
174 | if (m_verbose) | ||
175 | { | ||
176 | WriteNewLine(ConsoleColor.Gray, format, args); | ||
177 | return; | ||
178 | } | ||
179 | } | ||
180 | |||
181 | /// <summary> | ||
182 | /// Sends an informational message to the current log output | 167 | /// Sends an informational message to the current log output |
183 | /// </summary> | 168 | /// </summary> |
184 | /// <param name="sender">The module that sent this message</param> | 169 | /// <param name="sender">The module that sent this message</param> |
diff --git a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs index 050df83..c04132a 100644 --- a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs +++ b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs | |||
@@ -36,126 +36,135 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
36 | /// <summary> | 36 | /// <summary> |
37 | /// A grid configuration interface for returning the DB4o Config Provider | 37 | /// A grid configuration interface for returning the DB4o Config Provider |
38 | /// </summary> | 38 | /// </summary> |
39 | public class Db40ConfigPlugin: IGridConfig | 39 | public class Db40ConfigPlugin: IGridConfig |
40 | { | 40 | { |
41 | /// <summary> | 41 | /// <summary> |
42 | /// Loads and returns a configuration objeect | 42 | /// Loads and returns a configuration objeect |
43 | /// </summary> | 43 | /// </summary> |
44 | /// <returns>A grid configuration object</returns> | 44 | /// <returns>A grid configuration object</returns> |
45 | public GridConfig GetConfigObject() | 45 | public GridConfig GetConfigObject() |
46 | { | 46 | { |
47 | MainLog.Instance.Verbose("Loading Db40Config dll"); | 47 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Loading Db40Config dll"); |
48 | return ( new DbGridConfig()); | 48 | return new DbGridConfig(); |
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// A DB4o based Gridserver configuration object | 53 | /// A DB4o based Gridserver configuration object |
54 | /// </summary> | 54 | /// </summary> |
55 | public class DbGridConfig : GridConfig | 55 | public class DbGridConfig : GridConfig |
56 | { | 56 | { |
57 | /// <summary> | 57 | /// <summary> |
58 | /// The DB4o Database | 58 | /// The DB4o Database |
59 | /// </summary> | 59 | /// </summary> |
60 | private IObjectContainer db; | 60 | private IObjectContainer db; |
61 | 61 | ||
62 | /// <summary> | 62 | /// <summary> |
63 | /// User configuration for the Grid Config interfaces | 63 | /// User configuration for the Grid Config interfaces |
64 | /// </summary> | 64 | /// </summary> |
65 | public void LoadDefaults() { | 65 | public void LoadDefaults() |
66 | MainLog.Instance.Notice("DbGridConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | 66 | { |
67 | MainLog.Instance.Notice("DbGridConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | ||
67 | 68 | ||
68 | // About the grid options | 69 | // About the grid options |
69 | this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); | 70 | this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); |
70 | 71 | ||
71 | // Asset Options | 72 | // Asset Options |
72 | this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"); | 73 | this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"); |
73 | this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null"); | 74 | this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null"); |
74 | this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); | 75 | this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); |
75 | 76 | ||
76 | // User Server Options | 77 | // User Server Options |
77 | this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/"); | 78 | this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/"); |
78 | this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null"); | 79 | this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null"); |
79 | this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null"); | 80 | this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null"); |
80 | 81 | ||
81 | // Region Server Options | 82 | // Region Server Options |
82 | this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null"); | 83 | this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null"); |
83 | this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null"); | 84 | this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null"); |
84 | } | 85 | } |
85 | 86 | ||
86 | /// <summary> | 87 | /// <summary> |
87 | /// Initialises a new configuration object | 88 | /// Initialises a new configuration object |
88 | /// </summary> | 89 | /// </summary> |
89 | public override void InitConfig() { | 90 | public override void InitConfig() |
90 | try { | 91 | { |
92 | try | ||
93 | { | ||
91 | // Perform Db4o initialisation | 94 | // Perform Db4o initialisation |
92 | db = Db4oFactory.OpenFile("opengrid.yap"); | 95 | db = Db4oFactory.OpenFile("opengrid.yap"); |
93 | 96 | ||
94 | // Locate the grid configuration object | 97 | // Locate the grid configuration object |
95 | IObjectSet result = db.Get(typeof(DbGridConfig)); | 98 | IObjectSet result = db.Get(typeof(DbGridConfig)); |
96 | // Found? | 99 | // Found? |
97 | if(result.Count==1) { | 100 | if (result.Count==1) |
98 | MainLog.Instance.Verbose("DbGridConfig.cs:InitConfig() - Found a GridConfig object in the local database, loading"); | 101 | { |
99 | foreach (DbGridConfig cfg in result) { | 102 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Found a GridConfig object in the local database, loading"); |
103 | foreach (DbGridConfig cfg in result) | ||
104 | { | ||
100 | // Import each setting into this class | 105 | // Import each setting into this class |
101 | // Grid Settings | 106 | // Grid Settings |
102 | this.GridOwner=cfg.GridOwner; | 107 | this.GridOwner=cfg.GridOwner; |
103 | // Asset Settings | 108 | // Asset Settings |
104 | this.DefaultAssetServer=cfg.DefaultAssetServer; | 109 | this.DefaultAssetServer=cfg.DefaultAssetServer; |
105 | this.AssetSendKey=cfg.AssetSendKey; | 110 | this.AssetSendKey=cfg.AssetSendKey; |
106 | this.AssetRecvKey=cfg.AssetRecvKey; | 111 | this.AssetRecvKey=cfg.AssetRecvKey; |
107 | // User Settings | 112 | // User Settings |
108 | this.DefaultUserServer=cfg.DefaultUserServer; | 113 | this.DefaultUserServer=cfg.DefaultUserServer; |
109 | this.UserSendKey=cfg.UserSendKey; | 114 | this.UserSendKey=cfg.UserSendKey; |
110 | this.UserRecvKey=cfg.UserRecvKey; | 115 | this.UserRecvKey=cfg.UserRecvKey; |
111 | // Region Settings | 116 | // Region Settings |
112 | this.SimSendKey=cfg.SimSendKey; | 117 | this.SimSendKey=cfg.SimSendKey; |
113 | this.SimRecvKey=cfg.SimRecvKey; | 118 | this.SimRecvKey=cfg.SimRecvKey; |
114 | } | 119 | } |
115 | // Create a new configuration object from this class | 120 | // Create a new configuration object from this class |
116 | } else { | 121 | } |
117 | MainLog.Instance.Verbose("DbGridConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); | 122 | else |
123 | { | ||
124 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Could not find object in database, loading precompiled defaults"); | ||
118 | 125 | ||
119 | // Load default settings into this class | 126 | // Load default settings into this class |
120 | LoadDefaults(); | 127 | LoadDefaults(); |
121 | 128 | ||
122 | // Saves to the database file... | 129 | // Saves to the database file... |
123 | MainLog.Instance.Verbose( "Writing out default settings to local database"); | 130 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Writing out default settings to local database"); |
124 | db.Set(this); | 131 | db.Set(this); |
125 | 132 | ||
126 | // Closes file locks | 133 | // Closes file locks |
127 | db.Close(); | 134 | db.Close(); |
128 | } | 135 | } |
129 | } catch(Exception e) { | 136 | } |
130 | MainLog.Instance.Warn("DbGridConfig.cs:InitConfig() - Exception occured"); | 137 | catch(Exception e) |
138 | { | ||
139 | MainLog.Instance.Warn("DbGridConfig.cs:InitConfig() - Exception occured"); | ||
131 | MainLog.Instance.Warn(e.ToString()); | 140 | MainLog.Instance.Warn(e.ToString()); |
132 | } | 141 | } |
133 | 142 | ||
134 | // Grid Settings | 143 | // Grid Settings |
135 | MainLog.Instance.Verbose("Grid settings loaded:"); | 144 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Grid settings loaded:"); |
136 | MainLog.Instance.Verbose("Grid owner: " + this.GridOwner); | 145 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Grid owner: " + this.GridOwner); |
137 | 146 | ||
138 | // Asset Settings | 147 | // Asset Settings |
139 | MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer); | 148 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Default asset server: " + this.DefaultAssetServer); |
140 | MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey); | 149 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to asset server: " + this.AssetSendKey); |
141 | MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey); | 150 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from asset server: " + this.AssetRecvKey); |
142 | 151 | ||
143 | // User Settings | 152 | // User Settings |
144 | MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer); | 153 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Default user server: " + this.DefaultUserServer); |
145 | MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey); | 154 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to user server: " + this.UserSendKey); |
146 | MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey); | 155 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from user server: " + this.UserRecvKey); |
147 | 156 | ||
148 | // Region Settings | 157 | // Region Settings |
149 | MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey); | 158 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to sims: " + this.SimSendKey); |
150 | MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey); | 159 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from sims: " + this.SimRecvKey); |
151 | } | 160 | } |
152 | 161 | ||
153 | /// <summary> | 162 | /// <summary> |
154 | /// Closes down the database and releases filesystem locks | 163 | /// Closes down the database and releases filesystem locks |
155 | /// </summary> | 164 | /// </summary> |
156 | public void Shutdown() { | 165 | public void Shutdown() |
157 | db.Close(); | 166 | { |
158 | } | 167 | db.Close(); |
159 | } | 168 | } |
160 | 169 | } | |
161 | } | 170 | } |
diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs index 1f93779..748973d 100644 --- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs +++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs | |||
@@ -1,30 +1,30 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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 | */ |
28 | using System; | 28 | using System; |
29 | using Db4objects.Db4o; | 29 | using Db4objects.Db4o; |
30 | using OpenSim.Framework.Configuration; | 30 | using OpenSim.Framework.Configuration; |
@@ -33,64 +33,72 @@ using OpenSim.Framework.Interfaces; | |||
33 | 33 | ||
34 | namespace OpenUser.Config.UserConfigDb4o | 34 | namespace OpenUser.Config.UserConfigDb4o |
35 | { | 35 | { |
36 | public class Db4oConfigPlugin: IUserConfig | 36 | public class Db4oConfigPlugin: IUserConfig |
37 | { | 37 | { |
38 | public UserConfig GetConfigObject() | 38 | public UserConfig GetConfigObject() |
39 | { | 39 | { |
40 | MainLog.Instance.Verbose("Loading Db40Config dll"); | 40 | MainLog.Instance.Verbose("DBUSERCONFIG", "Loading Db40Config dll"); |
41 | return ( new DbUserConfig()); | 41 | return ( new DbUserConfig()); |
42 | } | 42 | } |
43 | } | 43 | } |
44 | 44 | ||
45 | public class DbUserConfig : UserConfig | 45 | public class DbUserConfig : UserConfig |
46 | { | 46 | { |
47 | private IObjectContainer db; | 47 | private IObjectContainer db; |
48 | 48 | ||
49 | public void LoadDefaults() { | 49 | public void LoadDefaults() |
50 | MainLog.Instance.Notice("DbUserConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | 50 | { |
51 | MainLog.Instance.Notice("DbUserConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | ||
51 | 52 | ||
52 | this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); | 53 | this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); |
53 | 54 | ||
54 | this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/"); | 55 | this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/"); |
55 | this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); | 56 | this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); |
56 | this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); | 57 | this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); |
57 | } | 58 | } |
58 | 59 | ||
59 | public override void InitConfig() { | 60 | public override void InitConfig() |
60 | try { | 61 | { |
61 | db = Db4oFactory.OpenFile("openuser.yap"); | 62 | try |
62 | IObjectSet result = db.Get(typeof(DbUserConfig)); | 63 | { |
63 | if(result.Count==1) { | 64 | db = Db4oFactory.OpenFile("openuser.yap"); |
64 | MainLog.Instance.Verbose("DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading"); | 65 | IObjectSet result = db.Get(typeof(DbUserConfig)); |
65 | foreach (DbUserConfig cfg in result) { | 66 | if(result.Count==1) |
66 | this.GridServerURL=cfg.GridServerURL; | 67 | { |
67 | this.GridSendKey=cfg.GridSendKey; | 68 | MainLog.Instance.Verbose("DBUSERCONFIG", "DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading"); |
68 | this.GridRecvKey=cfg.GridRecvKey; | 69 | foreach (DbUserConfig cfg in result) |
69 | this.DefaultStartupMsg=cfg.DefaultStartupMsg; | 70 | { |
70 | } | 71 | this.GridServerURL=cfg.GridServerURL; |
71 | } else { | 72 | this.GridSendKey=cfg.GridSendKey; |
72 | MainLog.Instance.Verbose("DbUserConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); | 73 | this.GridRecvKey=cfg.GridRecvKey; |
73 | LoadDefaults(); | 74 | this.DefaultStartupMsg=cfg.DefaultStartupMsg; |
74 | MainLog.Instance.Verbose("Writing out default settings to local database"); | 75 | } |
75 | db.Set(this); | 76 | } |
76 | db.Close(); | 77 | else |
77 | } | 78 | { |
78 | } catch(Exception e) { | 79 | MainLog.Instance.Verbose("DBUSERCONFIG", "DbUserConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); |
79 | MainLog.Instance.Warn("DbUserConfig.cs:InitConfig() - Exception occured"); | 80 | LoadDefaults(); |
81 | MainLog.Instance.Verbose("DBUSERCONFIG", "Writing out default settings to local database"); | ||
82 | db.Set(this); | ||
83 | db.Close(); | ||
84 | } | ||
85 | } | ||
86 | catch(Exception e) | ||
87 | { | ||
88 | MainLog.Instance.Warn("DbUserConfig.cs:InitConfig() - Exception occured"); | ||
80 | MainLog.Instance.Warn(e.ToString()); | 89 | MainLog.Instance.Warn(e.ToString()); |
81 | } | 90 | } |
82 | 91 | ||
83 | MainLog.Instance.Verbose("User settings loaded:"); | 92 | MainLog.Instance.Verbose("DBUSERCONFIG", "User settings loaded:"); |
84 | MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg); | 93 | MainLog.Instance.Verbose("DBUSERCONFIG", "Default startup message: " + this.DefaultStartupMsg); |
85 | MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL); | 94 | MainLog.Instance.Verbose("DBUSERCONFIG", "Grid server URL: " + this.GridServerURL); |
86 | MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey); | 95 | MainLog.Instance.Verbose("DBUSERCONFIG", "Key to send to grid: " + this.GridSendKey); |
87 | MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey); | 96 | MainLog.Instance.Verbose("DBUSERCONFIG", "Key to expect from grid: " + this.GridRecvKey); |
88 | } | 97 | } |
89 | |||
90 | |||
91 | public void Shutdown() { | ||
92 | db.Close(); | ||
93 | } | ||
94 | } | ||
95 | 98 | ||
99 | public void Shutdown() | ||
100 | { | ||
101 | db.Close(); | ||
102 | } | ||
103 | } | ||
96 | } | 104 | } |
diff --git a/OpenSim/Region/Application/IApplicationPlugin.cs b/OpenSim/Region/Application/IApplicationPlugin.cs index adbc625..0e66330 100644 --- a/OpenSim/Region/Application/IApplicationPlugin.cs +++ b/OpenSim/Region/Application/IApplicationPlugin.cs | |||
@@ -1,4 +1,32 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the 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 | */ | ||
28 | |||
29 | using System; | ||
2 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
3 | using System.Text; | 31 | using System.Text; |
4 | using Mono.Addins; | 32 | using Mono.Addins; |
@@ -14,4 +42,3 @@ namespace OpenSim | |||
14 | void Close(); | 42 | void Close(); |
15 | } | 43 | } |
16 | } | 44 | } |
17 | |||
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index d6dc3ea..64fe8df 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -449,7 +449,7 @@ namespace OpenSim | |||
449 | 449 | ||
450 | public void handleRestartRegion(RegionInfo whichRegion) | 450 | public void handleRestartRegion(RegionInfo whichRegion) |
451 | { | 451 | { |
452 | MainLog.Instance.Error("MAIN", "Got Restart Singlal from SceneManager"); | 452 | MainLog.Instance.Error("MAIN", "Got restart signal from SceneManager"); |
453 | // Shutting down the UDP server | 453 | // Shutting down the UDP server |
454 | bool foundUDPServer = false; | 454 | bool foundUDPServer = false; |
455 | int UDPServerElement = 0; | 455 | int UDPServerElement = 0; |
@@ -543,7 +543,7 @@ namespace OpenSim | |||
543 | m_log.Verbose("SHUTDOWN", "Closing all threads"); | 543 | m_log.Verbose("SHUTDOWN", "Closing all threads"); |
544 | m_log.Verbose("SHUTDOWN", "Killing listener thread"); | 544 | m_log.Verbose("SHUTDOWN", "Killing listener thread"); |
545 | m_log.Verbose("SHUTDOWN", "Killing clients"); | 545 | m_log.Verbose("SHUTDOWN", "Killing clients"); |
546 | // IMPLEMENT THIS | 546 | // TODO: implement this |
547 | m_log.Verbose("SHUTDOWN", "Closing console and terminating"); | 547 | m_log.Verbose("SHUTDOWN", "Closing console and terminating"); |
548 | 548 | ||
549 | m_sceneManager.Close(); | 549 | m_sceneManager.Close(); |
@@ -789,10 +789,7 @@ namespace OpenSim | |||
789 | { | 789 | { |
790 | string regionName = CombineParams(cmdparams, 0); | 790 | string regionName = CombineParams(cmdparams, 0); |
791 | 791 | ||
792 | if (m_sceneManager.TrySetCurrentScene(regionName)) | 792 | if (!m_sceneManager.TrySetCurrentScene(regionName)) |
793 | { | ||
794 | } | ||
795 | else | ||
796 | { | 793 | { |
797 | MainLog.Instance.Error("Couldn't set current region to: " + regionName); | 794 | MainLog.Instance.Error("Couldn't set current region to: " + regionName); |
798 | } | 795 | } |
@@ -812,16 +809,14 @@ namespace OpenSim | |||
812 | break; | 809 | break; |
813 | 810 | ||
814 | case "export-map": | 811 | case "export-map": |
815 | 812 | if (cmdparams.Length > 0) | |
816 | if (cmdparams.Length > 0) | 813 | { |
817 | { | 814 | m_sceneManager.CurrentOrFirstScene.ExportWorldMap(cmdparams[0]); |
818 | m_sceneManager.CurrentOrFirstScene.ExportWorldMap(cmdparams[0]); | 815 | } |
819 | } | 816 | else |
820 | else | 817 | { |
821 | { | 818 | m_sceneManager.CurrentOrFirstScene.ExportWorldMap("exportmap.jpg"); |
822 | m_sceneManager.CurrentOrFirstScene.ExportWorldMap("exportmap.jpg"); | 819 | } |
823 | } | ||
824 | |||
825 | break; | 820 | break; |
826 | 821 | ||
827 | default: | 822 | default: |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 415b04e..fb1623b 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -2546,7 +2546,7 @@ namespace OpenSim.Region.ClientStack | |||
2546 | return; | 2546 | return; |
2547 | } | 2547 | } |
2548 | 2548 | ||
2549 | //MainLog.Instance.Verbose("Sending PacketAck"); | 2549 | //MainLog.Instance.Verbose("NETWORK", "Sending PacketAck"); |
2550 | 2550 | ||
2551 | int i = 0; | 2551 | int i = 0; |
2552 | PacketAckPacket acks = new PacketAckPacket(); | 2552 | PacketAckPacket acks = new PacketAckPacket(); |
@@ -2701,7 +2701,6 @@ namespace OpenSim.Region.ClientStack | |||
2701 | } | 2701 | } |
2702 | break; | 2702 | break; |
2703 | case PacketType.AgentSetAppearance: | 2703 | case PacketType.AgentSetAppearance: |
2704 | //MainLog.Instance.Verbose("set appear", Pack.ToString()); | ||
2705 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket) Pack; | 2704 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket) Pack; |
2706 | if (OnSetAppearance != null) | 2705 | if (OnSetAppearance != null) |
2707 | { | 2706 | { |
@@ -2785,7 +2784,6 @@ namespace OpenSim.Region.ClientStack | |||
2785 | #region Objects/m_sceneObjects | 2784 | #region Objects/m_sceneObjects |
2786 | 2785 | ||
2787 | case PacketType.ObjectLink: | 2786 | case PacketType.ObjectLink: |
2788 | //MainLog.Instance.Verbose(Pack.ToString()); | ||
2789 | ObjectLinkPacket link = (ObjectLinkPacket) Pack; | 2787 | ObjectLinkPacket link = (ObjectLinkPacket) Pack; |
2790 | uint parentprimid = 0; | 2788 | uint parentprimid = 0; |
2791 | List<uint> childrenprims = new List<uint>(); | 2789 | List<uint> childrenprims = new List<uint>(); |
@@ -2804,7 +2802,6 @@ namespace OpenSim.Region.ClientStack | |||
2804 | } | 2802 | } |
2805 | break; | 2803 | break; |
2806 | case PacketType.ObjectDelink: | 2804 | case PacketType.ObjectDelink: |
2807 | //MainLog.Instance.Verbose(Pack.ToString()); | ||
2808 | ObjectDelinkPacket delink = (ObjectDelinkPacket) Pack; | 2805 | ObjectDelinkPacket delink = (ObjectDelinkPacket) Pack; |
2809 | 2806 | ||
2810 | // It appears the prim at index 0 is not always the root prim (for | 2807 | // It appears the prim at index 0 is not always the root prim (for |
@@ -3677,8 +3674,7 @@ namespace OpenSim.Region.ClientStack | |||
3677 | MainLog.Instance.Debug("CLIENT", "possibly unhandled StartPingCheck packet"); | 3674 | MainLog.Instance.Debug("CLIENT", "possibly unhandled StartPingCheck packet"); |
3678 | break; | 3675 | break; |
3679 | case PacketType.CompletePingCheck: | 3676 | case PacketType.CompletePingCheck: |
3680 | // Parhaps this should be processed on the Sim to determine whether or not to drop a dead client | 3677 | // TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client |
3681 | // Dumping it to the verbose console until it's handled properly. | ||
3682 | MainLog.Instance.Warn("CLIENT", "unhandled CompletePingCheck packet"); | 3678 | MainLog.Instance.Warn("CLIENT", "unhandled CompletePingCheck packet"); |
3683 | break; | 3679 | break; |
3684 | case PacketType.ObjectScale: | 3680 | case PacketType.ObjectScale: |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 4c168b3..04bdf5a 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -37,16 +37,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
37 | 37 | ||
38 | public InnerScene(Scene parent, RegionInfo regInfo, PermissionManager permissionsMngr) | 38 | public InnerScene(Scene parent, RegionInfo regInfo, PermissionManager permissionsMngr) |
39 | { | 39 | { |
40 | |||
41 | m_parentScene = parent; | 40 | m_parentScene = parent; |
42 | m_regInfo = regInfo; | 41 | m_regInfo = regInfo; |
43 | PermissionsMngr = permissionsMngr; | 42 | PermissionsMngr = permissionsMngr; |
44 | QuadTree = new BasicQuadTreeNode(null, "/0/", 0, 0, 256, 256); | 43 | QuadTree = new BasicQuadTreeNode(null, "/0/", 0, 0, 256, 256); |
45 | QuadTree.Subdivide(); | 44 | QuadTree.Subdivide(); |
46 | QuadTree.Subdivide(); | 45 | QuadTree.Subdivide(); |
47 | |||
48 | |||
49 | } | 46 | } |
47 | |||
50 | public PhysicsScene PhysicsScene | 48 | public PhysicsScene PhysicsScene |
51 | { | 49 | { |
52 | get | 50 | get |
@@ -372,7 +370,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
372 | 370 | ||
373 | #region Other Methods | 371 | #region Other Methods |
374 | 372 | ||
375 | |||
376 | public void physicsBasedCrash() | 373 | public void physicsBasedCrash() |
377 | { | 374 | { |
378 | if (UnRecoverableError != null) | 375 | if (UnRecoverableError != null) |
@@ -662,8 +659,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
662 | /// <param name="prims"></param> | 659 | /// <param name="prims"></param> |
663 | public void DelinkObjects(List<uint> primIds) | 660 | public void DelinkObjects(List<uint> primIds) |
664 | { | 661 | { |
665 | //MainLog.Instance.Verbose("DelinkObjects()"); | ||
666 | |||
667 | SceneObjectGroup parenPrim = null; | 662 | SceneObjectGroup parenPrim = null; |
668 | 663 | ||
669 | // Need a list of the SceneObjectGroup local ids | 664 | // Need a list of the SceneObjectGroup local ids |
@@ -744,17 +739,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
744 | } | 739 | } |
745 | 740 | ||
746 | } | 741 | } |
742 | |||
743 | /// <summary> | ||
744 | /// Calculates the distance between two Vector3s | ||
745 | /// </summary> | ||
746 | /// <param name="v1"></param> | ||
747 | /// <param name="v2"></param> | ||
748 | /// <returns></returns> | ||
747 | public float Vector3Distance(Vector3 v1, Vector3 v2) | 749 | public float Vector3Distance(Vector3 v1, Vector3 v2) |
748 | { | 750 | { |
749 | // Calculates the distance between two Vector3s | ||
750 | // We don't really need the double floating point precision... | 751 | // We don't really need the double floating point precision... |
751 | // so casting it to a single | 752 | // so casting it to a single |
752 | 753 | ||
753 | return (float)Math.Sqrt((v1.x - v2.x) * (v1.x - v2.x) + (v1.y - v2.y) * (v1.y - v2.y) + (v1.z - v2.z) * (v1.z - v2.z)); | 754 | return (float)Math.Sqrt((v1.x - v2.x) * (v1.x - v2.x) + (v1.y - v2.y) * (v1.y - v2.y) + (v1.z - v2.z) * (v1.z - v2.z)); |
754 | |||
755 | } | 755 | } |
756 | #endregion | 756 | #endregion |
757 | } | 757 | } |
758 | } | 758 | } |
759 | |||
760 | |||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index d8abe90..dbcd332 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -411,7 +411,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
411 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) | 411 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) |
412 | { | 412 | { |
413 | EntityBase selectedEnt = null; | 413 | EntityBase selectedEnt = null; |
414 | //MainLog.Instance.Verbose("LocalID:" + Data.ObjectLocalID.ToString()); | 414 | //MainLog.Instance.Verbose("CLIENT", "LocalID:" + Data.ObjectLocalID.ToString()); |
415 | foreach (EntityBase ent in Entities.Values) | 415 | foreach (EntityBase ent in Entities.Values) |
416 | { | 416 | { |
417 | if (ent.LocalId == Data.ObjectLocalID) | 417 | if (ent.LocalId == Data.ObjectLocalID) |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs index c1e4805..484b9f1 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
44 | 44 | ||
45 | public void LoadAnims() | 45 | public void LoadAnims() |
46 | { | 46 | { |
47 | //MainLog.Instance.Verbose("ScenePresence.Animations.cs:LoadAnims() - Loading avatar animations"); | 47 | //MainLog.Instance.Verbose("CLIENT", "Loading avatar animations"); |
48 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) | 48 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) |
49 | { | 49 | { |
50 | XmlDocument doc = new XmlDocument(); | 50 | XmlDocument doc = new XmlDocument(); |
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
58 | } | 58 | } |
59 | } | 59 | } |
60 | 60 | ||
61 | // MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); | 61 | // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); |
62 | 62 | ||
63 | foreach (KeyValuePair<string, LLUUID> kp in Animations.AnimsLLUUID) | 63 | foreach (KeyValuePair<string, LLUUID> kp in Animations.AnimsLLUUID) |
64 | { | 64 | { |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 2f00515..83d3306 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -711,6 +711,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
711 | SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); | 711 | SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); |
712 | if (part != null) | 712 | if (part != null) |
713 | { | 713 | { |
714 | // TODO: determine position to sit at based on scene geometry; don't trust offset from client | ||
715 | // see http://wiki.secondlife.com/wiki/User:Andrew_Linden/Office_Hours/2007_11_06 for details on how LL does it | ||
716 | |||
714 | pos = part.AbsolutePosition + offset; | 717 | pos = part.AbsolutePosition + offset; |
715 | 718 | ||
716 | if (m_physicsActor != null) | 719 | if (m_physicsActor != null) |
diff --git a/OpenSim/Region/ExtensionsScriptModule/Script.cs b/OpenSim/Region/ExtensionsScriptModule/Script.cs index 350ca2d..4493741 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Script.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Script.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
58 | 58 | ||
59 | private void events_OnFrame() | 59 | private void events_OnFrame() |
60 | { | 60 | { |
61 | //script.logger.Verbose("Hello World!"); | 61 | //script.logger.Verbose("TESTSCRIPT", "Hello World!"); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | } \ No newline at end of file | 64 | } \ No newline at end of file |