aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-02-04 23:08:27 +0000
committerJustin Clark-Casey (justincc)2011-02-04 23:08:27 +0000
commita51005aacd00d58687787342b6c693241018a814 (patch)
tree42e3a2e7c3d56142e69e1f9339ee51fb05ccf6f6 /OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
parentPut something in the ImprovedInstantMessage.BinaryBucket for llInstantMessage... (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-a51005aacd00d58687787342b6c693241018a814.zip
opensim-SC_OLD-a51005aacd00d58687787342b6c693241018a814.tar.gz
opensim-SC_OLD-a51005aacd00d58687787342b6c693241018a814.tar.bz2
opensim-SC_OLD-a51005aacd00d58687787342b6c693241018a814.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs23
1 files changed, 12 insertions, 11 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
index dd8fe2b..93fdae3 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
@@ -87,16 +87,17 @@ namespace OpenSim.Region.OptionalModules.Simian
87 if (String.IsNullOrEmpty(m_serverUrl)) 87 if (String.IsNullOrEmpty(m_serverUrl))
88 return; 88 return;
89 89
90 m_refreshtime = Convert.ToInt32(config.GetString("RefreshTime")); 90 int refreshseconds = Convert.ToInt32(config.GetString("RefreshTime"));
91 if (m_refreshtime <= 0) 91 if (refreshseconds <= 0)
92 return; 92 return;
93 93
94 m_refreshtime = refreshseconds * 1000; // convert from seconds to ms
94 m_log.InfoFormat("[SIMIAN MAPTILE] enabled with refresh timeout {0} and URL {1}", 95 m_log.InfoFormat("[SIMIAN MAPTILE] enabled with refresh timeout {0} and URL {1}",
95 m_refreshtime,m_serverUrl); 96 m_refreshtime,m_serverUrl);
96 97
97 m_enabled = true; 98 m_enabled = true;
98 } 99 }
99 100
100 ///<summary> 101 ///<summary>
101 /// 102 ///
102 ///</summary> 103 ///</summary>
@@ -106,7 +107,7 @@ namespace OpenSim.Region.OptionalModules.Simian
106 { 107 {
107 m_refreshTimer.Enabled = true; 108 m_refreshTimer.Enabled = true;
108 m_refreshTimer.AutoReset = true; 109 m_refreshTimer.AutoReset = true;
109 m_refreshTimer.Interval = 5 * 60 * 1000; // every 5 minutes 110 m_refreshTimer.Interval = 5 * 60 * 1000; // every 5 minutes
110 m_refreshTimer.Elapsed += new ElapsedEventHandler(HandleMaptileRefresh); 111 m_refreshTimer.Elapsed += new ElapsedEventHandler(HandleMaptileRefresh);
111 } 112 }
112 } 113 }
@@ -120,12 +121,12 @@ namespace OpenSim.Region.OptionalModules.Simian
120 if (! m_enabled) 121 if (! m_enabled)
121 return; 122 return;
122 123
123 // Every shared region module has to maintain an indepedent list of 124 // Every shared region module has to maintain an indepedent list of
124 // currently running regions 125 // currently running regions
125 lock (m_scenes) 126 lock (m_scenes)
126 m_scenes[scene.RegionInfo.RegionID] = scene; 127 m_scenes[scene.RegionInfo.RegionID] = scene;
127 } 128 }
128 129
129 ///<summary> 130 ///<summary>
130 /// 131 ///
131 ///</summary> 132 ///</summary>
@@ -150,7 +151,7 @@ namespace OpenSim.Region.OptionalModules.Simian
150 // loaded and initialized 151 // loaded and initialized
151 if (m_lastrefresh > 0 && Util.EnvironmentTickCountSubtract(m_lastrefresh) < m_refreshtime) 152 if (m_lastrefresh > 0 && Util.EnvironmentTickCountSubtract(m_lastrefresh) < m_refreshtime)
152 return; 153 return;
153 154
154 m_log.DebugFormat("[SIMIAN MAPTILE] map refresh fired"); 155 m_log.DebugFormat("[SIMIAN MAPTILE] map refresh fired");
155 lock (m_scenes) 156 lock (m_scenes)
156 { 157 {
@@ -169,7 +170,7 @@ namespace OpenSim.Region.OptionalModules.Simian
169 170
170 m_lastrefresh = Util.EnvironmentTickCount(); 171 m_lastrefresh = Util.EnvironmentTickCount();
171 } 172 }
172 173
173 ///<summary> 174 ///<summary>
174 /// 175 ///
175 ///</summary> 176 ///</summary>
@@ -211,7 +212,7 @@ namespace OpenSim.Region.OptionalModules.Simian
211 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl); 212 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl);
212 request.Timeout = 20000; 213 request.Timeout = 20000;
213 request.ReadWriteTimeout = 5000; 214 request.ReadWriteTimeout = 5000;
214 215
215 using (HttpWebResponse response = MultipartForm.Post(request, postParameters)) 216 using (HttpWebResponse response = MultipartForm.Post(request, postParameters))
216 { 217 {
217 using (Stream responseStream = response.GetResponseStream()) 218 using (Stream responseStream = response.GetResponseStream())