added NXSL function AgentExecuteAction
[public/netxms.git] / src / smsdrv / nxagent / main.cpp
index 7abd915..7cce917 100644 (file)
@@ -87,10 +87,7 @@ extern "C" bool EXPORT SMSDriverSend(const TCHAR *pszPhoneNumber, const TCHAR *p
                conn->setCommandTimeout(m_timeout);
       if (conn->connect())
       {
-                       TCHAR *argv[2];
-
-                       argv[0] = (TCHAR *)pszPhoneNumber;
-                       argv[1] = (TCHAR *)pszText;
+                       const TCHAR *argv[2] = { pszPhoneNumber, pszText };
                        UINT32 rcc = conn->execAction(_T("SMS.Send"), 2, argv);
                        nxlog_debug(4, _T("nxagent.sms: agent action execution result: %d (%s)"), rcc, AgentErrorCodeToText(rcc));
          if (rcc == ERR_SUCCESS)