"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/server/core/dctarget.cpp" between
netxms-3.8.382.tar.gz and netxms-3.8.405.tar.gz

About: NetXMS is a multi-platform open source network management and monitoring system.

dctarget.cpp  (netxms-3.8.382):dctarget.cpp  (netxms-3.8.405)
skipping to change at line 65 skipping to change at line 65
extern ThreadPool *g_pollerThreadPool; extern ThreadPool *g_pollerThreadPool;
/** /**
* Default constructor * Default constructor
*/ */
DataCollectionTarget::DataCollectionTarget() : super(), m_statusPollState(_T("st atus")), DataCollectionTarget::DataCollectionTarget() : super(), m_statusPollState(_T("st atus")),
m_configurationPollState(_T("configuration")), m_instancePollState(_T(" instance")), m_configurationPollState(_T("configuration")), m_instancePollState(_T(" instance")),
m_deletedItems(0, 32), m_deletedTables(0, 32), m_geoAreas(0, 16) m_deletedItems(0, 32), m_deletedTables(0, 32), m_geoAreas(0, 16)
{ {
m_hPollerMutex = MutexCreate(); m_hPollerMutex = MutexCreate();
m_mutexProxyLoadFactor = MutexCreate();
m_proxyLoadFactor = 0; m_proxyLoadFactor = 0;
m_geoLocationControlMode = GEOLOCATION_NO_CONTROL; m_geoLocationControlMode = GEOLOCATION_NO_CONTROL;
m_geoLocationRestrictionsViolated = false; m_geoLocationRestrictionsViolated = false;
m_instanceDiscoveryPending = false; m_instanceDiscoveryPending = false;
} }
/** /**
* Constructor for creating new data collection capable objects * Constructor for creating new data collection capable objects
*/ */
DataCollectionTarget::DataCollectionTarget(const TCHAR *name) : super(name), m_s tatusPollState(_T("status")), DataCollectionTarget::DataCollectionTarget(const TCHAR *name) : super(name), m_s tatusPollState(_T("status")),
m_configurationPollState(_T("configuration")), m_instancePollState(_T(" instance")), m_configurationPollState(_T("configuration")), m_instancePollState(_T(" instance")),
m_deletedItems(0, 32), m_deletedTables(0, 32), m_geoAreas(0, 16) m_deletedItems(0, 32), m_deletedTables(0, 32), m_geoAreas(0, 16)
{ {
m_hPollerMutex = MutexCreate(); m_hPollerMutex = MutexCreate();
m_mutexProxyLoadFactor = MutexCreate();
m_proxyLoadFactor = 0; m_proxyLoadFactor = 0;
m_geoLocationControlMode = GEOLOCATION_NO_CONTROL; m_geoLocationControlMode = GEOLOCATION_NO_CONTROL;
m_geoLocationRestrictionsViolated = false; m_geoLocationRestrictionsViolated = false;
m_instanceDiscoveryPending = false; m_instanceDiscoveryPending = false;
} }
/** /**
* Destructor * Destructor
*/ */
DataCollectionTarget::~DataCollectionTarget() DataCollectionTarget::~DataCollectionTarget()
{ {
MutexDestroy(m_hPollerMutex); MutexDestroy(m_hPollerMutex);
MutexDestroy(m_mutexProxyLoadFactor);
} }
/** /**
* Delete object from database * Delete object from database
*/ */
bool DataCollectionTarget::deleteFromDatabase(DB_HANDLE hdb) bool DataCollectionTarget::deleteFromDatabase(DB_HANDLE hdb)
{ {
bool success = executeQueryOnObject(hdb, _T("DELETE FROM dct_node_map WHERE n ode_id=?")); bool success = executeQueryOnObject(hdb, _T("DELETE FROM dct_node_map WHERE n ode_id=?"));
// TSDB: to avoid heavy query on idata tables let collected data expire inste ad of deleting it immediately // TSDB: to avoid heavy query on idata tables let collected data expire inste ad of deleting it immediately
skipping to change at line 2533 skipping to change at line 2536
if ((object->getDataSource() == DS_SNMP_AGENT) && (object->getStatus() == ITEM_STATUS_ACTIVE)) if ((object->getDataSource() == DS_SNMP_AGENT) && (object->getStatus() == ITEM_STATUS_ACTIVE))
{ {
if (object->isAdvancedSchedule()) if (object->isAdvancedSchedule())
loadFactor += 12; // assume 5 minutes interval for custom schedule loadFactor += 12; // assume 5 minutes interval for custom schedule
else else
loadFactor += 3600.0 / static_cast<double>(object->getEffectivePolli ngInterval()); loadFactor += 3600.0 / static_cast<double>(object->getEffectivePolli ngInterval());
} }
} }
unlockDciAccess(); unlockDciAccess();
lockProperties(); MutexLock(m_mutexProxyLoadFactor);
m_proxyLoadFactor = loadFactor; m_proxyLoadFactor = loadFactor;
unlockProperties(); MutexUnlock(m_mutexProxyLoadFactor);
} }
/** /**
* Reset poll timers * Reset poll timers
*/ */
void DataCollectionTarget::resetPollTimers() void DataCollectionTarget::resetPollTimers()
{ {
m_statusPollState.resetTimer(); m_statusPollState.resetTimer();
m_configurationPollState.resetTimer(); m_configurationPollState.resetTimer();
m_instancePollState.resetTimer(); m_instancePollState.resetTimer();
 End of changes. 5 change blocks. 
2 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)