Allow the map tile module to be enabled without also eabling refresh
parent
807bb85ac2
commit
b9d61d5413
|
@ -93,8 +93,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||||
if (config == null)
|
if (config == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime"));
|
int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime", "-1"));
|
||||||
if (refreshminutes <= 0)
|
if (refreshminutes < 0)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: No refresh time given in config. Module disabled.");
|
m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: No refresh time given in config. Module disabled.");
|
||||||
return;
|
return;
|
||||||
|
@ -117,12 +117,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_refreshTimer.Enabled = true;
|
if (m_refreshtime > 0)
|
||||||
m_refreshTimer.AutoReset = true;
|
{
|
||||||
m_refreshTimer.Interval = m_refreshtime;
|
m_refreshTimer.Enabled = true;
|
||||||
m_refreshTimer.Elapsed += new ElapsedEventHandler(HandleMaptileRefresh);
|
m_refreshTimer.AutoReset = true;
|
||||||
|
m_refreshTimer.Interval = m_refreshtime;
|
||||||
|
m_refreshTimer.Elapsed += new ElapsedEventHandler(HandleMaptileRefresh);
|
||||||
|
}
|
||||||
|
|
||||||
m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with refresh time {0}min and service object {1}",
|
m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with refresh time {0} min and service object {1}",
|
||||||
refreshminutes, service);
|
refreshminutes, service);
|
||||||
|
|
||||||
m_enabled = true;
|
m_enabled = true;
|
||||||
|
@ -238,4 +241,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue