diff options
author | Melanie | 2012-03-29 15:38:12 +0200 |
---|---|---|
committer | Melanie | 2012-03-29 15:38:12 +0200 |
commit | b9d61d5413e7189ddc6f7a335f792abf870a92c8 (patch) | |
tree | d629cfbaf4ca3464ea8ccf03844697b11d8b24e9 /OpenSim/Region/CoreModules | |
parent | Allow llTeleportAgent to work in attachments (diff) | |
download | opensim-SC_OLD-b9d61d5413e7189ddc6f7a335f792abf870a92c8.zip opensim-SC_OLD-b9d61d5413e7189ddc6f7a335f792abf870a92c8.tar.gz opensim-SC_OLD-b9d61d5413e7189ddc6f7a335f792abf870a92c8.tar.bz2 opensim-SC_OLD-b9d61d5413e7189ddc6f7a335f792abf870a92c8.tar.xz |
Allow the map tile module to be enabled without also eabling refresh
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index 6d3ace9..3b862da 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -93,8 +93,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
93 | if (config == null) | 93 | if (config == null) |
94 | return; | 94 | return; |
95 | 95 | ||
96 | int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime")); | 96 | int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime", "-1")); |
97 | if (refreshminutes <= 0) | 97 | if (refreshminutes < 0) |
98 | { | 98 | { |
99 | m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: No refresh time given in config. Module disabled."); | 99 | m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: No refresh time given in config. Module disabled."); |
100 | return; | 100 | return; |
@@ -117,12 +117,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
117 | return; | 117 | return; |
118 | } | 118 | } |
119 | 119 | ||
120 | m_refreshTimer.Enabled = true; | 120 | if (m_refreshtime > 0) |
121 | m_refreshTimer.AutoReset = true; | 121 | { |
122 | m_refreshTimer.Interval = m_refreshtime; | 122 | m_refreshTimer.Enabled = true; |
123 | m_refreshTimer.Elapsed += new ElapsedEventHandler(HandleMaptileRefresh); | 123 | m_refreshTimer.AutoReset = true; |
124 | m_refreshTimer.Interval = m_refreshtime; | ||
125 | m_refreshTimer.Elapsed += new ElapsedEventHandler(HandleMaptileRefresh); | ||
126 | } | ||
124 | 127 | ||
125 | m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with refresh time {0}min and service object {1}", | 128 | m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with refresh time {0} min and service object {1}", |
126 | refreshminutes, service); | 129 | refreshminutes, service); |
127 | 130 | ||
128 | m_enabled = true; | 131 | m_enabled = true; |
@@ -238,4 +241,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
238 | } | 241 | } |
239 | } | 242 | } |
240 | } | 243 | } |
241 | } \ No newline at end of file | 244 | } |