diff options
author | Johan Berntsson | 2008-03-11 04:40:39 +0000 |
---|---|---|
committer | Johan Berntsson | 2008-03-11 04:40:39 +0000 |
commit | f0bfb879798e87296e13063203d5b18a1aa1097f (patch) | |
tree | 675b3442cf477d8ed242cb23c97bd610e98d0492 /ThirdParty/3Di/RegionMonitor | |
parent | The plugin loader can now handle plugin dependencies without hardcoding (diff) | |
download | opensim-SC_OLD-f0bfb879798e87296e13063203d5b18a1aa1097f.zip opensim-SC_OLD-f0bfb879798e87296e13063203d5b18a1aa1097f.tar.gz opensim-SC_OLD-f0bfb879798e87296e13063203d5b18a1aa1097f.tar.bz2 opensim-SC_OLD-f0bfb879798e87296e13063203d5b18a1aa1097f.tar.xz |
Eliminated several compiler warning messages
Diffstat (limited to 'ThirdParty/3Di/RegionMonitor')
-rw-r--r-- | ThirdParty/3Di/RegionMonitor/ServerPlugin/RegionMonitorPlugin.cs | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/ThirdParty/3Di/RegionMonitor/ServerPlugin/RegionMonitorPlugin.cs b/ThirdParty/3Di/RegionMonitor/ServerPlugin/RegionMonitorPlugin.cs deleted file mode 100644 index 3ea19a0..0000000 --- a/ThirdParty/3Di/RegionMonitor/ServerPlugin/RegionMonitorPlugin.cs +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
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 | using System; | ||
29 | using System.Runtime.Remoting; | ||
30 | using System.Threading; | ||
31 | using Mono.Addins; | ||
32 | using OpenSim; | ||
33 | using OpenSim.Framework.Console; | ||
34 | using MonitorLib; | ||
35 | |||
36 | [assembly:Addin] | ||
37 | [assembly:AddinDependency ("OpenSim", "0.5")] | ||
38 | |||
39 | namespace OpenSim.ApplicationPlugins.RegionMonitor | ||
40 | { | ||
41 | [Extension("/OpenSim/Startup")] | ||
42 | public class RegionMonitorPlugin : MonitorLibBase, IApplicationPlugin | ||
43 | { | ||
44 | protected Thread m_mointorThread; | ||
45 | protected static OpenSimMain m_openSimMain; | ||
46 | |||
47 | public void Initialise(OpenSimMain opensim) | ||
48 | { | ||
49 | m_openSimMain = opensim; | ||
50 | Start(); | ||
51 | MainLog.Instance.Verbose("Monitor", "Region monitor is runing ..."); | ||
52 | } | ||
53 | |||
54 | public void Close() | ||
55 | { | ||
56 | } | ||
57 | |||
58 | public void Start() | ||
59 | { | ||
60 | // start monitor thread (remoting module) | ||
61 | m_mointorThread = new Thread(new ThreadStart(StartMonitor)); | ||
62 | m_mointorThread.IsBackground = true; | ||
63 | m_mointorThread.Start(); | ||
64 | } | ||
65 | |||
66 | private void StartMonitor() | ||
67 | { | ||
68 | try | ||
69 | { | ||
70 | Object lockObj = new Object(); | ||
71 | |||
72 | RemotingConfiguration.Configure("monitorS.config", false); | ||
73 | |||
74 | lock (lockObj) | ||
75 | { | ||
76 | System.Threading.Monitor.Wait(lockObj); | ||
77 | } | ||
78 | } | ||
79 | catch (Exception e) | ||
80 | { | ||
81 | MainLog.Instance.Warn("MONITOR", "Error - " + e.Message); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | public override bool FetchInfo(out string outstr) | ||
86 | { | ||
87 | MainLog.Instance.Verbose("MONITOR", "Fetch Information from Region server"); | ||
88 | bool status = true; | ||
89 | string startTime = ""; | ||
90 | string upTime = ""; | ||
91 | int userNumber = 0; | ||
92 | int regionNumber = 0; | ||
93 | m_openSimMain.GetRunTime(out startTime, out upTime); | ||
94 | m_openSimMain.GetAvatarNumber(out userNumber); | ||
95 | m_openSimMain.GetRegionNumber(out regionNumber); | ||
96 | outstr = startTime | ||
97 | + "," + upTime | ||
98 | + "," + regionNumber | ||
99 | + "," + userNumber; | ||
100 | return status; | ||
101 | } | ||
102 | |||
103 | |||
104 | public override bool MoveRegion() | ||
105 | { | ||
106 | MainLog.Instance.Verbose("MONITOR", "Move Region"); | ||
107 | bool status = true; | ||
108 | |||
109 | return status; | ||
110 | } | ||
111 | |||
112 | public override bool SplitRegion() | ||
113 | { | ||
114 | MainLog.Instance.Verbose("MONITOR", "Split Region"); | ||
115 | bool status = true; | ||
116 | |||
117 | return status; | ||
118 | } | ||
119 | |||
120 | public override bool MergeScenes() | ||
121 | { | ||
122 | MainLog.Instance.Verbose("MONITOR", "Merge Scenes"); | ||
123 | bool status = true; | ||
124 | |||
125 | return status; | ||
126 | } | ||
127 | |||
128 | } | ||
129 | } | ||