all pollers converted to single thread pool
[public/netxms.git] / src / server / core / condition.cpp
index 29c0a5d..55b71a8 100644 (file)
@@ -364,20 +364,21 @@ UINT32 Condition::modifyFromMessageInternal(NXCPMessage *pRequest)
  */
 void Condition::lockForPoll()
 {
-   incRefCount();
    m_queuedForPolling = TRUE;
 }
 
 /**
- * This method should be called by poller thread when poll finish
+ * Poller entry point
  */
-void Condition::endPoll()
+void Condition::doPoll(PollerInfo *poller)
 {
+   poller->startExecution();
+   check();
    lockProperties();
    m_queuedForPolling = FALSE;
    m_lastPoll = time(NULL);
    unlockProperties();
-   decRefCount();
+   delete poller;
 }
 
 /**