chenluhua1980
8 天以前 6c92ade0aeb6a505f2ab8108dcbdab20e37a9fac
SourceCode/Bond/Servo/CMaster.cpp
@@ -119,13 +119,6 @@
         m_hEventDispatchThreadExit[1] = nullptr;
      }
      // 释放人工搬出缓冲区里的玻璃
      for (auto* pGlass : m_bufGlass) {
         if (pGlass != nullptr) {
            pGlass->release();
         }
      }
      m_bufGlass.clear();
      DeleteCriticalSection(&m_criticalSection);
   }
@@ -344,6 +337,13 @@
      }
      m_listEquipment.clear();
      // release manual-remove buffer before glass pool is torn down
      for (auto* pGlass : m_bufGlass) {
         if (pGlass != nullptr) {
            pGlass->release();
         }
      }
      m_bufGlass.clear();
      if (m_pCollector != nullptr) {
         m_pCollector->stopLoop();
@@ -1930,6 +1930,16 @@
            m_listener.onJobReceived(this, (CEquipment*)pEquipment, port, pJobDataS);
         }
      };
      listener.onSentOutJob = [&](void* pEquipment, int port, CJobDataS* pJobDataS) {
         if (m_listener.onJobSentOut != nullptr) {
            m_listener.onJobSentOut(this, (CEquipment*)pEquipment, port, pJobDataS);
         }
      };
      listener.onEqStatusChanged = [&](void* pEquipment, int unitId, int status, int reason) {
         if (m_listener.onEqStatusChanged != nullptr) {
            m_listener.onEqStatusChanged(this, (CEquipment*)pEquipment, unitId, status, reason);
         }
      };
      pEquipment->setListener(listener);
      pEquipment->setCcLink(&m_cclink);
      m_listEquipment.push_back(pEquipment);