minor refactoring
authorVictor Kirhenshtein <victor@netxms.org>
Tue, 28 Nov 2017 11:17:46 +0000 (13:17 +0200)
committerVictor Kirhenshtein <victor@netxms.org>
Tue, 28 Nov 2017 11:17:46 +0000 (13:17 +0200)
src/server/core/tunnel.cpp
src/server/include/nms_objects.h

index 208b67e..d04b21c 100644 (file)
@@ -1014,7 +1014,7 @@ retry:
                      nxlog_debug_tag(DEBUG_TAG, 4, _T("SetupTunnel(%s): Tunnel attached to node %s [%d]"), (const TCHAR *)request->addr.toString(), node->getName(), node->getId());
                      if (node->getRuntimeFlags() & NDF_NEW_TUNNEL_BIND)
                      {
-                        node->removeNewTunnelBindFlag();
+                        node->clearNewTunnelBindFlag();
                         node->setRecheckCapsFlag();
                         node->forceConfigurationPoll();
                      }
index 9d50973..5a6a7bc 100644 (file)
@@ -1902,13 +1902,14 @@ public:
    time_t getLastAgentCommTime() const { return m_lastAgentCommTime; }
    const TCHAR *getPrimaryName() const { return m_primaryName; }
    const uuid& getTunnelId() const { return m_tunnelId; }
-   void setNewTunnelBindFlag() { m_runtimeFlags |= NDF_NEW_TUNNEL_BIND; }
-   void removeNewTunnelBindFlag() { m_runtimeFlags &= ~NDF_NEW_TUNNEL_BIND; }
    UINT32 getRequiredPollCount() const { return m_requiredPollCount; }
 
    bool isDown() { return (m_state & DCSF_UNREACHABLE) ? true : false; }
        time_t getDownTime() const { return m_downSince; }
 
+   void setNewTunnelBindFlag() { lockProperties(); m_runtimeFlags |= NDF_NEW_TUNNEL_BIND; unlockProperties(); }
+   void clearNewTunnelBindFlag() { lockProperties(); m_runtimeFlags &= ~NDF_NEW_TUNNEL_BIND; unlockProperties(); }
+
    void addInterface(Interface *pInterface) { addChild(pInterface); pInterface->addParent(this); }
    Interface *createNewInterface(InterfaceInfo *ifInfo, bool manuallyCreated, bool fakeInterface);
    Interface *createNewInterface(const InetAddress& ipAddr, BYTE *macAddr, bool fakeInterface);