refactoring of AgentConnection::getList
[public/netxms.git] / src / server / core / node.cpp
index 5b40b52..9769f29 100644 (file)
@@ -4267,14 +4267,11 @@ UINT32 Node::getListFromAgent(const TCHAR *name, StringList **list)
    // Get parameter from agent
    while(dwTries-- > 0)
    {
-      dwError = m_agentConnection->getList(name);
+      dwError = m_agentConnection->getList(name, list);
       switch(dwError)
       {
          case ERR_SUCCESS:
             dwResult = DCE_SUCCESS;
-            *list = new StringList;
-            for(i = 0; i < m_agentConnection->getNumDataLines(); i++)
-               (*list)->add(m_agentConnection->getDataLine(i));
             setLastAgentCommTime();
             goto end_loop;
          case ERR_UNKNOWN_PARAMETER: