responce changed to response (issue #37)
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 17 Aug 2005 12:09:27 +0000 (12:09 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 17 Aug 2005 12:09:27 +0000 (12:09 +0000)
52 files changed:
ChangeLog
include/nms_agent.h
include/nms_cscp.h
include/nxclapi.h
include/nxcscpapi.h
include/nxsnmp.h
src/agent/core/nxagentd.h
src/agent/core/session.cpp
src/agent/core/subagent.cpp
src/agent/subagents/ping/ping.cpp
src/agent/subagents/portCheck/custom.cpp
src/agent/subagents/portCheck/http.cpp
src/agent/subagents/portCheck/main.cpp
src/agent/subagents/portCheck/pop3.cpp
src/console/win32/CreateNetSrvDlg.cpp
src/console/win32/CreateNetSrvDlg.h
src/console/win32/NetSrvPropsGeneral.cpp
src/console/win32/NetSrvPropsGeneral.h
src/console/win32/nxcon.clw
src/console/win32/nxcon.cpp
src/console/win32/nxcon.rc
src/console/win32/resource.h
src/libnetxms/icmp.cpp
src/libnxcl/actions.cpp
src/libnxcl/alarms.cpp
src/libnxcl/comm.cpp
src/libnxcl/datacoll.cpp
src/libnxcl/epp.cpp
src/libnxcl/eventdb.cpp
src/libnxcl/image.cpp
src/libnxcl/mib.cpp
src/libnxcl/objects.cpp
src/libnxcl/package.cpp
src/libnxcl/server.cpp
src/libnxcl/session.cpp
src/libnxcl/snmptrap.cpp
src/libnxcl/users.cpp
src/libnxsnmp/pdu.cpp
src/libnxsnmp/transport.cpp
src/server/core/admin.cpp
src/server/core/image.cpp
src/server/core/netsrv.cpp
src/server/core/node.cpp
src/server/core/session.cpp
src/server/include/nms_objects.h
src/server/include/nxsrvapi.h
src/server/libnxsrv/agent.cpp
src/server/libnxsrv/main.cpp
src/server/libnxsrv/messages.mc
src/server/tools/nxadm/nxadm.cpp
src/server/tools/nxget/nxget.cpp
src/server/tools/nxsnmpget/nxsnmpget.cpp

index ee540db..4776a2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
 *
 
 - Implemented actions provided by subagents
+- Fixed issues: #37
 
 
 *
@@ -20,7 +21,7 @@
   as bind address for network service
 - Fixed bug causing random fails of connections from server to agent and
   from console to server
-- Fixed issues: 29
+- Fixed issues: #29
 
 
 *
@@ -38,7 +39,7 @@
 - Windows console: added simple export of collected DCI data
 - Core agent: added configuration option SessionIdleTimeout for automatic
   disconnect of idle or broken sessions
-- Fixed issues: 26, 30
+- Fixed issues: #26, #30
 
 
 *
index 9e281e6..a2b1068 100644 (file)
@@ -57,7 +57,7 @@
 #define ERR_OUT_OF_RESOURCES        ((DWORD)503)
 #define ERR_NOT_CONNECTED           ((DWORD)900)
 #define ERR_CONNECTION_BROKEN       ((DWORD)901)
-#define ERR_BAD_RESPONCE            ((DWORD)902)
+#define ERR_BAD_RESPONSE            ((DWORD)902)
 #define ERR_IO_FAILURE              ((DWORD)903)
 #define ERR_RESOURCE_BUSY           ((DWORD)904)
 #define ERR_EXEC_FAILED             ((DWORD)905)
@@ -150,7 +150,7 @@ typedef struct
    TCHAR szVersion[32];
    void (* pUnloadHandler)(void);   // Called at subagent unload. Can be NULL.
    BOOL (* pCommandHandler)(DWORD dwCommand, CSCPMessage *pRequest,
-                            CSCPMessage *pResponce);
+                            CSCPMessage *pResponse);
    DWORD dwNumParameters;
    NETXMS_SUBAGENT_PARAM *pParamList;
    DWORD dwNumEnums;
index cd57f74..6659b59 100644 (file)
@@ -497,7 +497,7 @@ typedef struct
 #define VID_IP_PROTO                ((DWORD)131)
 #define VID_IP_PORT                 ((DWORD)132)
 #define VID_SERVICE_REQUEST         ((DWORD)133)
-#define VID_SERVICE_RESPONCE        ((DWORD)134)
+#define VID_SERVICE_RESPONSE        ((DWORD)134)
 #define VID_POLLER_NODE_ID          ((DWORD)135)
 #define VID_SERVICE_STATUS          ((DWORD)136)
 #define VID_NUM_PARAMETERS          ((DWORD)137)
index c7b1b6e..34b6768 100644 (file)
@@ -298,7 +298,7 @@ typedef void * NXC_SESSION;
 #define OBJ_UPDATE_IP_PROTO         ((DWORD)0x000400)
 #define OBJ_UPDATE_IP_PORT          ((DWORD)0x000800)
 #define OBJ_UPDATE_CHECK_REQUEST    ((DWORD)0x001000)
-#define OBJ_UPDATE_CHECK_RESPONCE   ((DWORD)0x002000)
+#define OBJ_UPDATE_CHECK_RESPONSE   ((DWORD)0x002000)
 #define OBJ_UPDATE_POLLER_NODE      ((DWORD)0x004000)
 #define OBJ_UPDATE_IP_ADDR          ((DWORD)0x008000)
 #define OBJ_UPDATE_PEER_GATEWAY     ((DWORD)0x010000)
@@ -710,7 +710,7 @@ typedef struct
          WORD wPort;
          DWORD dwPollerNode;
          TCHAR *pszRequest;
-         TCHAR *pszResponce;
+         TCHAR *pszResponse;
       } netsrv;
       struct
       {
@@ -757,7 +757,7 @@ typedef struct
    WORD wPort;
    DWORD dwPollerNode;
    TCHAR *pszRequest;
-   TCHAR *pszResponce;
+   TCHAR *pszResponse;
    DWORD dwIpAddr;
    DWORD dwPeerGateway;
    DWORD dwNumLocalNets;
@@ -965,7 +965,7 @@ typedef struct
          WORD wProto;
          WORD wPort;
          TCHAR *pszRequest;
-         TCHAR *pszResponce;
+         TCHAR *pszResponse;
       } netsrv;
    } cs;
 } NXC_OBJECT_CREATE_INFO;
index 69d53f1..48953c7 100644 (file)
@@ -197,7 +197,7 @@ BOOL LIBNXCSCP_EXPORTABLE CSCPDecryptMessage(CSCP_ENCRYPTION_CONTEXT *pCtx,
                                              BYTE *pDecryptionBuffer);
 DWORD LIBNXCSCP_EXPORTABLE SetupEncryptionContext(CSCPMessage *pMsg, 
                                                   CSCP_ENCRYPTION_CONTEXT **ppCtx,
-                                                  CSCPMessage **ppResponce,
+                                                  CSCPMessage **ppResponse,
                                                   RSA *pPrivateKey);
 void LIBNXCSCP_EXPORTABLE DestroyEncryptionContext(CSCP_ENCRYPTION_CONTEXT *pCtx);
 void LIBNXCSCP_EXPORTABLE PrepareKeyRequestMsg(CSCPMessage *pMsg, RSA *pServerKey);
index d33756b..de3e605 100644 (file)
@@ -99,7 +99,7 @@
 #define SNMP_INVALID_PDU         255
 #define SNMP_GET_REQUEST         0
 #define SNMP_GET_NEXT_REQUEST    1
-#define SNMP_GET_RESPONCE        2
+#define SNMP_GET_RESPONSE        2
 #define SNMP_SET_REQUEST         3
 #define SNMP_TRAP                4
 #define SNMP_GET_BULK_REQUEST    5
 #define ASN_NO_SUCH_INSTANCE        0x81
 #define ASN_GET_REQUEST_PDU         0xA0
 #define ASN_GET_NEXT_REQUEST_PDU    0xA1
-#define ASN_GET_RESPONCE_PDU        0xA2
+#define ASN_GET_RESPONSE_PDU        0xA2
 #define ASN_SET_REQUEST_PDU         0xA3
 #define ASN_TRAP_V1_PDU             0xA4
 #define ASN_GET_BULK_REQUEST_PDU    0xA5
@@ -289,7 +289,7 @@ public:
    int Read(SNMP_PDU **ppData, DWORD dwTimeout = INFINITE,
             struct sockaddr *pSender = NULL, socklen_t *piAddrSize = NULL);
    int Send(SNMP_PDU *pPDU, struct sockaddr *pRcpt = NULL, socklen_t iAddrLen = 0);
-   DWORD DoRequest(SNMP_PDU *pRequest, SNMP_PDU **pResponce, 
+   DWORD DoRequest(SNMP_PDU *pRequest, SNMP_PDU **pResponse, 
                    DWORD dwTimeout = INFINITE, DWORD dwNumRetries = 1);
 
    DWORD CreateUDPTransport(TCHAR *pszHostName, DWORD dwHostAddr = 0, WORD wPort = 161);
index 2a739a1..4598bcc 100644 (file)
@@ -270,7 +270,7 @@ void GetParameterList(CSCPMessage *pMsg);
 
 BOOL LoadSubAgent(char *szModuleName);
 void UnloadAllSubAgents(void);
-BOOL ProcessCmdBySubAgent(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pResponce);
+BOOL ProcessCmdBySubAgent(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pResponse);
 
 BOOL AddAction(char *pszName, int iType, char *pArg, 
                LONG (*fpHandler)(TCHAR *, NETXMS_VALUES_LIST *, TCHAR *),
index 10674d9..f3a0999 100644 (file)
@@ -239,11 +239,11 @@ void CommSession::ReadThread(void)
             DebugPrintf("Received message %s", CSCPMessageCodeName(pMsg->GetCode(), szBuffer));
             if (m_pCtx == NULL)
             {
-               CSCPMessage *pResponce;
+               CSCPMessage *pResponse;
 
-               SetupEncryptionContext(pMsg, &m_pCtx, &pResponce, NULL);
-               SendMessage(pResponce);
-               delete pResponce;
+               SetupEncryptionContext(pMsg, &m_pCtx, &pResponse, NULL);
+               SendMessage(pResponse);
+               delete pResponse;
             }
             delete pMsg;
          }
@@ -337,7 +337,7 @@ void CommSession::ProcessingThread(void)
       dwCommand = pMsg->GetCode();
       DebugPrintf("Received message %s", CSCPMessageCodeName((WORD)dwCommand, szBuffer));
 
-      // Prepare responce message
+      // Prepare response message
       msg.SetCode(CMD_REQUEST_COMPLETED);
       msg.SetId(pMsg->GetId());
 
@@ -394,7 +394,7 @@ void CommSession::ProcessingThread(void)
       }
       delete pMsg;
 
-      // Send responce
+      // Send response
       SendMessage(&msg);
       msg.DeleteAllVariables();
    }
index 0038ccd..5cad368 100644 (file)
@@ -193,7 +193,7 @@ LONG H_SubAgentList(char *cmd, char *arg, NETXMS_VALUES_LIST *value)
 // Process unknown command by subagents
 //
 
-BOOL ProcessCmdBySubAgent(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pResponce)
+BOOL ProcessCmdBySubAgent(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pResponse)
 {
    BOOL bResult = FALSE;
    DWORD i;
@@ -201,7 +201,7 @@ BOOL ProcessCmdBySubAgent(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *p
    for(i = 0; (i < m_dwNumSubAgents) && (!bResult); i++)
    {
       if (m_pSubAgentList[i].pInfo->pCommandHandler != NULL)
-         bResult = m_pSubAgentList[i].pInfo->pCommandHandler(dwCommand, pRequest, pResponce);
+         bResult = m_pSubAgentList[i].pInfo->pCommandHandler(dwCommand, pRequest, pResponse);
    }
    return bResult;
 }
index 4ff0e76..65ef10c 100644 (file)
@@ -229,9 +229,9 @@ static BOOL AddTargetFromConfig(TCHAR *pszCfg)
 
 static NETXMS_SUBAGENT_PARAM m_parameters[] =
 {
-   { _T("Icmp.AvgPingTime(*)"), H_PollResult, _T("A"), DCI_DT_UINT, _T("Average responce time of ICMP ping to {instance} for last minute") },
-   { _T("Icmp.LastPingTime(*)"), H_PollResult, _T("L"), DCI_DT_UINT, _T("Responce time of last ICMP ping to {instance}") },
-   { _T("Icmp.Ping(*)"), H_IcmpPing, NULL, DCI_DT_UINT, _T("ICMP ping responce time for {instance}") }
+   { _T("Icmp.AvgPingTime(*)"), H_PollResult, _T("A"), DCI_DT_UINT, _T("Average response time of ICMP ping to {instance} for last minute") },
+   { _T("Icmp.LastPingTime(*)"), H_PollResult, _T("L"), DCI_DT_UINT, _T("Response time of last ICMP ping to {instance}") },
+   { _T("Icmp.Ping(*)"), H_IcmpPing, NULL, DCI_DT_UINT, _T("ICMP ping response time for {instance}") }
 };
 static NETXMS_SUBAGENT_ENUM m_enums[] =
 {
index 36e0afd..70bd1d9 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: custom.cpp,v 1.1 2005-02-08 18:32:56 alk Exp $ */
+/* $Id: custom.cpp,v 1.2 2005-08-17 12:09:23 victor Exp $ */
 
 #include <nms_common.h>
 #include <nms_agent.h>
@@ -7,7 +7,7 @@
 #include "net.h"
 
 int CheckCustom(char *szAddr, DWORD dwAddr, short nPort, char *szRequest,
-               char *szResponce)
+               char *szResponse)
 {
        int nRet = 0;
        int nSd;
@@ -31,5 +31,8 @@ int CheckCustom(char *szAddr, DWORD dwAddr, short nPort, char *szRequest,
 /*
 
 $Log: not supported by cvs2svn $
+Revision 1.1  2005/02/08 18:32:56  alk
++ simple "custom" checker added
+
 
 */
index 84eec99..b4e42a0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: http.cpp,v 1.3 2005-01-31 15:29:31 victor Exp $ */
+/* $Id: http.cpp,v 1.4 2005-08-17 12:09:23 victor Exp $ */
 
 #include <nms_common.h>
 #include <nms_agent.h>
@@ -96,6 +96,9 @@ int CheckHTTP(char *szAddr, DWORD dwAddr, short nPort, char *szURI,
 /*
 
 $Log: not supported by cvs2svn $
+Revision 1.3  2005/01/31 15:29:31  victor
+Regular expressions implemented under Windows
+
 Revision 1.2  2005/01/29 21:24:03  victor
 Fixed some Windows compatibility issues
 
@@ -103,7 +106,7 @@ Revision 1.1  2005/01/29 00:21:29  alk
 + http checker
 
 request string: "HOST:URI"
-responce string: posix regex, e.g. '^HTTP/1.[01] 200 .*'
+response string: posix regex, e.g. '^HTTP/1.[01] 200 .*'
 
 requst sent to server:
 ---
index b31c648..26c59e9 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: main.cpp,v 1.9 2005-08-13 16:03:01 victor Exp $ */
+/* $Id: main.cpp,v 1.10 2005-08-17 12:09:23 victor Exp $ */
 
 #include <nms_common.h>
 #include <nms_agent.h>
 //
 // Command handler
 //
-BOOL CommandHandler(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pResponce)
+BOOL CommandHandler(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pResponse)
 {
        BOOL bHandled = TRUE;
        WORD wType, wPort;
        DWORD dwAddress;
        char szRequest[1024 * 10];
-       char szResponce[1024 * 10];
+       char szResponse[1024 * 10];
        DWORD nRet;
        
        if (dwCommand != CMD_CHECK_NETWORK_SERVICE)
@@ -35,21 +35,21 @@ BOOL CommandHandler(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pRespon
        wPort = pRequest->GetVariableShort(VID_IP_PORT);
        dwAddress = pRequest->GetVariableLong(VID_IP_ADDRESS);
        pRequest->GetVariableStr(VID_SERVICE_REQUEST, szRequest, sizeof(szRequest));
-       pRequest->GetVariableStr(VID_SERVICE_RESPONCE, szResponce, sizeof(szResponce));
+       pRequest->GetVariableStr(VID_SERVICE_RESPONSE, szResponse, sizeof(szResponse));
 
        switch(wType)
        {
        case NETSRV_CUSTOM:
                // unsupported for now
-               nRet = CheckCustom(NULL, dwAddress, wPort, szRequest, szResponce);
-               pResponce->SetVariable(VID_RCC, ERR_SUCCESS);
-               pResponce->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
+               nRet = CheckCustom(NULL, dwAddress, wPort, szRequest, szResponse);
+               pResponse->SetVariable(VID_RCC, ERR_SUCCESS);
+               pResponse->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
                break;
        case NETSRV_SSH:
                        nRet = CheckSSH(NULL, dwAddress, wPort, NULL, NULL);
 
-                       pResponce->SetVariable(VID_RCC, ERR_SUCCESS);
-                       pResponce->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
+                       pResponse->SetVariable(VID_RCC, ERR_SUCCESS);
+                       pResponse->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
                break;
        case NETSRV_POP3:
                {
@@ -67,8 +67,8 @@ BOOL CommandHandler(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pRespon
 
                        }
 
-                       pResponce->SetVariable(VID_RCC, ERR_SUCCESS);
-                       pResponce->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
+                       pResponse->SetVariable(VID_RCC, ERR_SUCCESS);
+                       pResponse->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
                }
                break;
        case NETSRV_SMTP:
@@ -77,12 +77,12 @@ BOOL CommandHandler(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pRespon
                if (szRequest[0] != 0)
                {
                        nRet = CheckSMTP(NULL, dwAddress, wPort, szRequest);
-                       pResponce->SetVariable(VID_RCC, ERR_SUCCESS);
-                       pResponce->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
+                       pResponse->SetVariable(VID_RCC, ERR_SUCCESS);
+                       pResponse->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
                }
 
-               pResponce->SetVariable(VID_RCC, ERR_SUCCESS);
-               pResponce->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
+               pResponse->SetVariable(VID_RCC, ERR_SUCCESS);
+               pResponse->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
                break;
        case NETSRV_FTP:
                bHandled = FALSE;
@@ -102,11 +102,11 @@ BOOL CommandHandler(DWORD dwCommand, CSCPMessage *pRequest, CSCPMessage *pRespon
                                pURI++;
 
                                nRet = CheckHTTP(NULL, dwAddress, wPort, pURI, pHost,
-                                               szResponce);
+                                               szResponse);
                        }
 
-                       pResponce->SetVariable(VID_RCC, ERR_SUCCESS);
-                       pResponce->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
+                       pResponse->SetVariable(VID_RCC, ERR_SUCCESS);
+                       pResponse->SetVariable(VID_SERVICE_STATUS, (DWORD)nRet);
                }
                break;
        default:
@@ -161,6 +161,9 @@ extern "C" BOOL PORTCHECK_EXPORTABLE NxSubAgentInit(NETXMS_SUBAGENT_INFO **ppInf
 /*
 
 $Log: not supported by cvs2svn $
+Revision 1.9  2005/08/13 16:03:01  victor
+Init structure changed to the new format
+
 Revision 1.8  2005/02/08 18:32:56  alk
 + simple "custom" checker added
 
@@ -168,7 +171,7 @@ Revision 1.7  2005/01/29 00:21:29  alk
 + http checker
 
 request string: "HOST:URI"
-responce string: posix regex, e.g. '^HTTP/1.[01] 200 .*'
+response string: posix regex, e.g. '^HTTP/1.[01] 200 .*'
 
 requst sent to server:
 ---
index 158a345..ab306be 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pop3.cpp,v 1.6 2005-05-23 21:03:41 alk Exp $ */
+/* $Id: pop3.cpp,v 1.7 2005-08-17 12:09:23 victor Exp $ */
 
 #include <nms_common.h>
 #include <nms_agent.h>
@@ -84,6 +84,9 @@ int CheckPOP3(char *szAddr, DWORD dwAddr, short nPort, char *szUser, char *szPas
 /*
 
 $Log: not supported by cvs2svn $
+Revision 1.6  2005/05/23 21:03:41  alk
+SMTP checker now supports multiline responses
+
 Revision 1.5  2005/01/29 21:24:03  victor
 Fixed some Windows compatibility issues
 
index 4d73981..bfae075 100644 (file)
@@ -23,7 +23,7 @@ CCreateNetSrvDlg::CCreateNetSrvDlg(CWnd* pParent /*=NULL*/)
        m_iProtocolType = -1;
        m_iProtocolNumber = 0;
        m_strRequest = _T("");
-       m_strResponce = _T("");
+       m_strResponse = _T("");
        //}}AFX_DATA_INIT
 }
 
@@ -39,7 +39,7 @@ void CCreateNetSrvDlg::DoDataExchange(CDataExchange* pDX)
        DDX_Text(pDX, IDC_EDIT_PROTO, m_iProtocolNumber);
        DDV_MinMaxLong(pDX, m_iProtocolNumber, 0, 255);
        DDX_Text(pDX, IDC_EDIT_REQUEST, m_strRequest);
-       DDX_Text(pDX, IDC_EDIT_RESPONCE, m_strResponce);
+       DDX_Text(pDX, IDC_EDIT_RESPONSE, m_strResponse);
        //}}AFX_DATA_MAP
 }
 
index 183084e..b53a9ce 100644 (file)
@@ -28,7 +28,7 @@ public:
        int             m_iProtocolType;
        long    m_iProtocolNumber;
        CString m_strRequest;
-       CString m_strResponce;
+       CString m_strResponse;
        //}}AFX_DATA
 
 
index e21ca23..ba7d0c9 100644 (file)
@@ -23,7 +23,7 @@ CNetSrvPropsGeneral::CNetSrvPropsGeneral() : CPropertyPage(CNetSrvPropsGeneral::
        m_strName = _T("");
        m_iPort = 0;
        m_strRequest = _T("");
-       m_strResponce = _T("");
+       m_strResponse = _T("");
        m_iProto = 0;
        //}}AFX_DATA_INIT
 }
@@ -42,7 +42,7 @@ void CNetSrvPropsGeneral::DoDataExchange(CDataExchange* pDX)
        DDX_Text(pDX, IDC_EDIT_PORT, m_iPort);
        DDV_MinMaxLong(pDX, m_iPort, 0, 65535);
        DDX_Text(pDX, IDC_EDIT_REQUEST, m_strRequest);
-       DDX_Text(pDX, IDC_EDIT_RESPONCE, m_strResponce);
+       DDX_Text(pDX, IDC_EDIT_RESPONSE, m_strResponse);
        DDX_Text(pDX, IDC_EDIT_PROTO, m_iProto);
        DDV_MinMaxLong(pDX, m_iProto, 0, 255);
        //}}AFX_DATA_MAP
@@ -54,7 +54,7 @@ BEGIN_MESSAGE_MAP(CNetSrvPropsGeneral, CPropertyPage)
        ON_EN_CHANGE(IDC_EDIT_NAME, OnChangeEditName)
        ON_CBN_SELCHANGE(IDC_COMBO_TYPE, OnSelchangeComboType)
        ON_EN_CHANGE(IDC_EDIT_REQUEST, OnChangeEditRequest)
-       ON_EN_CHANGE(IDC_EDIT_RESPONCE, OnChangeEditResponce)
+       ON_EN_CHANGE(IDC_EDIT_RESPONSE, OnChangeEditResponse)
        ON_BN_CLICKED(IDC_RADIO_TCP, OnRadioTcp)
        ON_BN_CLICKED(IDC_RADIO_UDP, OnRadioUdp)
        ON_BN_CLICKED(IDC_RADIO_ICMP, OnRadioIcmp)
@@ -137,7 +137,7 @@ void CNetSrvPropsGeneral::OnOK()
    // Set fields in update structure
    m_pUpdate->pszName = (char *)((LPCTSTR)m_strName);
    m_pUpdate->pszRequest = (char *)((LPCTSTR)m_strRequest);
-   m_pUpdate->pszResponce = (char *)((LPCTSTR)m_strResponce);
+   m_pUpdate->pszResponse = (char *)((LPCTSTR)m_strResponse);
    m_pUpdate->iServiceType = m_iServiceType;
    m_pUpdate->wPort = (WORD)m_iPort;
    m_pUpdate->wProto = (WORD)m_iProto;
@@ -162,9 +162,9 @@ void CNetSrvPropsGeneral::OnChangeEditRequest()
    SetModified();
 }
 
-void CNetSrvPropsGeneral::OnChangeEditResponce() 
+void CNetSrvPropsGeneral::OnChangeEditResponse() 
 {
-   m_pUpdate->dwFlags |= OBJ_UPDATE_CHECK_RESPONCE;
+   m_pUpdate->dwFlags |= OBJ_UPDATE_CHECK_RESPONSE;
    SetModified();
 }
 
index a210d9c..1c8fd92 100644 (file)
@@ -32,7 +32,7 @@ public:
        CString m_strName;
        long    m_iPort;
        CString m_strRequest;
-       CString m_strResponce;
+       CString m_strResponse;
        long    m_iProto;
        //}}AFX_DATA
 
@@ -55,7 +55,7 @@ protected:
        afx_msg void OnChangeEditName();
        afx_msg void OnSelchangeComboType();
        afx_msg void OnChangeEditRequest();
-       afx_msg void OnChangeEditResponce();
+       afx_msg void OnChangeEditResponse();
        afx_msg void OnRadioTcp();
        afx_msg void OnRadioUdp();
        afx_msg void OnRadioIcmp();
index eb9d089..5c95659 100644 (file)
@@ -2925,7 +2925,7 @@ Control6=IDC_RADIO_ICMP,button,1342177289
 Control7=IDC_RADIO_OTHER,button,1342177289
 Control8=IDC_EDIT_PROTO,edit,1350639744
 Control9=IDC_EDIT_REQUEST,edit,1350631552
-Control10=IDC_EDIT_RESPONCE,edit,1350631552
+Control10=IDC_EDIT_RESPONSE,edit,1350631552
 Control11=IDC_SELECT_PARENT,button,1342242816
 Control12=IDOK,button,1342242817
 Control13=IDCANCEL,button,1342242816
@@ -2970,7 +2970,7 @@ Control11=IDC_EDIT_PROTO,edit,1350639744
 Control12=IDC_EDIT_POLLER,edit,1350633600
 Control13=IDC_SELECT_POLLER,button,1342242816
 Control14=IDC_EDIT_REQUEST,edit,1350631552
-Control15=IDC_EDIT_RESPONCE,edit,1350631552
+Control15=IDC_EDIT_RESPONSE,edit,1350631552
 Control16=IDC_STATIC,static,1342308352
 Control17=IDC_STATIC,static,1342308352
 Control18=IDC_STATIC,static,1342308352
index 1a0c65f..f428bed 100644 (file)
@@ -943,7 +943,7 @@ void CConsoleApp::ObjectProperties(DWORD dwObjectId)
             wndNetSrvGeneral.m_iPort = pObject->netsrv.wPort;
             wndNetSrvGeneral.m_iProto = pObject->netsrv.wProto;
             wndNetSrvGeneral.m_strRequest = pObject->netsrv.pszRequest;
-            wndNetSrvGeneral.m_strResponce = pObject->netsrv.pszResponce;
+            wndNetSrvGeneral.m_strResponse = pObject->netsrv.pszResponse;
             wndNetSrvGeneral.m_dwIpAddr = pObject->dwIpAddr;
             wndNetSrvGeneral.m_dwPollerNode = pObject->netsrv.dwPollerNode;
             wndPropSheet.AddPage(&wndNetSrvGeneral);
@@ -1464,7 +1464,7 @@ void CConsoleApp::CreateNetworkService(DWORD dwParent)
       ci.cs.netsrv.wPort = (WORD)dlg.m_iPort;
       ci.cs.netsrv.wProto = (WORD)dlg.m_iProtocolNumber;
       ci.cs.netsrv.pszRequest = (TCHAR *)((LPCTSTR)dlg.m_strRequest);
-      ci.cs.netsrv.pszResponce = (TCHAR *)((LPCTSTR)dlg.m_strResponce);
+      ci.cs.netsrv.pszResponse = (TCHAR *)((LPCTSTR)dlg.m_strResponse);
       CreateObject(&ci);
    }
 }
index 37cb7de..5be6e16 100644 (file)
@@ -1660,7 +1660,7 @@ BEGIN
                     101,35,10
     EDITTEXT        IDC_EDIT_PROTO,103,97,40,14,ES_AUTOHSCROLL | ES_NUMBER
     EDITTEXT        IDC_EDIT_REQUEST,13,138,158,14,ES_AUTOHSCROLL
-    EDITTEXT        IDC_EDIT_RESPONCE,13,166,158,14,ES_AUTOHSCROLL
+    EDITTEXT        IDC_EDIT_RESPONSE,13,166,158,14,ES_AUTOHSCROLL
     PUSHBUTTON      "&Select...",IDC_SELECT_PARENT,121,202,50,12
     DEFPUSHBUTTON   "OK",IDOK,183,7,50,14
     PUSHBUTTON      "Cancel",IDCANCEL,183,24,50,14
@@ -1674,9 +1674,9 @@ BEGIN
     LTEXT           "TCP/UDP Port",IDC_STATIC,113,45,48,8
     GROUPBOX        "IP Protocol",IDC_STATIC,7,79,169,37
     LTEXT           "Protocol number",IDC_STATIC,103,87,52,8
-    GROUPBOX        "Request/Responce",IDC_STATIC,7,119,169,68
+    GROUPBOX        "Request/Response",IDC_STATIC,7,119,169,68
     LTEXT           "Request",IDC_STATIC,13,128,28,8
-    LTEXT           "Expected responce",IDC_STATIC,13,156,62,8
+    LTEXT           "Expected response",IDC_STATIC,13,156,62,8
 END
 
 IDD_OBJECT_NETSRV_GENERAL DIALOG DISCARDABLE  0, 0, 292, 170
@@ -1705,7 +1705,7 @@ BEGIN
                     ES_READONLY
     PUSHBUTTON      "...",IDC_SELECT_POLLER,84,143,14,14
     EDITTEXT        IDC_EDIT_REQUEST,113,108,164,14,ES_AUTOHSCROLL
-    EDITTEXT        IDC_EDIT_RESPONCE,113,137,164,14,ES_AUTOHSCROLL
+    EDITTEXT        IDC_EDIT_RESPONSE,113,137,164,14,ES_AUTOHSCROLL
     LTEXT           "Object ID",IDC_STATIC,233,16,31,8
     LTEXT           "Bound to IP address",IDC_STATIC,167,47,65,8
     LTEXT           "Name",IDC_STATIC,13,16,20,8
@@ -1713,9 +1713,9 @@ BEGIN
     LTEXT           "Service type",IDC_STATIC,14,47,40,8
     LTEXT           "TCP/UDP port",IDC_STATIC,108,47,48,8
     GROUPBOX        "IP Protocol",IDC_STATIC,7,83,96,46
-    GROUPBOX        "Request/Responce",IDC_STATIC,107,83,178,80
+    GROUPBOX        "Request/Response",IDC_STATIC,107,83,178,80
     LTEXT           "Request",IDC_STATIC,113,98,28,8
-    LTEXT           "Expected responce",IDC_STATIC,113,127,62,8
+    LTEXT           "Expected response",IDC_STATIC,113,127,62,8
     GROUPBOX        "Poller node",IDC_STATIC,7,132,96,31
 END
 
index 83d31fb..8fdac40 100644 (file)
 #define IDC_CB_ITEM13                   1226
 #define IDC_EDIT_REQUEST                1226
 #define IDC_CB_ITEM10                   1227
-#define IDC_EDIT_RESPONCE               1227
+#define IDC_EDIT_RESPONSE               1227
 #define IDC_CB_ITEM14                   1228
 #define IDC_COMBO_TYPE                  1228
 #define IDC_CB_ITEM11                   1229
index f256930..ab5e039 100644 (file)
@@ -109,7 +109,7 @@ static WORD IPChecksum(WORD *addr, int len)
 // Return value: TRUE if host is alive and FALSE otherwise
 // Parameters: dwAddr - IP address with network byte order
 //             iNumRetries - number of retries
-//             dwTimeout - Timeout waiting for responce in milliseconds
+//             dwTimeout - Timeout waiting for response in milliseconds
 //
 
 DWORD LIBNETXMS_EXPORTABLE IcmpPing(DWORD dwAddr, int iNumRetries, DWORD dwTimeout, DWORD *pdwRTT)
@@ -159,7 +159,7 @@ DWORD LIBNETXMS_EXPORTABLE IcmpPing(DWORD dwAddr, int iNumRetries, DWORD dwTimeo
                        EV_SET(&ke, sock, EVFILT_READ, EV_ADD, 0, 5, NULL);
                        kevent(kq, &ke, 1, NULL, 0, NULL);
 
-         // Wait for responce
+         // Wait for response
          for(dwTimeLeft = dwTimeout; dwTimeLeft > 0;)
          {
             qwStartTime = GetCurrentTimeMs();
@@ -180,7 +180,7 @@ DWORD LIBNETXMS_EXPORTABLE IcmpPing(DWORD dwAddr, int iNumRetries, DWORD dwTimeo
          socklen_t iAddrLen;
          struct sockaddr_in saSrc;
 
-         // Wait for responce
+         // Wait for response
          for(dwTimeLeft = dwTimeout; dwTimeLeft > 0;)
          {
 #if HAVE_POLL
@@ -209,7 +209,7 @@ DWORD LIBNETXMS_EXPORTABLE IcmpPing(DWORD dwAddr, int iNumRetries, DWORD dwTimeo
                iAddrLen = sizeof(struct sockaddr_in);
                if (recvfrom(sock, (char *)&reply, sizeof(ECHOREPLY), 0, (struct sockaddr *)&saSrc, &iAddrLen) > 0)
                {
-                  // Check responce
+                  // Check response
                   if ((reply.m_ipHdr.m_iaSrc.s_addr == dwAddr) && 
                       (reply.m_icmpHdr.m_cType == 0) &&
                       (reply.m_icmpHdr.m_wId == request.m_icmpHdr.m_wId) &&
index bee4ec3..c84208d 100644 (file)
@@ -62,7 +62,7 @@ void ProcessActionUpdate(NXCL_Session *pSession, CSCPMessage *pMsg)
 
 DWORD LIBNXCL_EXPORTABLE NXCLoadActions(NXC_SESSION hSession, DWORD *pdwNumActions, NXC_ACTION **ppActionList)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwRetCode = RCC_SUCCESS, dwNumActions = 0, dwActionId = 0;
    NXC_ACTION *pList = NULL;
 
@@ -77,18 +77,18 @@ DWORD LIBNXCL_EXPORTABLE NXCLoadActions(NXC_SESSION hSession, DWORD *pdwNumActio
    {
       do
       {
-         pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_ACTION_DATA, dwRqId);
-         if (pResponce != NULL)
+         pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_ACTION_DATA, dwRqId);
+         if (pResponse != NULL)
          {
-            dwActionId = pResponce->GetVariableLong(VID_ACTION_ID);
+            dwActionId = pResponse->GetVariableLong(VID_ACTION_ID);
             if (dwActionId != 0)  // 0 is end of list indicator
             {
                pList = (NXC_ACTION *)realloc(pList, sizeof(NXC_ACTION) * (dwNumActions + 1));
                pList[dwNumActions].dwId = dwActionId;
-               ActionFromMsg(pResponce, &pList[dwNumActions]);
+               ActionFromMsg(pResponse, &pList[dwNumActions]);
                dwNumActions++;
             }
-            delete pResponce;
+            delete pResponse;
          }
          else
          {
@@ -161,7 +161,7 @@ DWORD LIBNXCL_EXPORTABLE NXCUnlockActionDB(NXC_SESSION hSession)
 
 DWORD LIBNXCL_EXPORTABLE NXCCreateAction(NXC_SESSION hSession, TCHAR *pszName, DWORD *pdwNewId)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRetCode, dwRqId;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -171,13 +171,13 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateAction(NXC_SESSION hSession, TCHAR *pszName, D
    msg.SetVariable(VID_ACTION_NAME, pszName);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
-         *pdwNewId = pResponce->GetVariableLong(VID_ACTION_ID);
-      delete pResponce;
+         *pdwNewId = pResponse->GetVariableLong(VID_ACTION_ID);
+      delete pResponse;
    }
    else
    {
@@ -231,6 +231,6 @@ DWORD LIBNXCL_EXPORTABLE NXCModifyAction(NXC_SESSION hSession, NXC_ACTION *pActi
 
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   // Wait for responce
+   // Wait for response
    return ((NXCL_Session *)hSession)->WaitForRCC(dwRqId);
 }
index 4941df9..7581ce7 100644 (file)
@@ -65,7 +65,7 @@ void ProcessAlarmUpdate(NXCL_Session *pSession, CSCPMessage *pMsg)
 DWORD LIBNXCL_EXPORTABLE NXCLoadAllAlarms(NXC_SESSION hSession, BOOL bIncludeAck,
                                           DWORD *pdwNumAlarms, NXC_ALARM **ppAlarmList)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwRetCode = RCC_SUCCESS, dwNumAlarms = 0, dwAlarmId = 0;
    NXC_ALARM *pList = NULL;
 
@@ -78,18 +78,18 @@ DWORD LIBNXCL_EXPORTABLE NXCLoadAllAlarms(NXC_SESSION hSession, BOOL bIncludeAck
 
    do
    {
-      pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_ALARM_DATA, dwRqId);
-      if (pResponce != NULL)
+      pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_ALARM_DATA, dwRqId);
+      if (pResponse != NULL)
       {
-         dwAlarmId = pResponce->GetVariableLong(VID_ALARM_ID);
+         dwAlarmId = pResponse->GetVariableLong(VID_ALARM_ID);
          if (dwAlarmId != 0)  // 0 is end of list indicator
          {
             pList = (NXC_ALARM *)realloc(pList, sizeof(NXC_ALARM) * (dwNumAlarms + 1));
             pList[dwNumAlarms].dwAlarmId = dwAlarmId;
-            AlarmFromMsg(pResponce, &pList[dwNumAlarms]);
+            AlarmFromMsg(pResponse, &pList[dwNumAlarms]);
             dwNumAlarms++;
          }
-         delete pResponce;
+         delete pResponse;
       }
       else
       {
index 215f466..e6a6abe 100644 (file)
@@ -118,11 +118,11 @@ THREAD_RESULT THREAD_CALL NetReceiver(NXCL_Session *pSession)
             case CMD_REQUEST_SESSION_KEY:
                if (pSession->m_pCtx == NULL)
                {
-                  CSCPMessage *pResponce;
+                  CSCPMessage *pResponse;
 
-                  SetupEncryptionContext(pMsg, &pSession->m_pCtx, &pResponce, NULL);
-                  pSession->SendMsg(pResponce);
-                  delete pResponce;
+                  SetupEncryptionContext(pMsg, &pSession->m_pCtx, &pResponse, NULL);
+                  pSession->SendMsg(pResponse);
+                  delete pResponse;
                }
             case CMD_OBJECT:        // Object information
             case CMD_OBJECT_UPDATE:
@@ -256,7 +256,7 @@ DWORD LIBNXCL_EXPORTABLE NXCConnect(TCHAR *pszServer, TCHAR *pszLogin,
             msg.SetCode(CMD_GET_SERVER_INFO);
             if (pSession->SendMsg(&msg))
             {
-               // Receive responce message
+               // Receive response message
                pResp = pSession->WaitForMessage(CMD_REQUEST_COMPLETED, msg.GetId());
                if (pResp != NULL)
                {
@@ -317,7 +317,7 @@ DWORD LIBNXCL_EXPORTABLE NXCConnect(TCHAR *pszServer, TCHAR *pszLogin,
 
                         if (pSession->SendMsg(&msg))
                         {
-                           // Receive responce message
+                           // Receive response message
                            pResp = pSession->WaitForMessage(CMD_LOGIN_RESP, msg.GetId());
                            if (pResp != NULL)
                            {
index 5dbcffc..96ad27d 100644 (file)
@@ -76,7 +76,7 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateNewDCI(NXC_SESSION hSession, NXC_DCI_LIST *pIt
                                          DWORD *pdwItemId)
 {
    DWORD dwRetCode, dwRqId;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
 
@@ -85,13 +85,13 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateNewDCI(NXC_SESSION hSession, NXC_DCI_LIST *pIt
    msg.SetVariable(VID_OBJECT_ID, pItemList->dwNodeId);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
-         *pdwItemId = pResponce->GetVariableLong(VID_DCI_ID);
+         *pdwItemId = pResponse->GetVariableLong(VID_DCI_ID);
 
          // Create new entry in list
          pItemList->pItems = (NXC_DCI *)realloc(pItemList->pItems, 
@@ -104,7 +104,7 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateNewDCI(NXC_SESSION hSession, NXC_DCI_LIST *pIt
          pItemList->pItems[pItemList->dwNumItems].iDeltaCalculation = DCM_ORIGINAL_VALUE;
          pItemList->dwNumItems++;
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
@@ -122,7 +122,7 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateNewDCI(NXC_SESSION hSession, NXC_DCI_LIST *pIt
 DWORD LIBNXCL_EXPORTABLE NXCUpdateDCI(NXC_SESSION hSession, DWORD dwNodeId, NXC_DCI *pItem)
 {
    DWORD i, dwId, dwRqId, dwRetCode;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DCI_THRESHOLD dct;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -173,29 +173,29 @@ DWORD LIBNXCL_EXPORTABLE NXCUpdateDCI(NXC_SESSION hSession, DWORD dwNodeId, NXC_
    }
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
          DWORD dwNumMaps, *pdwMapId, *pdwMapIndex;
 
          // Get index to id mapping for newly created thresholds
-         dwNumMaps = pResponce->GetVariableLong(VID_DCI_NUM_MAPS);
+         dwNumMaps = pResponse->GetVariableLong(VID_DCI_NUM_MAPS);
          if (dwNumMaps > 0)
          {
             pdwMapId = (DWORD *)malloc(sizeof(DWORD) * dwNumMaps);
             pdwMapIndex = (DWORD *)malloc(sizeof(DWORD) * dwNumMaps);
-            pResponce->GetVariableBinary(VID_DCI_MAP_IDS, (BYTE *)pdwMapId, sizeof(DWORD) * dwNumMaps);
-            pResponce->GetVariableBinary(VID_DCI_MAP_INDEXES, (BYTE *)pdwMapIndex, sizeof(DWORD) * dwNumMaps);
+            pResponse->GetVariableBinary(VID_DCI_MAP_IDS, (BYTE *)pdwMapId, sizeof(DWORD) * dwNumMaps);
+            pResponse->GetVariableBinary(VID_DCI_MAP_INDEXES, (BYTE *)pdwMapIndex, sizeof(DWORD) * dwNumMaps);
             for(i = 0; i < dwNumMaps; i++)
                pItem->pThresholdList[ntohl(pdwMapIndex[i])].dwId = ntohl(pdwMapId[i]);
             free(pdwMapId);
             free(pdwMapIndex);
          }
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
@@ -488,7 +488,7 @@ DWORD LIBNXCL_EXPORTABLE NXCQueryParameter(NXC_SESSION hSession, DWORD dwNodeId,
                                            TCHAR *pszParameter, TCHAR *pszBuffer, 
                                            DWORD dwBufferSize)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwResult;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -500,12 +500,12 @@ DWORD LIBNXCL_EXPORTABLE NXCQueryParameter(NXC_SESSION hSession, DWORD dwNodeId,
    msg.SetVariable(VID_NAME, pszParameter);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 120000);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 120000);
+   if (pResponse != NULL)
    {
-      dwResult = pResponce->GetVariableLong(VID_RCC);
+      dwResult = pResponse->GetVariableLong(VID_RCC);
       if (dwResult == RCC_SUCCESS)
-         pResponce->GetVariableStr(VID_VALUE, pszBuffer, dwBufferSize);
+         pResponse->GetVariableStr(VID_VALUE, pszBuffer, dwBufferSize);
    }
    else
    {
@@ -522,7 +522,7 @@ DWORD LIBNXCL_EXPORTABLE NXCQueryParameter(NXC_SESSION hSession, DWORD dwNodeId,
 DWORD LIBNXCL_EXPORTABLE NXCGetLastValues(NXC_SESSION hSession, DWORD dwNodeId,
                                           DWORD *pdwNumItems, NXC_DCI_VALUE **ppValueList)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD i, dwId, dwRqId, dwResult;
 
    *pdwNumItems = 0;
@@ -535,24 +535,24 @@ DWORD LIBNXCL_EXPORTABLE NXCGetLastValues(NXC_SESSION hSession, DWORD dwNodeId,
    msg.SetVariable(VID_OBJECT_ID, dwNodeId);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwResult = pResponce->GetVariableLong(VID_RCC);
+      dwResult = pResponse->GetVariableLong(VID_RCC);
       if (dwResult == RCC_SUCCESS)
       {
-         *pdwNumItems = pResponce->GetVariableLong(VID_NUM_ITEMS);
+         *pdwNumItems = pResponse->GetVariableLong(VID_NUM_ITEMS);
          *ppValueList = (NXC_DCI_VALUE *)malloc(sizeof(NXC_DCI_VALUE) * (*pdwNumItems));
          memset(*ppValueList, 0, sizeof(NXC_DCI_VALUE) * (*pdwNumItems));
          for(i = 0, dwId = VID_DCI_VALUES_BASE; i < *pdwNumItems; i++)
          {
-            (*ppValueList)[i].dwId = pResponce->GetVariableLong(dwId++);
-            pResponce->GetVariableStr(dwId++, (*ppValueList)[i].szName, MAX_ITEM_NAME);
-            pResponce->GetVariableStr(dwId++, (*ppValueList)[i].szDescription, MAX_DB_STRING);
-            (*ppValueList)[i].iSource = pResponce->GetVariableShort(dwId++);
-            (*ppValueList)[i].iDataType = pResponce->GetVariableShort(dwId++);
-            pResponce->GetVariableStr(dwId++, (*ppValueList)[i].szValue, MAX_DB_STRING);
-            (*ppValueList)[i].dwTimestamp = pResponce->GetVariableLong(dwId++);
+            (*ppValueList)[i].dwId = pResponse->GetVariableLong(dwId++);
+            pResponse->GetVariableStr(dwId++, (*ppValueList)[i].szName, MAX_ITEM_NAME);
+            pResponse->GetVariableStr(dwId++, (*ppValueList)[i].szDescription, MAX_DB_STRING);
+            (*ppValueList)[i].iSource = pResponse->GetVariableShort(dwId++);
+            (*ppValueList)[i].iDataType = pResponse->GetVariableShort(dwId++);
+            pResponse->GetVariableStr(dwId++, (*ppValueList)[i].szValue, MAX_DB_STRING);
+            (*ppValueList)[i].dwTimestamp = pResponse->GetVariableLong(dwId++);
          }
       }
    }
index 9db1a25..c27446c 100644 (file)
@@ -50,7 +50,7 @@ void LIBNXCL_EXPORTABLE NXCDestroyEventPolicy(NXC_EPP *pEventPolicy)
 
 DWORD LIBNXCL_EXPORTABLE NXCOpenEventPolicy(NXC_SESSION hSession, NXC_EPP **ppEventPolicy)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD i, dwRqId, dwRetCode;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -61,66 +61,66 @@ DWORD LIBNXCL_EXPORTABLE NXCOpenEventPolicy(NXC_SESSION hSession, NXC_EPP **ppEv
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
    // Wait for reply
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
          // Prepare event policy structure
          *ppEventPolicy = (NXC_EPP *)malloc(sizeof(NXC_EPP));
-         (*ppEventPolicy)->dwNumRules = pResponce->GetVariableLong(VID_NUM_RULES);
+         (*ppEventPolicy)->dwNumRules = pResponse->GetVariableLong(VID_NUM_RULES);
          (*ppEventPolicy)->pRuleList = 
             (NXC_EPP_RULE *)malloc(sizeof(NXC_EPP_RULE) * (*ppEventPolicy)->dwNumRules);
          memset((*ppEventPolicy)->pRuleList, 0, sizeof(NXC_EPP_RULE) * (*ppEventPolicy)->dwNumRules);
-         delete pResponce;
+         delete pResponse;
 
          // Receive policy rules, each in separate message
          for(i = 0; i < (*ppEventPolicy)->dwNumRules; i++)
          {
-            pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_EPP_RECORD, dwRqId);
-            if (pResponce != NULL)
+            pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_EPP_RECORD, dwRqId);
+            if (pResponse != NULL)
             {
-               (*ppEventPolicy)->pRuleList[i].dwFlags = pResponce->GetVariableLong(VID_FLAGS);
-               (*ppEventPolicy)->pRuleList[i].dwId = pResponce->GetVariableLong(VID_RULE_ID);
-               (*ppEventPolicy)->pRuleList[i].pszComment = pResponce->GetVariableStr(VID_COMMENT);
+               (*ppEventPolicy)->pRuleList[i].dwFlags = pResponse->GetVariableLong(VID_FLAGS);
+               (*ppEventPolicy)->pRuleList[i].dwId = pResponse->GetVariableLong(VID_RULE_ID);
+               (*ppEventPolicy)->pRuleList[i].pszComment = pResponse->GetVariableStr(VID_COMMENT);
 
                (*ppEventPolicy)->pRuleList[i].dwNumActions = 
-                  pResponce->GetVariableLong(VID_NUM_ACTIONS);
+                  pResponse->GetVariableLong(VID_NUM_ACTIONS);
                (*ppEventPolicy)->pRuleList[i].pdwActionList = 
                   (DWORD *)malloc(sizeof(DWORD) * (*ppEventPolicy)->pRuleList[i].dwNumActions);
-               pResponce->GetVariableInt32Array(VID_RULE_ACTIONS, 
+               pResponse->GetVariableInt32Array(VID_RULE_ACTIONS, 
                                                 (*ppEventPolicy)->pRuleList[i].dwNumActions,
                                                 (*ppEventPolicy)->pRuleList[i].pdwActionList);
 
                (*ppEventPolicy)->pRuleList[i].dwNumEvents = 
-                  pResponce->GetVariableLong(VID_NUM_EVENTS);
+                  pResponse->GetVariableLong(VID_NUM_EVENTS);
                (*ppEventPolicy)->pRuleList[i].pdwEventList = 
                   (DWORD *)malloc(sizeof(DWORD) * (*ppEventPolicy)->pRuleList[i].dwNumEvents);
-               pResponce->GetVariableInt32Array(VID_RULE_EVENTS, 
+               pResponse->GetVariableInt32Array(VID_RULE_EVENTS, 
                                                 (*ppEventPolicy)->pRuleList[i].dwNumEvents,
                                                 (*ppEventPolicy)->pRuleList[i].pdwEventList);
 
                (*ppEventPolicy)->pRuleList[i].dwNumSources = 
-                  pResponce->GetVariableLong(VID_NUM_SOURCES);
+                  pResponse->GetVariableLong(VID_NUM_SOURCES);
                (*ppEventPolicy)->pRuleList[i].pdwSourceList = 
                   (DWORD *)malloc(sizeof(DWORD) * (*ppEventPolicy)->pRuleList[i].dwNumSources);
-               pResponce->GetVariableInt32Array(VID_RULE_SOURCES, 
+               pResponse->GetVariableInt32Array(VID_RULE_SOURCES, 
                                                 (*ppEventPolicy)->pRuleList[i].dwNumSources,
                                                 (*ppEventPolicy)->pRuleList[i].pdwSourceList);
 
-               pResponce->GetVariableStr(VID_ALARM_KEY, 
+               pResponse->GetVariableStr(VID_ALARM_KEY, 
                                          (*ppEventPolicy)->pRuleList[i].szAlarmKey,
                                          MAX_DB_STRING);
-               pResponce->GetVariableStr(VID_ALARM_ACK_KEY, 
+               pResponse->GetVariableStr(VID_ALARM_ACK_KEY, 
                                          (*ppEventPolicy)->pRuleList[i].szAlarmAckKey,
                                          MAX_DB_STRING);
-               pResponce->GetVariableStr(VID_ALARM_MESSAGE, 
+               pResponse->GetVariableStr(VID_ALARM_MESSAGE, 
                                          (*ppEventPolicy)->pRuleList[i].szAlarmMessage,
                                          MAX_DB_STRING);
-               (*ppEventPolicy)->pRuleList[i].wAlarmSeverity = pResponce->GetVariableShort(VID_ALARM_SEVERITY);
+               (*ppEventPolicy)->pRuleList[i].wAlarmSeverity = pResponse->GetVariableShort(VID_ALARM_SEVERITY);
 
-               delete pResponce;
+               delete pResponse;
             }
             else
             {
@@ -135,7 +135,7 @@ DWORD LIBNXCL_EXPORTABLE NXCOpenEventPolicy(NXC_SESSION hSession, NXC_EPP **ppEv
       }
       else
       {
-         delete pResponce;
+         delete pResponse;
       }
    }
    else
@@ -183,7 +183,7 @@ DWORD LIBNXCL_EXPORTABLE NXCSaveEventPolicy(NXC_SESSION hSession, NXC_EPP *pEven
    msg.SetId(dwRqId);
    msg.SetVariable(VID_NUM_RULES, pEventPolicy->dwNumRules);
 
-   // Send message and wait for responce
+   // Send message and wait for response
    ((NXCL_Session *)hSession)->SendMsg(&msg);
    dwRetCode = ((NXCL_Session *)hSession)->WaitForRCC(dwRqId);
    if (dwRetCode == RCC_SUCCESS)
index 5849912..4a4d790 100644 (file)
@@ -156,7 +156,7 @@ DWORD LIBNXCL_EXPORTABLE NXCDeleteEventTemplate(NXC_SESSION hSession, DWORD dwEv
 
 DWORD LIBNXCL_EXPORTABLE NXCGenerateEventCode(NXC_SESSION hSession, DWORD *pdwEventCode)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwRetCode;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -167,12 +167,12 @@ DWORD LIBNXCL_EXPORTABLE NXCGenerateEventCode(NXC_SESSION hSession, DWORD *pdwEv
    ((NXCL_Session *)hSession)->SendMsg(&msg);
    
    // Wait for reply
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
-         *pdwEventCode = pResponce->GetVariableLong(VID_EVENT_CODE);
+         *pdwEventCode = pResponse->GetVariableLong(VID_EVENT_CODE);
    }
    else
    {
index 265c612..7b6cbfb 100644 (file)
@@ -32,7 +32,7 @@ DWORD LIBNXCL_EXPORTABLE NXCLoadImageFile(NXC_SESSION hSession, DWORD dwImageId,
                                           TCHAR *pszCacheDir, WORD wFormat)
 {
    DWORD i, dwRqId, dwRetCode, dwFileSize, dwNumBytes;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    BYTE *pBuffer;
    TCHAR cLastChar, szFileName[MAX_PATH];
    FILE *hFile;
@@ -46,17 +46,17 @@ DWORD LIBNXCL_EXPORTABLE NXCLoadImageFile(NXC_SESSION hSession, DWORD dwImageId,
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
    // Loading  file can take time, so we use 60 sec. timeout instead of default
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_IMAGE_FILE, dwRqId, 60000);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_IMAGE_FILE, dwRqId, 60000);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
-         dwFileSize = pResponce->GetVariableLong(VID_IMAGE_FILE_SIZE);
+         dwFileSize = pResponse->GetVariableLong(VID_IMAGE_FILE_SIZE);
          pBuffer = (BYTE *)malloc(dwFileSize);
          if (pBuffer != NULL)
          {
-            pResponce->GetVariableBinary(VID_IMAGE_FILE, pBuffer, dwFileSize);
+            pResponse->GetVariableBinary(VID_IMAGE_FILE, pBuffer, dwFileSize);
             cLastChar = pszCacheDir[_tcslen(pszCacheDir) - 1];
             _stprintf(szFileName, _T("%s%s%08x.%s"), pszCacheDir, 
                     (cLastChar == _T('\\')) || (cLastChar == _T('/')) ? _T("") : FS_PATH_SEPARATOR, 
@@ -85,7 +85,7 @@ DWORD LIBNXCL_EXPORTABLE NXCLoadImageFile(NXC_SESSION hSession, DWORD dwImageId,
             dwRetCode = RCC_OUT_OF_MEMORY;
          }
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
@@ -126,7 +126,7 @@ DWORD LIBNXCL_EXPORTABLE NXCSyncImages(NXC_SESSION hSession, NXC_IMAGE_LIST **pp
                                        TCHAR *pszCacheDir, WORD wFormat)
 {
    DWORD i, dwRqId, dwRetCode;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
 
@@ -135,19 +135,19 @@ DWORD LIBNXCL_EXPORTABLE NXCSyncImages(NXC_SESSION hSession, NXC_IMAGE_LIST **pp
    msg.SetVariable(VID_IMAGE_FORMAT, wFormat);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_IMAGE_LIST, dwRqId, 
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_IMAGE_LIST, dwRqId, 
                                   ((NXCL_Session *)hSession)->m_dwCommandTimeout * 2);
-   if (pResponce != NULL)
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
          *ppImageList = (NXC_IMAGE_LIST *)malloc(sizeof(NXC_IMAGE_LIST));
-         (*ppImageList)->dwNumImages = pResponce->GetVariableLong(VID_NUM_IMAGES);
+         (*ppImageList)->dwNumImages = pResponse->GetVariableLong(VID_NUM_IMAGES);
          if ((*ppImageList)->dwNumImages > 0)
          {
             (*ppImageList)->pImageList = (NXC_IMAGE *)malloc(sizeof(NXC_IMAGE) * (*ppImageList)->dwNumImages);
-            pResponce->GetVariableBinary(VID_IMAGE_LIST, (BYTE *)(*ppImageList)->pImageList, 
+            pResponse->GetVariableBinary(VID_IMAGE_LIST, (BYTE *)(*ppImageList)->pImageList, 
                                          sizeof(NXC_IMAGE) * (*ppImageList)->dwNumImages);
             for(i = 0; i < (*ppImageList)->dwNumImages; i++)
             {
@@ -167,7 +167,7 @@ DWORD LIBNXCL_EXPORTABLE NXCSyncImages(NXC_SESSION hSession, NXC_IMAGE_LIST **pp
             (*ppImageList)->pImageList = NULL;
          }
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
@@ -199,7 +199,7 @@ void LIBNXCL_EXPORTABLE NXCDestroyImageList(NXC_IMAGE_LIST *pImageList)
 DWORD LIBNXCL_EXPORTABLE NXCLoadDefaultImageList(NXC_SESSION hSession, DWORD *pdwListSize, 
                                                  DWORD **ppdwClassId, DWORD **ppdwImageId)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRetCode, dwRqId;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -208,19 +208,19 @@ DWORD LIBNXCL_EXPORTABLE NXCLoadDefaultImageList(NXC_SESSION hSession, DWORD *pd
    msg.SetId(dwRqId);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_DEFAULT_IMAGE_LIST, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_DEFAULT_IMAGE_LIST, dwRqId);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
-         *pdwListSize = pResponce->GetVariableLong(VID_NUM_IMAGES);
+         *pdwListSize = pResponse->GetVariableLong(VID_NUM_IMAGES);
          *ppdwClassId = (DWORD *)malloc(sizeof(DWORD) * *pdwListSize);
          *ppdwImageId = (DWORD *)malloc(sizeof(DWORD) * *pdwListSize);
-         pResponce->GetVariableInt32Array(VID_CLASS_ID_LIST, *pdwListSize, *ppdwClassId);
-         pResponce->GetVariableInt32Array(VID_IMAGE_ID_LIST, *pdwListSize, *ppdwImageId);
+         pResponse->GetVariableInt32Array(VID_CLASS_ID_LIST, *pdwListSize, *ppdwClassId);
+         pResponse->GetVariableInt32Array(VID_IMAGE_ID_LIST, *pdwListSize, *ppdwImageId);
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
index 615bd8e..22232ce 100644 (file)
@@ -35,7 +35,7 @@
 DWORD LIBNXCL_EXPORTABLE NXCGetMIBList(NXC_SESSION hSession, NXC_MIB_LIST **ppMibList)
 {
    DWORD i, dwRqId, dwRetCode, dwId1, dwId2;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
 
@@ -43,22 +43,22 @@ DWORD LIBNXCL_EXPORTABLE NXCGetMIBList(NXC_SESSION hSession, NXC_MIB_LIST **ppMi
    msg.SetId(dwRqId);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_MIB_LIST, dwRqId, 
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_MIB_LIST, dwRqId, 
                                        ((NXCL_Session *)hSession)->m_dwCommandTimeout * 2);
-   if (pResponce != NULL)
+   if (pResponse != NULL)
    {
       *ppMibList = (NXC_MIB_LIST *)malloc(sizeof(NXC_MIB_LIST));
-      (*ppMibList)->dwNumFiles = pResponce->GetVariableLong(VID_NUM_MIBS);
+      (*ppMibList)->dwNumFiles = pResponse->GetVariableLong(VID_NUM_MIBS);
       (*ppMibList)->ppszName = (TCHAR **)malloc(sizeof(TCHAR *) * (*ppMibList)->dwNumFiles);
       (*ppMibList)->ppHash = (BYTE **)malloc(sizeof(BYTE *) * (*ppMibList)->dwNumFiles);
       for(i = 0, dwId1 = VID_MIB_NAME_BASE, dwId2 = VID_MIB_HASH_BASE; 
           i < (*ppMibList)->dwNumFiles; i++, dwId1++, dwId2++)
       {
-         (*ppMibList)->ppszName[i] = pResponce->GetVariableStr(dwId1);
+         (*ppMibList)->ppszName[i] = pResponse->GetVariableStr(dwId1);
          (*ppMibList)->ppHash[i] = (BYTE *)malloc(MD5_DIGEST_SIZE);
-         pResponce->GetVariableBinary(dwId2, (*ppMibList)->ppHash[i], MD5_DIGEST_SIZE);
+         pResponse->GetVariableBinary(dwId2, (*ppMibList)->ppHash[i], MD5_DIGEST_SIZE);
       }
-      delete pResponce;
+      delete pResponse;
       dwRetCode = RCC_SUCCESS;
    }
    else
@@ -96,7 +96,7 @@ void LIBNXCL_EXPORTABLE NXCDestroyMIBList(NXC_MIB_LIST *pMibList)
 DWORD LIBNXCL_EXPORTABLE NXCDownloadMIBFile(NXC_SESSION hSession, TCHAR *pszName, TCHAR *pszDestDir)
 {
    DWORD i, dwRqId, dwRetCode, dwFileSize, dwNumBytes;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    BYTE *pBuffer;
    TCHAR cLastChar, szFileName[MAX_PATH];
    FILE *hFile;
@@ -109,17 +109,17 @@ DWORD LIBNXCL_EXPORTABLE NXCDownloadMIBFile(NXC_SESSION hSession, TCHAR *pszName
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
    // Loading file can take time, so timeout is 60 sec. instead of default
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_MIB, dwRqId, 60000);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_MIB, dwRqId, 60000);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
-         dwFileSize = pResponce->GetVariableLong(VID_MIB_FILE_SIZE);
+         dwFileSize = pResponse->GetVariableLong(VID_MIB_FILE_SIZE);
          pBuffer = (BYTE *)malloc(dwFileSize);
          if (pBuffer != NULL)
          {
-            pResponce->GetVariableBinary(VID_MIB_FILE, pBuffer, dwFileSize);
+            pResponse->GetVariableBinary(VID_MIB_FILE, pBuffer, dwFileSize);
             cLastChar = pszDestDir[_tcslen(pszDestDir) - 1];
             _stprintf(szFileName, _T("%s%s%s"), pszDestDir, 
                     (cLastChar == _T('\\')) || (cLastChar == _T('/')) ? _T("") : _T("/"), pszName);
@@ -144,7 +144,7 @@ DWORD LIBNXCL_EXPORTABLE NXCDownloadMIBFile(NXC_SESSION hSession, TCHAR *pszName
             dwRetCode = RCC_OUT_OF_MEMORY;
          }
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
index 1111886..d2c8160 100644 (file)
@@ -44,7 +44,7 @@ void DestroyObject(NXC_OBJECT *pObject)
          break;
       case OBJECT_NETWORKSERVICE:
          safe_free(pObject->netsrv.pszRequest);
-         safe_free(pObject->netsrv.pszResponce);
+         safe_free(pObject->netsrv.pszResponse);
          break;
       case OBJECT_ZONE:
          safe_free(pObject->zone.pszDescription);
@@ -148,7 +148,7 @@ static void ReplaceObject(NXC_OBJECT *pObject, NXC_OBJECT *pNewObject)
          break;
       case OBJECT_NETWORKSERVICE:
          safe_free(pObject->netsrv.pszRequest);
-         safe_free(pObject->netsrv.pszResponce);
+         safe_free(pObject->netsrv.pszResponse);
          break;
       case OBJECT_ZONE:
          safe_free(pObject->zone.pszDescription);
@@ -255,7 +255,7 @@ static NXC_OBJECT *NewObjectFromMsg(CSCPMessage *pMsg)
          pObject->netsrv.wPort = pMsg->GetVariableShort(VID_IP_PORT);
          pObject->netsrv.dwPollerNode = pMsg->GetVariableLong(VID_POLLER_NODE_ID);
          pObject->netsrv.pszRequest = pMsg->GetVariableStr(VID_SERVICE_REQUEST);
-         pObject->netsrv.pszResponce = pMsg->GetVariableStr(VID_SERVICE_RESPONCE);
+         pObject->netsrv.pszResponse = pMsg->GetVariableStr(VID_SERVICE_RESPONSE);
          break;
       case OBJECT_ZONE:
          pObject->zone.dwZoneGUID = pMsg->GetVariableLong(VID_ZONE_GUID);
@@ -602,8 +602,8 @@ DWORD LIBNXCL_EXPORTABLE NXCModifyObject(NXC_SESSION hSession, NXC_OBJECT_UPDATE
       msg.SetVariable(VID_DESCRIPTION, pUpdate->pszDescription);
    if (pUpdate->dwFlags & OBJ_UPDATE_CHECK_REQUEST)
       msg.SetVariable(VID_SERVICE_REQUEST, pUpdate->pszRequest);
-   if (pUpdate->dwFlags & OBJ_UPDATE_CHECK_RESPONCE)
-      msg.SetVariable(VID_SERVICE_RESPONCE, pUpdate->pszResponce);
+   if (pUpdate->dwFlags & OBJ_UPDATE_CHECK_RESPONSE)
+      msg.SetVariable(VID_SERVICE_RESPONSE, pUpdate->pszResponse);
    if (pUpdate->dwFlags & OBJ_UPDATE_IP_PROTO)
       msg.SetVariable(VID_IP_PROTO, pUpdate->wProto);
    if (pUpdate->dwFlags & OBJ_UPDATE_IP_PORT)
@@ -685,7 +685,7 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateObject(NXC_SESSION hSession,
                                          NXC_OBJECT_CREATE_INFO *pCreateInfo, 
                                          DWORD *pdwObjectId)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwRetCode;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -714,7 +714,7 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateObject(NXC_SESSION hSession,
          msg.SetVariable(VID_IP_PROTO, pCreateInfo->cs.netsrv.wProto);
          msg.SetVariable(VID_IP_PORT, pCreateInfo->cs.netsrv.wPort);
          msg.SetVariable(VID_SERVICE_REQUEST, pCreateInfo->cs.netsrv.pszRequest);
-         msg.SetVariable(VID_SERVICE_RESPONCE, pCreateInfo->cs.netsrv.pszResponce);
+         msg.SetVariable(VID_SERVICE_RESPONSE, pCreateInfo->cs.netsrv.pszResponse);
          break;
       default:
          break;
@@ -723,17 +723,17 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateObject(NXC_SESSION hSession,
    // Send request
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   // Wait for responce. Creating node object can include polling,
+   // Wait for response. Creating node object can include polling,
    // which can take a minute or even more in worst cases
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 120000);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 120000);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
-         *pdwObjectId = pResponce->GetVariableLong(VID_OBJECT_ID);
+         *pdwObjectId = pResponse->GetVariableLong(VID_OBJECT_ID);
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
@@ -838,7 +838,7 @@ DWORD LIBNXCL_EXPORTABLE NXCDeleteObject(NXC_SESSION hSession, DWORD dwObject)
 
 DWORD LIBNXCL_EXPORTABLE NXCLoadCCList(NXC_SESSION hSession, NXC_CC_LIST **ppList)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwRetCode = RCC_SUCCESS, dwNumCats = 0, dwCatId = 0;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -853,24 +853,24 @@ DWORD LIBNXCL_EXPORTABLE NXCLoadCCList(NXC_SESSION hSession, NXC_CC_LIST **ppLis
 
    do
    {
-      pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_CONTAINER_CAT_DATA, dwRqId);
-      if (pResponce != NULL)
+      pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_CONTAINER_CAT_DATA, dwRqId);
+      if (pResponse != NULL)
       {
-         dwCatId = pResponce->GetVariableLong(VID_CATEGORY_ID);
+         dwCatId = pResponse->GetVariableLong(VID_CATEGORY_ID);
          if (dwCatId != 0)  // 0 is end of list indicator
          {
             (*ppList)->pElements = (NXC_CONTAINER_CATEGORY *)realloc((*ppList)->pElements, 
                sizeof(NXC_CONTAINER_CATEGORY) * ((*ppList)->dwNumElements + 1));
             (*ppList)->pElements[(*ppList)->dwNumElements].dwId = dwCatId;
             (*ppList)->pElements[(*ppList)->dwNumElements].dwImageId =
-               pResponce->GetVariableLong(VID_IMAGE_ID);
-            pResponce->GetVariableStr(VID_CATEGORY_NAME, 
+               pResponse->GetVariableLong(VID_IMAGE_ID);
+            pResponse->GetVariableStr(VID_CATEGORY_NAME, 
                (*ppList)->pElements[(*ppList)->dwNumElements].szName, MAX_OBJECT_NAME);
             (*ppList)->pElements[(*ppList)->dwNumElements].pszDescription =
-               pResponce->GetVariableStr(VID_DESCRIPTION);
+               pResponse->GetVariableStr(VID_DESCRIPTION);
             (*ppList)->dwNumElements++;
          }
-         delete pResponce;
+         delete pResponse;
       }
       else
       {
@@ -918,7 +918,7 @@ DWORD LIBNXCL_EXPORTABLE NXCPollNode(NXC_SESSION hSession, DWORD dwObjectId, int
                                      void (* pfCallback)(TCHAR *, void *), void *pArg)
 {
    DWORD dwRetCode, dwRqId;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    TCHAR *pszMsg;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -932,17 +932,17 @@ DWORD LIBNXCL_EXPORTABLE NXCPollNode(NXC_SESSION hSession, DWORD dwObjectId, int
    do
    {
       // Polls can take a long time, so we wait up to 120 seconds for each message
-      pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_POLLING_INFO, dwRqId, 120000);
-      if (pResponce != NULL)
+      pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_POLLING_INFO, dwRqId, 120000);
+      if (pResponse != NULL)
       {
-         dwRetCode = pResponce->GetVariableLong(VID_RCC);
+         dwRetCode = pResponse->GetVariableLong(VID_RCC);
          if ((dwRetCode == RCC_OPERATION_IN_PROGRESS) && (pfCallback != NULL))
          {
-            pszMsg = pResponce->GetVariableStr(VID_POLLER_MESSAGE);
+            pszMsg = pResponse->GetVariableStr(VID_POLLER_MESSAGE);
             pfCallback(pszMsg, pArg);
             free(pszMsg);
          }
-         delete pResponce;
+         delete pResponse;
       }
       else
       {
@@ -982,7 +982,7 @@ DWORD LIBNXCL_EXPORTABLE NXCGetSupportedParameters(NXC_SESSION hSession, DWORD d
                                                    DWORD *pdwNumParams, 
                                                    NXC_AGENT_PARAM **ppParamList)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD i, dwId, dwRqId, dwRetCode;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -998,23 +998,23 @@ DWORD LIBNXCL_EXPORTABLE NXCGetSupportedParameters(NXC_SESSION hSession, DWORD d
    // Send request
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   // Wait for responce
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   // Wait for response
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
-         *pdwNumParams = pResponce->GetVariableLong(VID_NUM_PARAMETERS);
+         *pdwNumParams = pResponse->GetVariableLong(VID_NUM_PARAMETERS);
          *ppParamList = (NXC_AGENT_PARAM *)malloc(sizeof(NXC_AGENT_PARAM) * *pdwNumParams);
          for(i = 0, dwId = VID_PARAM_LIST_BASE; i < *pdwNumParams; i++)
          {
-            pResponce->GetVariableStr(dwId++, (*ppParamList)[i].szName, MAX_PARAM_NAME);
-            pResponce->GetVariableStr(dwId++, (*ppParamList)[i].szDescription, MAX_DB_STRING);
-            (*ppParamList)[i].iDataType = (int)pResponce->GetVariableShort(dwId++);
+            pResponse->GetVariableStr(dwId++, (*ppParamList)[i].szName, MAX_PARAM_NAME);
+            pResponse->GetVariableStr(dwId++, (*ppParamList)[i].szDescription, MAX_DB_STRING);
+            (*ppParamList)[i].iDataType = (int)pResponse->GetVariableShort(dwId++);
          }
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
@@ -1134,9 +1134,9 @@ DWORD LIBNXCL_EXPORTABLE NXCSaveObjectCache(NXC_SESSION hSession, TCHAR *pszFile
                fwrite(&dwSize, 1, sizeof(DWORD), hFile);
                fwrite(pList[i].pObject->netsrv.pszRequest, 1, dwSize, hFile);
 
-               dwSize = _tcslen(pList[i].pObject->netsrv.pszResponce) * sizeof(TCHAR);
+               dwSize = _tcslen(pList[i].pObject->netsrv.pszResponse) * sizeof(TCHAR);
                fwrite(&dwSize, 1, sizeof(DWORD), hFile);
-               fwrite(pList[i].pObject->netsrv.pszResponce, 1, dwSize, hFile);
+               fwrite(pList[i].pObject->netsrv.pszResponse, 1, dwSize, hFile);
                break;
             case OBJECT_ZONE:
                dwSize = _tcslen(pList[i].pObject->zone.pszDescription) * sizeof(TCHAR);
@@ -1235,9 +1235,9 @@ void NXCL_Session::LoadObjectsFromCache(TCHAR *pszFile)
                         object.netsrv.pszRequest[dwSize / sizeof(TCHAR)] = 0;
 
                         fread(&dwSize, 1, sizeof(DWORD), hFile);
-                        object.netsrv.pszResponce = (TCHAR *)malloc(dwSize + sizeof(TCHAR));
-                        fread(object.netsrv.pszResponce, 1, dwSize, hFile);
-                        object.netsrv.pszResponce[dwSize / sizeof(TCHAR)] = 0;
+                        object.netsrv.pszResponse = (TCHAR *)malloc(dwSize + sizeof(TCHAR));
+                        fread(object.netsrv.pszResponse, 1, dwSize, hFile);
+                        object.netsrv.pszResponse[dwSize / sizeof(TCHAR)] = 0;
                         break;
                      case OBJECT_ZONE:
                         fread(&dwSize, 1, sizeof(DWORD), hFile);
@@ -1310,7 +1310,7 @@ DWORD LIBNXCL_EXPORTABLE NXCChangeNodeIP(NXC_SESSION hSession, DWORD dwNodeId, D
 DWORD LIBNXCL_EXPORTABLE NXCGetAgentConfig(NXC_SESSION hSession, DWORD dwNodeId,
                                            TCHAR **ppszConfig)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwRetCode;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -1325,16 +1325,16 @@ DWORD LIBNXCL_EXPORTABLE NXCGetAgentConfig(NXC_SESSION hSession, DWORD dwNodeId,
    // Send request
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   // Wait for responce
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 30000);
-   if (pResponce != NULL)
+   // Wait for response
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 30000);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
-         *ppszConfig = pResponce->GetVariableStr(VID_CONFIG_FILE);
+         *ppszConfig = pResponse->GetVariableStr(VID_CONFIG_FILE);
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
index ba121f2..43a730a 100644 (file)
@@ -70,7 +70,7 @@ DWORD LIBNXCL_EXPORTABLE NXCUnlockPackageDB(NXC_SESSION hSession)
 DWORD LIBNXCL_EXPORTABLE NXCGetPackageList(NXC_SESSION hSession, DWORD *pdwNumPackages, 
                                            NXC_PACKAGE_INFO **ppList)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwResult, dwRqId, dwPkgId;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -87,32 +87,32 @@ DWORD LIBNXCL_EXPORTABLE NXCGetPackageList(NXC_SESSION hSession, DWORD *pdwNumPa
       *pdwNumPackages = 0;
       do
       {
-         pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_PACKAGE_INFO, dwRqId);
-         if (pResponce != NULL)
+         pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_PACKAGE_INFO, dwRqId);
+         if (pResponse != NULL)
          {
-            dwPkgId = pResponce->GetVariableLong(VID_PACKAGE_ID);
+            dwPkgId = pResponse->GetVariableLong(VID_PACKAGE_ID);
             if (dwPkgId != 0)
             {
                *ppList = (NXC_PACKAGE_INFO *)realloc(*ppList, sizeof(NXC_PACKAGE_INFO) * (*pdwNumPackages + 1));
                (*ppList)[*pdwNumPackages].dwId = dwPkgId;
-               pResponce->GetVariableStr(VID_PACKAGE_NAME, 
+               pResponse->GetVariableStr(VID_PACKAGE_NAME, 
                                          (*ppList)[*pdwNumPackages].szName, 
                                          MAX_PACKAGE_NAME_LEN);
-               pResponce->GetVariableStr(VID_FILE_NAME, 
+               pResponse->GetVariableStr(VID_FILE_NAME, 
                                          (*ppList)[*pdwNumPackages].szFileName, 
                                          MAX_DB_STRING);
-               pResponce->GetVariableStr(VID_PLATFORM_NAME, 
+               pResponse->GetVariableStr(VID_PLATFORM_NAME, 
                                          (*ppList)[*pdwNumPackages].szPlatform, 
                                          MAX_PLATFORM_NAME_LEN);
-               pResponce->GetVariableStr(VID_PACKAGE_VERSION, 
+               pResponse->GetVariableStr(VID_PACKAGE_VERSION, 
                                          (*ppList)[*pdwNumPackages].szVersion, 
                                          MAX_AGENT_VERSION_LEN);
-               pResponce->GetVariableStr(VID_DESCRIPTION, 
+               pResponse->GetVariableStr(VID_DESCRIPTION, 
                                          (*ppList)[*pdwNumPackages].szDescription, 
                                          MAX_DB_STRING);
                (*pdwNumPackages)++;
             }
-            delete pResponce;
+            delete pResponse;
          }
          else
          {
@@ -156,7 +156,7 @@ DWORD LIBNXCL_EXPORTABLE NXCRemovePackage(NXC_SESSION hSession, DWORD dwPkgId)
 DWORD LIBNXCL_EXPORTABLE NXCInstallPackage(NXC_SESSION hSession, NXC_PACKAGE_INFO *pInfo,
                                            TCHAR *pszFullPkgPath)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwResult;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -170,17 +170,17 @@ DWORD LIBNXCL_EXPORTABLE NXCInstallPackage(NXC_SESSION hSession, NXC_PACKAGE_INF
    msg.SetVariable(VID_PACKAGE_VERSION, pInfo->szVersion);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwResult = pResponce->GetVariableLong(VID_RCC);
+      dwResult = pResponse->GetVariableLong(VID_RCC);
       if (dwResult == RCC_SUCCESS)
       {
          // Get id assigned to installed package and
          // update provided package information structure
-         pInfo->dwId = pResponce->GetVariableLong(VID_PACKAGE_ID);
+         pInfo->dwId = pResponse->GetVariableLong(VID_PACKAGE_ID);
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
index 62fc52d..84e49e9 100644 (file)
@@ -32,7 +32,7 @@ DWORD LIBNXCL_EXPORTABLE NXCGetServerVariables(NXC_SESSION hSession,
                                                NXC_SERVER_VARIABLE **ppVarList, 
                                                DWORD *pdwNumVars)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD i, dwId, dwRqId, dwRetCode;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -47,24 +47,24 @@ DWORD LIBNXCL_EXPORTABLE NXCGetServerVariables(NXC_SESSION hSession,
    // Send request
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   // Wait for responce
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 30000);
-   if (pResponce != NULL)
+   // Wait for response
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 30000);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
       {
-         *pdwNumVars = pResponce->GetVariableLong(VID_NUM_VARIABLES);
+         *pdwNumVars = pResponse->GetVariableLong(VID_NUM_VARIABLES);
          *ppVarList = (NXC_SERVER_VARIABLE *)malloc(sizeof(NXC_SERVER_VARIABLE) * (*pdwNumVars));
 
          for(i = 0, dwId = VID_VARLIST_BASE; i < *pdwNumVars; i++)
          {
-            pResponce->GetVariableStr(dwId++, (*ppVarList)[i].szName, MAX_OBJECT_NAME);
-            pResponce->GetVariableStr(dwId++, (*ppVarList)[i].szValue, MAX_DB_STRING);
-            (*ppVarList)[i].bNeedRestart = pResponce->GetVariableShort(dwId++) ? TRUE : FALSE;
+            pResponse->GetVariableStr(dwId++, (*ppVarList)[i].szName, MAX_OBJECT_NAME);
+            pResponse->GetVariableStr(dwId++, (*ppVarList)[i].szValue, MAX_DB_STRING);
+            (*ppVarList)[i].bNeedRestart = pResponse->GetVariableShort(dwId++) ? TRUE : FALSE;
          }
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
index fec6db7..7161ae2 100644 (file)
@@ -162,14 +162,14 @@ CSCP_MESSAGE *NXCL_Session::WaitForRawMessage(WORD wCode, DWORD dwId, DWORD dwTi
 
 DWORD NXCL_Session::WaitForRCC(DWORD dwRqId, DWORD dwTimeOut)
 {
-   CSCPMessage *pResponce;
+   CSCPMessage *pResponse;
    DWORD dwRetCode;
 
-   pResponce = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, dwTimeOut);
-   if (pResponce != NULL)
+   pResponse = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, dwTimeOut);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
-      delete pResponce;
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
+      delete pResponse;
    }
    else
    {
index ce060ea..6ebf4d7 100644 (file)
@@ -95,7 +95,7 @@ static void TrapCfgFromMsg(CSCPMessage *pMsg, NXC_TRAP_CFG_ENTRY *pTrap)
 
 DWORD LIBNXCL_EXPORTABLE NXCLoadTrapCfg(NXC_SESSION hSession, DWORD *pdwNumTraps, NXC_TRAP_CFG_ENTRY **ppTrapList)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwRetCode = RCC_SUCCESS, dwNumTraps = 0, dwTrapId = 0;
    NXC_TRAP_CFG_ENTRY *pList = NULL;
 
@@ -110,19 +110,19 @@ DWORD LIBNXCL_EXPORTABLE NXCLoadTrapCfg(NXC_SESSION hSession, DWORD *pdwNumTraps
    {
       do
       {
-         pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_TRAP_CFG_RECORD, dwRqId);
-         if (pResponce != NULL)
+         pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_TRAP_CFG_RECORD, dwRqId);
+         if (pResponse != NULL)
          {
-            dwTrapId = pResponce->GetVariableLong(VID_TRAP_ID);
+            dwTrapId = pResponse->GetVariableLong(VID_TRAP_ID);
             if (dwTrapId != 0)  // 0 is end of list indicator
             {
                pList = (NXC_TRAP_CFG_ENTRY *)realloc(pList, 
                            sizeof(NXC_TRAP_CFG_ENTRY) * (dwNumTraps + 1));
                pList[dwNumTraps].dwId = dwTrapId;
-               TrapCfgFromMsg(pResponce, &pList[dwNumTraps]);
+               TrapCfgFromMsg(pResponse, &pList[dwNumTraps]);
                dwNumTraps++;
             }
-            delete pResponce;
+            delete pResponse;
          }
          else
          {
@@ -198,7 +198,7 @@ DWORD LIBNXCL_EXPORTABLE NXCDeleteTrap(NXC_SESSION hSession, DWORD dwTrapId)
 
 DWORD LIBNXCL_EXPORTABLE NXCCreateTrap(NXC_SESSION hSession, DWORD *pdwTrapId)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwResult;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -207,13 +207,13 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateTrap(NXC_SESSION hSession, DWORD *pdwTrapId)
    msg.SetId(dwRqId);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwResult = pResponce->GetVariableLong(VID_RCC);
+      dwResult = pResponse->GetVariableLong(VID_RCC);
       if (dwResult == RCC_SUCCESS)
-         *pdwTrapId = pResponce->GetVariableLong(VID_TRAP_ID);
-      delete pResponce;
+         *pdwTrapId = pResponse->GetVariableLong(VID_TRAP_ID);
+      delete pResponse;
    }
    else
    {
index 317c91c..1a24e4c 100644 (file)
@@ -94,7 +94,7 @@ BOOL LIBNXCL_EXPORTABLE NXCGetUserDB(NXC_SESSION hSession, NXC_USER **ppUserList
 DWORD LIBNXCL_EXPORTABLE NXCCreateUser(NXC_SESSION hSession, TCHAR *pszName,
                                        BOOL bIsGroup, DWORD *pdwNewId)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRetCode, dwRqId;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -105,13 +105,13 @@ DWORD LIBNXCL_EXPORTABLE NXCCreateUser(NXC_SESSION hSession, TCHAR *pszName,
    msg.SetVariable(VID_IS_GROUP, (WORD)bIsGroup);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwRetCode = pResponce->GetVariableLong(VID_RCC);
+      dwRetCode = pResponse->GetVariableLong(VID_RCC);
       if (dwRetCode == RCC_SUCCESS)
-         *pdwNewId = pResponce->GetVariableLong(VID_USER_ID);
-      delete pResponce;
+         *pdwNewId = pResponse->GetVariableLong(VID_USER_ID);
+      delete pResponse;
    }
    else
    {
@@ -214,7 +214,7 @@ DWORD LIBNXCL_EXPORTABLE NXCModifyUser(NXC_SESSION hSession, NXC_USER *pUserInfo
 
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   // Wait for responce
+   // Wait for response
    return ((NXCL_Session *)hSession)->WaitForRCC(dwRqId);
 }
 
@@ -251,7 +251,7 @@ DWORD LIBNXCL_EXPORTABLE NXCSetPassword(NXC_SESSION hSession, DWORD dwUserId,
 DWORD LIBNXCL_EXPORTABLE NXCGetUserVariable(NXC_SESSION hSession, TCHAR *pszVarName,
                                             TCHAR *pszValue, DWORD dwSize)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwResult;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -261,13 +261,13 @@ DWORD LIBNXCL_EXPORTABLE NXCGetUserVariable(NXC_SESSION hSession, TCHAR *pszVarN
    msg.SetVariable(VID_NAME, pszVarName);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwResult = pResponce->GetVariableLong(VID_RCC);
+      dwResult = pResponse->GetVariableLong(VID_RCC);
       if (dwResult == RCC_SUCCESS)
-         pResponce->GetVariableStr(VID_VALUE, pszValue, dwSize);
-      delete pResponce;
+         pResponse->GetVariableStr(VID_VALUE, pszValue, dwSize);
+      delete pResponse;
    }
    else
    {
@@ -326,7 +326,7 @@ DWORD LIBNXCL_EXPORTABLE NXCDeleteUserVariable(NXC_SESSION hSession, TCHAR *pszV
 DWORD LIBNXCL_EXPORTABLE NXCEnumUserVariables(NXC_SESSION hSession, TCHAR *pszPattern,
                                               DWORD *pdwNumVars, TCHAR ***pppszVarList)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD i, dwId, dwRqId, dwResult;
 
    dwRqId = ((NXCL_Session *)hSession)->CreateRqId();
@@ -336,25 +336,25 @@ DWORD LIBNXCL_EXPORTABLE NXCEnumUserVariables(NXC_SESSION hSession, TCHAR *pszPa
    msg.SetVariable(VID_SEARCH_PATTERN, pszPattern);
    ((NXCL_Session *)hSession)->SendMsg(&msg);
 
-   pResponce = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
-   if (pResponce != NULL)
+   pResponse = ((NXCL_Session *)hSession)->WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId);
+   if (pResponse != NULL)
    {
-      dwResult = pResponce->GetVariableLong(VID_RCC);
+      dwResult = pResponse->GetVariableLong(VID_RCC);
       if (dwResult == RCC_SUCCESS)
       {
-         *pdwNumVars = pResponce->GetVariableLong(VID_NUM_VARIABLES);
+         *pdwNumVars = pResponse->GetVariableLong(VID_NUM_VARIABLES);
          if (*pdwNumVars > 0)
          {
             *pppszVarList = (TCHAR **)malloc(sizeof(TCHAR *) * (*pdwNumVars));
             for(i = 0, dwId = VID_VARLIST_BASE; i < *pdwNumVars; i++, dwId++)
-               (*pppszVarList)[i] = pResponce->GetVariableStr(dwId);
+               (*pppszVarList)[i] = pResponse->GetVariableStr(dwId);
          }
          else
          {
             *pppszVarList = NULL;
          }
       }
-      delete pResponce;
+      delete pResponse;
    }
    else
    {
index 368317c..1882e4f 100644 (file)
@@ -41,7 +41,7 @@ static struct
    { ASN_GET_REQUEST_PDU, -1, SNMP_GET_REQUEST },
    { ASN_GET_NEXT_REQUEST_PDU, -1, SNMP_GET_NEXT_REQUEST },
    { ASN_SET_REQUEST_PDU, -1, SNMP_SET_REQUEST },
-   { ASN_GET_RESPONCE_PDU, -1, SNMP_GET_RESPONCE },
+   { ASN_GET_RESPONSE_PDU, -1, SNMP_GET_RESPONSE },
    { 0, -1, 0 }
 };
 
@@ -445,8 +445,8 @@ BOOL SNMP_PDU::Parse(BYTE *pRawData, DWORD dwRawLength)
             m_dwCommand = SNMP_GET_NEXT_REQUEST;
             bResult = ParsePDU(pbCurrPos, dwLength);
             break;
-         case ASN_GET_RESPONCE_PDU:
-            m_dwCommand = SNMP_GET_RESPONCE;
+         case ASN_GET_RESPONSE_PDU:
+            m_dwCommand = SNMP_GET_RESPONSE;
             bResult = ParsePDU(pbCurrPos, dwLength);
             break;
          case ASN_SET_REQUEST_PDU:
index 4ff30b4..6c19115 100644 (file)
@@ -307,27 +307,27 @@ DWORD SNMP_Transport::CreateUDPTransport(TCHAR *pszHostName, DWORD dwHostAddr, W
 // with respect for timeouts and retransmissions
 //
 
-DWORD SNMP_Transport::DoRequest(SNMP_PDU *pRequest, SNMP_PDU **ppResponce, 
+DWORD SNMP_Transport::DoRequest(SNMP_PDU *pRequest, SNMP_PDU **ppResponse, 
                                 DWORD dwTimeout, DWORD dwNumRetries)
 {
    DWORD dwResult = SNMP_ERR_SUCCESS;
    int iBytes;
 
-   if ((pRequest == NULL) || (ppResponce == NULL) || (dwNumRetries == 0))
+   if ((pRequest == NULL) || (ppResponse == NULL) || (dwNumRetries == 0))
       return SNMP_ERR_PARAM;
 
-   *ppResponce = NULL;
+   *ppResponse = NULL;
    if (Send(pRequest) <= 0)
       return SNMP_ERR_COMM;
 
    while(dwNumRetries-- > 0)
    {
-      iBytes = Read(ppResponce, dwTimeout);
+      iBytes = Read(ppResponse, dwTimeout);
       if (iBytes > 0)
       {
-         if (*ppResponce != NULL)
+         if (*ppResponse != NULL)
          {
-            if ((*ppResponce)->GetRequestId() == pRequest->GetRequestId())
+            if ((*ppResponse)->GetRequestId() == pRequest->GetRequestId())
                break;
             dwResult = SNMP_ERR_TIMEOUT;
          }
index 05e6280..cdb3b21 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: admin.cpp,v 1.11 2005-06-19 21:39:20 victor Exp $ */
+/* $Id: admin.cpp,v 1.12 2005-08-17 12:09:25 victor Exp $ */
 
 /* 
 ** NetXMS - Network Management System
@@ -43,7 +43,7 @@ static THREAD_RESULT THREAD_CALL ProcessingThread(void *pArg)
    int iError;
    CSCP_MESSAGE *pRawMsg, *pRawMsgOut;
    CSCP_BUFFER *pRecvBuffer;
-   CSCPMessage *pRequest, responce;
+   CSCPMessage *pRequest, response;
    TCHAR szCmd[256];
    struct __console_ctx ctx;
    static CSCP_ENCRYPTION_CONTEXT *pDummyCtx = NULL;
@@ -52,7 +52,7 @@ static THREAD_RESULT THREAD_CALL ProcessingThread(void *pArg)
    pRecvBuffer = (CSCP_BUFFER *)malloc(sizeof(CSCP_BUFFER));
    RecvCSCPMessage(0, NULL, pRecvBuffer, 0, NULL, NULL);
    ctx.hSocket = sock;
-   ctx.pMsg = &responce;
+   ctx.pMsg = &response;
 
    while(1)
    {
@@ -66,15 +66,15 @@ static THREAD_RESULT THREAD_CALL ProcessingThread(void *pArg)
       pRequest = new CSCPMessage(pRawMsg);
       pRequest->GetVariableStr(VID_COMMAND, szCmd, 256);
 
-      responce.SetCode(CMD_ADM_MESSAGE);
-      responce.SetId(pRequest->GetId());
+      response.SetCode(CMD_ADM_MESSAGE);
+      response.SetId(pRequest->GetId());
       if (ProcessConsoleCommand(szCmd, &ctx))
       {
          InitiateShutdown();
       }
 
-      responce.SetCode(CMD_REQUEST_COMPLETED);
-      pRawMsgOut = responce.CreateMessage();
+      response.SetCode(CMD_REQUEST_COMPLETED);
+      pRawMsgOut = response.CreateMessage();
       SendEx(sock, pRawMsgOut, ntohl(pRawMsgOut->dwSize), 0);
       
       free(pRawMsgOut);
@@ -164,6 +164,9 @@ THREAD_RESULT THREAD_CALL LocalAdminListener(void *pArg)
 /*
 
 $Log: not supported by cvs2svn $
+Revision 1.11  2005/06/19 21:39:20  victor
+Encryption between server and agent fully working
+
 Revision 1.10  2005/06/19 19:20:40  victor
 - Added encryption foundation
 - Encryption between server and agent almost working
index b22f969..1d6675c 100644 (file)
@@ -115,7 +115,7 @@ void SendDefaultImageList(ClientSession *pSession, DWORD dwRqId)
       msg.SetVariable(VID_RCC, RCC_DB_FAILURE);
    }
 
-   // Send responce
+   // Send response
    pSession->SendMessage(&msg);
 }
 
@@ -171,7 +171,7 @@ void SendImageCatalogue(ClientSession *pSession, DWORD dwRqId, WORD wFormat)
       msg.SetVariable(VID_RCC, RCC_DB_FAILURE);
    }
 
-   // Send responce
+   // Send response
    pSession->SendMessage(&msg);
 }
 
@@ -232,6 +232,6 @@ void SendImageFile(ClientSession *pSession, DWORD dwRqId, DWORD dwImageId, WORD
       msg.SetVariable(VID_RCC, RCC_DB_FAILURE);
    }
 
-   // Send responce
+   // Send response
    pSession->SendMessage(&msg);
 }
index f78cb24..885229d 100644 (file)
@@ -36,18 +36,18 @@ NetworkService::NetworkService()
    m_wProto = IPPROTO_TCP;
    m_wPort = 80;
    m_pszRequest = NULL;
-   m_pszResponce = NULL;
+   m_pszResponse = NULL;
 }
 
 
 //
 // Extended constructor
-// Note that pszRequest and pszResponce should be dynamically allocated
+// Note that pszRequest and pszResponse should be dynamically allocated
 // and they will be freed by object's destructor!!!
 //
 
 NetworkService::NetworkService(int iServiceType, WORD wProto, WORD wPort,
-                               TCHAR *pszRequest, TCHAR *pszResponce,
+                               TCHAR *pszRequest, TCHAR *pszResponse,
                                Node *pHostNode, DWORD dwPollerNode)
 {
    m_iServiceType = iServiceType;
@@ -56,7 +56,7 @@ NetworkService::NetworkService(int iServiceType, WORD wProto, WORD wPort,
    m_wProto = wProto;
    m_wPort = wPort;
    m_pszRequest = pszRequest;
-   m_pszResponce = pszResponce;
+   m_pszResponse = pszResponse;
    m_bIsHidden = TRUE;
 }
 
@@ -68,7 +68,7 @@ NetworkService::NetworkService(int iServiceType, WORD wProto, WORD wPort,
 NetworkService::~NetworkService()
 {
    safe_free(m_pszRequest);
-   safe_free(m_pszResponce);
+   safe_free(m_pszResponse);
 }
 
 
@@ -78,7 +78,7 @@ NetworkService::~NetworkService()
 
 BOOL NetworkService::SaveToDB(DB_HANDLE hdb)
 {
-   TCHAR *pszEscRequest, *pszEscResponce, szQuery[16384], szIpAddr[32];
+   TCHAR *pszEscRequest, *pszEscResponse, szQuery[16384], szIpAddr[32];
    DB_RESULT hResult;
    BOOL bNewObject = TRUE;
 
@@ -98,7 +98,7 @@ BOOL NetworkService::SaveToDB(DB_HANDLE hdb)
 
    // Form and execute INSERT or UPDATE query
    pszEscRequest = EncodeSQLString(CHECK_NULL_EX(m_pszRequest));
-   pszEscResponce = EncodeSQLString(CHECK_NULL_EX(m_pszResponce));
+   pszEscResponse = EncodeSQLString(CHECK_NULL_EX(m_pszResponse));
    if (bNewObject)
       _sntprintf(szQuery, 16384, _T("INSERT INTO network_services (id,node_id,"
                                     "service_type,ip_bind_addr,ip_proto,ip_port,"
@@ -106,7 +106,7 @@ BOOL NetworkService::SaveToDB(DB_HANDLE hdb)
                                     "(%ld,%ld,%d,'%s',%d,%d,'%s','%s',%ld)"),
                  m_dwId, m_pHostNode->Id(), m_iServiceType,
                  IpToStr(m_dwIpAddr, szIpAddr), m_wProto, m_wPort, pszEscRequest,
-                 pszEscResponce, m_dwPollerNode);
+                 pszEscResponse, m_dwPollerNode);
    else
       _sntprintf(szQuery, 16384, _T("UPDATE network_services SET node_id=%ld,"
                                     "service_type=%d,ip_bind_addr='%s',"
@@ -114,9 +114,9 @@ BOOL NetworkService::SaveToDB(DB_HANDLE hdb)
                                     "check_responce='%s',poller_node_id=%ld WHERE id=%ld"),
                  m_pHostNode->Id(), m_iServiceType,
                  IpToStr(m_dwIpAddr, szIpAddr), m_wProto, m_wPort, pszEscRequest,
-                 pszEscResponce, m_dwPollerNode, m_dwId);
+                 pszEscResponse, m_dwPollerNode, m_dwId);
    free(pszEscRequest);
-   free(pszEscResponce);
+   free(pszEscResponse);
    DBQuery(hdb, szQuery);
                  
    // Save access list
@@ -162,8 +162,8 @@ BOOL NetworkService::CreateFromDB(DWORD dwId)
       m_wPort = (WORD)DBGetFieldULong(hResult, 0, 4);
       m_pszRequest = _tcsdup(CHECK_NULL_EX(DBGetField(hResult, 0, 5)));
       DecodeSQLString(m_pszRequest);
-      m_pszResponce = _tcsdup(CHECK_NULL_EX(DBGetField(hResult, 0, 6)));
-      DecodeSQLString(m_pszResponce);
+      m_pszResponse = _tcsdup(CHECK_NULL_EX(DBGetField(hResult, 0, 6)));
+      DecodeSQLString(m_pszResponse);
       m_dwPollerNode = DBGetFieldULong(hResult, 0, 7);
 
       // Link service to node
@@ -251,7 +251,7 @@ void NetworkService::CreateMessage(CSCPMessage *pMsg)
    pMsg->SetVariable(VID_IP_PORT, m_wPort);
    pMsg->SetVariable(VID_POLLER_NODE_ID, m_dwPollerNode);
    pMsg->SetVariable(VID_SERVICE_REQUEST, CHECK_NULL_EX(m_pszRequest));
-   pMsg->SetVariable(VID_SERVICE_RESPONCE, CHECK_NULL_EX(m_pszResponce));
+   pMsg->SetVariable(VID_SERVICE_RESPONSE, CHECK_NULL_EX(m_pszResponse));
 }
 
 
@@ -322,11 +322,11 @@ DWORD NetworkService::ModifyFromMessage(CSCPMessage *pRequest, BOOL bAlreadyLock
       m_pszRequest = pRequest->GetVariableStr(VID_SERVICE_REQUEST);
    }
 
-   // Check responce
-   if (pRequest->IsVariableExist(VID_SERVICE_RESPONCE))
+   // Check response
+   if (pRequest->IsVariableExist(VID_SERVICE_RESPONSE))
    {
-      safe_free(m_pszResponce);
-      m_pszResponce = pRequest->GetVariableStr(VID_SERVICE_RESPONCE);
+      safe_free(m_pszResponse);
+      m_pszResponse = pRequest->GetVariableStr(VID_SERVICE_RESPONSE);
    }
 
    return NetObj::ModifyFromMessage(pRequest, TRUE);
@@ -377,7 +377,7 @@ void NetworkService::StatusPoll(ClientSession *pSession, DWORD dwRqId,
       if (pNode->CheckNetworkService(&dwStatus, 
                                      (m_dwIpAddr == 0) ? m_pHostNode->IpAddr() : m_dwIpAddr,
                                      m_iServiceType, m_wPort, m_wProto, 
-                                     m_pszRequest, m_pszResponce) == ERR_SUCCESS)
+                                     m_pszRequest, m_pszResponse) == ERR_SUCCESS)
       {
          m_iStatus = (dwStatus == 0) ? STATUS_NORMAL : STATUS_CRITICAL;
          SendPollerMsg(dwRqId, "      Agent reports service status [%d]\r\n", dwStatus);
index 5386e81..16b395f 100644 (file)
@@ -1721,7 +1721,7 @@ void Node::WriteParamListToMessage(CSCPMessage *pMsg)
 
 DWORD Node::CheckNetworkService(DWORD *pdwStatus, DWORD dwIpAddr, int iServiceType,
                                 WORD wPort, WORD wProto, TCHAR *pszRequest,
-                                TCHAR *pszResponce)
+                                TCHAR *pszResponse)
 {
    DWORD dwError = ERR_NOT_CONNECTED;
 
@@ -1735,7 +1735,7 @@ DWORD Node::CheckNetworkService(DWORD *pdwStatus, DWORD dwIpAddr, int iServiceTy
       if (conn.Connect(g_pServerKey))
       {
          dwError = conn.CheckNetworkService(pdwStatus, dwIpAddr, iServiceType,
-                                            wPort, wProto, pszRequest, pszResponce);
+                                            wPort, wProto, pszRequest, pszResponse);
          conn.Disconnect();
       }
    }
index ab2b587..535d6fd 100644 (file)
@@ -830,12 +830,12 @@ void ClientSession::ProcessingThread(void)
                   break;   // Message was processed by the module
             if (i == g_dwNumModules)
             {
-               CSCPMessage responce;
+               CSCPMessage response;
 
-               responce.SetId(pMsg->GetId());
-               responce.SetCode(CMD_REQUEST_COMPLETED);
-               responce.SetVariable(VID_RCC, RCC_NOT_IMPLEMENTED);
-               SendMessage(&responce);
+               response.SetId(pMsg->GetId());
+               response.SetCode(CMD_REQUEST_COMPLETED);
+               response.SetVariable(VID_RCC, RCC_NOT_IMPLEMENTED);
+               SendMessage(&response);
             }
             break;
       }
@@ -881,7 +881,7 @@ void ClientSession::SendServerInfo(DWORD dwRqId)
 {
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -892,7 +892,7 @@ void ClientSession::SendServerInfo(DWORD dwRqId)
    msg.SetVariable(VID_SUPPORTED_ENCRYPTION, (DWORD)0);
    msg.SetVariable(VID_PROTOCOL_VERSION, (DWORD)CLIENT_PROTOCOL_VERSION);
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -907,7 +907,7 @@ void ClientSession::Login(CSCPMessage *pRequest)
    BYTE szPassword[SHA1_DIGEST_SIZE];
    char szLogin[MAX_USER_NAME], szBuffer[32];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_LOGIN_RESP);
    msg.SetId(pRequest->GetId());
 
@@ -934,7 +934,7 @@ void ClientSession::Login(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_OUT_OF_STATE_REQUEST);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -949,7 +949,7 @@ void ClientSession::SendEventDB(DWORD dwRqId)
    CSCPMessage msg;
    char szBuffer[1024];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -1008,7 +1008,7 @@ void ClientSession::LockEventDB(DWORD dwRqId)
    CSCPMessage msg;
    char szBuffer[1024];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -1162,7 +1162,7 @@ void ClientSession::SetEventInfo(CSCPMessage *pRequest)
       }
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1211,7 +1211,7 @@ void ClientSession::DeleteEventTemplate(CSCPMessage *pRequest)
       }
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1246,7 +1246,7 @@ void ClientSession::GenerateEventCode(DWORD dwRqId)
       }
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1398,7 +1398,7 @@ void ClientSession::SendAllConfigVars(DWORD dwRqId)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1412,7 +1412,7 @@ void ClientSession::SetConfigVariable(CSCPMessage *pRequest)
    CSCPMessage msg;
    TCHAR szName[MAX_OBJECT_NAME], szValue[MAX_DB_STRING];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -1431,7 +1431,7 @@ void ClientSession::SetConfigVariable(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1445,7 +1445,7 @@ void ClientSession::DeleteConfigVariable(CSCPMessage *pRequest)
    CSCPMessage msg;
    TCHAR szName[MAX_OBJECT_NAME], szQuery[1024];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -1464,7 +1464,7 @@ void ClientSession::DeleteConfigVariable(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1576,7 +1576,7 @@ void ClientSession::ModifyObject(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1590,7 +1590,7 @@ void ClientSession::SendUserDB(DWORD dwRqId)
    CSCPMessage msg;
    DWORD i;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
    msg.SetVariable(VID_RCC, RCC_SUCCESS);
@@ -1628,7 +1628,7 @@ void ClientSession::CreateUser(CSCPMessage *pRequest)
 {
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -1664,7 +1664,7 @@ void ClientSession::CreateUser(CSCPMessage *pRequest)
       }
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1677,7 +1677,7 @@ void ClientSession::UpdateUser(CSCPMessage *pRequest)
 {
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -1729,7 +1729,7 @@ void ClientSession::UpdateUser(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, dwResult);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1743,7 +1743,7 @@ void ClientSession::DeleteUser(CSCPMessage *pRequest)
    CSCPMessage msg;
    DWORD dwUserId;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -1777,7 +1777,7 @@ void ClientSession::DeleteUser(CSCPMessage *pRequest)
       }
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1791,7 +1791,7 @@ void ClientSession::LockUserDB(DWORD dwRqId, BOOL bLock)
    CSCPMessage msg;
    char szBuffer[256];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -1826,7 +1826,7 @@ void ClientSession::LockUserDB(DWORD dwRqId, BOOL bLock)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1880,7 +1880,7 @@ void ClientSession::ChangeObjectMgmtStatus(CSCPMessage *pRequest)
    DWORD dwObjectId;
    NetObj *pObject;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -1907,7 +1907,7 @@ void ClientSession::ChangeObjectMgmtStatus(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1921,7 +1921,7 @@ void ClientSession::SetPassword(CSCPMessage *pRequest)
    CSCPMessage msg;
    DWORD dwUserId;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -1944,7 +1944,7 @@ void ClientSession::SetPassword(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -1960,7 +1960,7 @@ void ClientSession::OpenNodeDCIList(CSCPMessage *pRequest)
    NetObj *pObject;
    BOOL bSuccess = FALSE;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2001,7 +2001,7 @@ void ClientSession::OpenNodeDCIList(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 
    // If DCI list was successfully locked, send it to client
@@ -2020,7 +2020,7 @@ void ClientSession::CloseNodeDCIList(CSCPMessage *pRequest)
    DWORD dwObjectId;
    NetObj *pObject;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2074,7 +2074,7 @@ void ClientSession::CloseNodeDCIList(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2089,7 +2089,7 @@ void ClientSession::ModifyNodeDCI(CSCPMessage *pRequest)
    DWORD dwObjectId;
    NetObj *pObject;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2182,7 +2182,7 @@ void ClientSession::ModifyNodeDCI(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2196,7 +2196,7 @@ void ClientSession::ChangeDCIStatus(CSCPMessage *pRequest)
    CSCPMessage msg;
    NetObj *pObject;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2244,7 +2244,7 @@ void ClientSession::ChangeDCIStatus(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2258,7 +2258,7 @@ void ClientSession::CopyDCI(CSCPMessage *pRequest)
    CSCPMessage msg;
    NetObj *pSource, *pDestination;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2343,7 +2343,7 @@ void ClientSession::CopyDCI(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2360,7 +2360,7 @@ void ClientSession::GetCollectedData(CSCPMessage *pRequest)
    BOOL bSuccess = FALSE;
    static DWORD m_dwRowSize[] = { 8, 8, 12, 12, 260, 12 };
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2504,7 +2504,7 @@ void ClientSession::GetCollectedData(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    if (!bSuccess)
       SendMessage(&msg);
 }
@@ -2519,7 +2519,7 @@ void ClientSession::SendLastValues(CSCPMessage *pRequest)
    CSCPMessage msg;
    NetObj *pObject;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2548,7 +2548,7 @@ void ClientSession::SendLastValues(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2563,7 +2563,7 @@ void ClientSession::OpenEPP(DWORD dwRqId)
    char szBuffer[256];
    BOOL bSuccess = FALSE;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -2588,7 +2588,7 @@ void ClientSession::OpenEPP(DWORD dwRqId)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 
    // Send policy to client
@@ -2605,7 +2605,7 @@ void ClientSession::CloseEPP(DWORD dwRqId)
 {
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -2624,7 +2624,7 @@ void ClientSession::CloseEPP(DWORD dwRqId)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2637,7 +2637,7 @@ void ClientSession::SaveEPP(CSCPMessage *pRequest)
 {
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2672,7 +2672,7 @@ void ClientSession::SaveEPP(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2736,7 +2736,7 @@ void ClientSession::SendMIBList(DWORD dwRqId)
    char szBuffer[MAX_PATH];
    BYTE md5Hash[MD5_DIGEST_SIZE];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_MIB_LIST);
    msg.SetId(dwRqId);
 
@@ -2769,7 +2769,7 @@ void ClientSession::SendMIBList(DWORD dwRqId)
 
    msg.SetVariable(VID_NUM_MIBS, dwNumFiles);
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2785,7 +2785,7 @@ void ClientSession::SendMIB(CSCPMessage *pRequest)
    DWORD dwFileSize;
    char szBuffer[MAX_PATH], szMIB[MAX_PATH];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_MIB);
    msg.SetId(pRequest->GetId());
 
@@ -2814,7 +2814,7 @@ void ClientSession::SendMIB(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_SYSTEM_FAILURE);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2829,12 +2829,12 @@ void ClientSession::CreateObject(CSCPMessage *pRequest)
    NetObj *pObject, *pParent;
    int iClass, iServiceType;
    TCHAR *pDescription, szObjectName[MAX_OBJECT_NAME];
-   TCHAR *pszRequest, *pszResponce;
+   TCHAR *pszRequest, *pszResponse;
    DWORD dwIpAddr;
    WORD wIpProto, wIpPort;
    BOOL bParentAlwaysValid = FALSE;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -2895,9 +2895,9 @@ void ClientSession::CreateObject(CSCPMessage *pRequest)
                      wIpProto = pRequest->GetVariableShort(VID_IP_PROTO);
                      wIpPort = pRequest->GetVariableShort(VID_IP_PORT);
                      pszRequest = pRequest->GetVariableStr(VID_SERVICE_REQUEST);
-                     pszResponce = pRequest->GetVariableStr(VID_SERVICE_RESPONCE);
+                     pszResponse = pRequest->GetVariableStr(VID_SERVICE_RESPONSE);
                      pObject = new NetworkService(iServiceType, wIpProto, wIpPort, 
-                                                  pszRequest, pszResponce, (Node *)pParent);
+                                                  pszRequest, pszResponse, (Node *)pParent);
                      pObject->SetName(szObjectName);
                      NetObjInsert(pObject, TRUE);
                      break;
@@ -2948,7 +2948,7 @@ void ClientSession::CreateObject(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -2962,7 +2962,7 @@ void ClientSession::ChangeObjectBinding(CSCPMessage *pRequest, BOOL bBind)
    CSCPMessage msg;
    NetObj *pParent, *pChild;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3026,7 +3026,7 @@ void ClientSession::ChangeObjectBinding(CSCPMessage *pRequest, BOOL bBind)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3040,7 +3040,7 @@ void ClientSession::DeleteObject(CSCPMessage *pRequest)
    CSCPMessage msg;
    NetObj *pObject;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3072,7 +3072,7 @@ void ClientSession::DeleteObject(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3124,7 +3124,7 @@ void ClientSession::AcknowlegeAlarm(CSCPMessage *pRequest)
    NetObj *pObject;
    DWORD dwAlarmId;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3151,7 +3151,7 @@ void ClientSession::AcknowlegeAlarm(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_ALARM_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3166,7 +3166,7 @@ void ClientSession::DeleteAlarm(CSCPMessage *pRequest)
    NetObj *pObject;
    DWORD dwAlarmId;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3195,7 +3195,7 @@ void ClientSession::DeleteAlarm(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_ALARM_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3209,7 +3209,7 @@ void ClientSession::LockActionDB(DWORD dwRqId, BOOL bLock)
    CSCPMessage msg;
    char szBuffer[256];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -3244,7 +3244,7 @@ void ClientSession::LockActionDB(DWORD dwRqId, BOOL bLock)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3257,7 +3257,7 @@ void ClientSession::CreateAction(CSCPMessage *pRequest)
 {
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3291,7 +3291,7 @@ void ClientSession::CreateAction(CSCPMessage *pRequest)
       }
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3304,7 +3304,7 @@ void ClientSession::UpdateAction(CSCPMessage *pRequest)
 {
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3324,7 +3324,7 @@ void ClientSession::UpdateAction(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, ModifyActionFromMessage(pRequest));
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3338,7 +3338,7 @@ void ClientSession::DeleteAction(CSCPMessage *pRequest)
    CSCPMessage msg;
    DWORD dwActionId;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3367,7 +3367,7 @@ void ClientSession::DeleteAction(CSCPMessage *pRequest)
       }
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3402,7 +3402,7 @@ void ClientSession::SendAllActions(DWORD dwRqId)
 {
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -3433,7 +3433,7 @@ void ClientSession::SendContainerCategories(DWORD dwRqId)
    CSCPMessage msg;
    DWORD i;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_CONTAINER_CAT_DATA);
    msg.SetId(dwRqId);
 
@@ -3467,7 +3467,7 @@ void ClientSession::ForcedNodePoll(CSCPMessage *pRequest)
    pData->pSession = this;
    MutexLock(m_mutexPollerInit, INFINITE);
 
-   // Prepare responce message
+   // Prepare response message
    pData->dwRqId = pRequest->GetId();
    msg.SetCode(CMD_POLLING_INFO);
    msg.SetId(pData->dwRqId);
@@ -3509,7 +3509,7 @@ void ClientSession::ForcedNodePoll(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
    MutexUnlock(m_mutexPollerInit);
 }
@@ -3578,7 +3578,7 @@ void ClientSession::OnTrap(CSCPMessage *pRequest)
    TCHAR szFormat[] = "ssssssssssssssssssssssssssssssss";
    BOOL bSuccess;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3627,7 +3627,7 @@ void ClientSession::OnTrap(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3641,7 +3641,7 @@ void ClientSession::OnWakeUpNode(CSCPMessage *pRequest)
    NetObj *pObject;
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3677,7 +3677,7 @@ void ClientSession::OnWakeUpNode(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3691,7 +3691,7 @@ void ClientSession::QueryParameter(CSCPMessage *pRequest)
    NetObj *pObject;
    CSCPMessage msg;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3728,7 +3728,7 @@ void ClientSession::QueryParameter(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3742,7 +3742,7 @@ void ClientSession::EditTrap(int iOperation, CSCPMessage *pRequest)
    CSCPMessage msg;
    DWORD dwTrapId, dwResult;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -3782,7 +3782,7 @@ void ClientSession::EditTrap(int iOperation, CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3796,7 +3796,7 @@ void ClientSession::LockTrapCfg(DWORD dwRqId, BOOL bLock)
    CSCPMessage msg;
    char szBuffer[256];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -3831,7 +3831,7 @@ void ClientSession::LockTrapCfg(DWORD dwRqId, BOOL bLock)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3845,7 +3845,7 @@ void ClientSession::SendAllTraps(DWORD dwRqId)
    CSCPMessage msg;
    BOOL bSuccess = FALSE;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -3869,7 +3869,7 @@ void ClientSession::SendAllTraps(DWORD dwRqId)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    if (!bSuccess)
       SendMessage(&msg);
 }
@@ -3884,7 +3884,7 @@ void ClientSession::LockPackageDB(DWORD dwRqId, BOOL bLock)
    CSCPMessage msg;
    char szBuffer[256];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -3919,7 +3919,7 @@ void ClientSession::LockPackageDB(DWORD dwRqId, BOOL bLock)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -3935,7 +3935,7 @@ void ClientSession::SendAllPackages(DWORD dwRqId)
    BOOL bSuccess = FALSE;
    TCHAR szBuffer[MAX_DB_STRING];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
 
@@ -3988,7 +3988,7 @@ void ClientSession::SendAllPackages(DWORD dwRqId)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    if (!bSuccess)
       SendMessage(&msg);
 }
@@ -4006,7 +4006,7 @@ void ClientSession::InstallPackage(CSCPMessage *pRequest)
    TCHAR szPlatform[MAX_PLATFORM_NAME_LEN], *pszCleanFileName, *pszEscDescr;
    TCHAR szQuery[2048];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4096,7 +4096,7 @@ void ClientSession::InstallPackage(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4110,7 +4110,7 @@ void ClientSession::RemovePackage(CSCPMessage *pRequest)
    CSCPMessage msg;
    DWORD dwPkgId;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4132,7 +4132,7 @@ void ClientSession::RemovePackage(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4146,7 +4146,7 @@ void ClientSession::SendParametersList(CSCPMessage *pRequest)
    CSCPMessage msg;
    NetObj *pObject;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4168,7 +4168,7 @@ void ClientSession::SendParametersList(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4189,7 +4189,7 @@ void ClientSession::DeployPackage(CSCPMessage *pRequest)
    BOOL bSuccess = TRUE;
    MUTEX hMutex;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4305,7 +4305,7 @@ void ClientSession::DeployPackage(CSCPMessage *pRequest)
       bSuccess = FALSE;
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 
    // Allow deployment thread to run
@@ -4323,7 +4323,7 @@ void ClientSession::ApplyTemplate(CSCPMessage *pRequest)
    CSCPMessage msg;
    NetObj *pSource, *pDestination;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4390,7 +4390,7 @@ void ClientSession::ApplyTemplate(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4405,7 +4405,7 @@ void ClientSession::GetUserVariable(CSCPMessage *pRequest)
    TCHAR szVarName[MAX_VARIABLE_NAME], szQuery[MAX_VARIABLE_NAME + 256];
    DB_RESULT hResult;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4438,7 +4438,7 @@ void ClientSession::GetUserVariable(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_DB_FAILURE);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4454,7 +4454,7 @@ void ClientSession::SetUserVariable(CSCPMessage *pRequest)
    DB_RESULT hResult;
    BOOL bExist = FALSE;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4503,7 +4503,7 @@ void ClientSession::SetUserVariable(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_NAME);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4519,7 +4519,7 @@ void ClientSession::EnumUserVariables(CSCPMessage *pRequest)
    DWORD i, dwNumRows, dwNumVars, dwId;
    DB_RESULT hResult;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4547,7 +4547,7 @@ void ClientSession::EnumUserVariables(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_DB_FAILURE);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4561,7 +4561,7 @@ void ClientSession::DeleteUserVariable(CSCPMessage *pRequest)
    CSCPMessage msg;
    TCHAR szVarName[MAX_VARIABLE_NAME], szQuery[MAX_VARIABLE_NAME + 256];
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4579,7 +4579,7 @@ void ClientSession::DeleteUserVariable(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_DB_FAILURE);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4594,7 +4594,7 @@ void ClientSession::ChangeObjectIP(CSCPMessage *pRequest)
    NetObj *pObject;
    DWORD dwIpAddr;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4635,7 +4635,7 @@ void ClientSession::ChangeObjectIP(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
 
@@ -4663,7 +4663,7 @@ void ClientSession::SetupEncryption(DWORD dwRqId)
    // Wait for encryption setup
    ConditionWait(m_condEncryptionSetup, 3000);
 
-   // Send responce
+   // Send response
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(dwRqId);
    msg.SetVariable(VID_RCC, m_dwEncryptionResult);
@@ -4688,7 +4688,7 @@ void ClientSession::GetAgentConfig(CSCPMessage *pRequest)
    DWORD dwResult, dwSize;
    TCHAR *pszConfig;
 
-   // Prepare responce message
+   // Prepare response message
    msg.SetCode(CMD_REQUEST_COMPLETED);
    msg.SetId(pRequest->GetId());
 
@@ -4742,6 +4742,6 @@ void ClientSession::GetAgentConfig(CSCPMessage *pRequest)
       msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_ID);
    }
 
-   // Send responce
+   // Send response
    SendMessage(&msg);
 }
index 37e7b3f..512022a 100644 (file)
@@ -420,14 +420,14 @@ protected:
    WORD m_wProto;        // Protocol (TCP, UDP, etc.)
    WORD m_wPort;         // TCP or UDP port number
    TCHAR *m_pszRequest;  // Service-specific request
-   TCHAR *m_pszResponce; // Service-specific expected responce
+   TCHAR *m_pszResponse; // Service-specific expected response
 
    virtual void OnObjectDelete(DWORD dwObjectId);
 
 public:
    NetworkService();
    NetworkService(int iServiceType, WORD wProto, WORD wPort,
-                  TCHAR *pszRequest, TCHAR *pszResponce,
+                  TCHAR *pszRequest, TCHAR *pszResponse,
                   Node *pHostNode = NULL, DWORD dwPollerNode = 0);
    virtual ~NetworkService();
 
@@ -611,7 +611,7 @@ public:
 
    void AddService(NetworkService *pNetSrv) { AddChild(pNetSrv); pNetSrv->AddParent(this); }
    DWORD CheckNetworkService(DWORD *pdwStatus, DWORD dwIpAddr, int iServiceType, WORD wPort = 0,
-                             WORD wProto = 0, TCHAR *pszRequest = NULL, TCHAR *pszResponce = NULL);
+                             WORD wProto = 0, TCHAR *pszRequest = NULL, TCHAR *pszResponse = NULL);
 
    QWORD GetLastEventId(int nIndex) { return ((nIndex >= 0) && (nIndex < MAX_LAST_EVENTS)) ? m_qwLastEvents[nIndex] : 0; }
    void SetLastEventId(int nIndex, QWORD qwId) { if ((nIndex >= 0) && (nIndex < MAX_LAST_EVENTS)) m_qwLastEvents[nIndex] = qwId; }
index 1eb1a6c..e487a81 100644 (file)
@@ -251,7 +251,7 @@ public:
    DWORD UploadFile(TCHAR *pszFile);
    DWORD StartUpgrade(TCHAR *pszPkgName);
    DWORD CheckNetworkService(DWORD *pdwStatus, DWORD dwIpAddr, int iServiceType, WORD wPort = 0, 
-                             WORD wProto = 0, TCHAR *pszRequest = NULL, TCHAR *pszResponce = NULL);
+                             WORD wProto = 0, TCHAR *pszRequest = NULL, TCHAR *pszResponse = NULL);
    DWORD GetSupportedParameters(DWORD *pdwNumParams, NXC_AGENT_PARAM **ppParamList);
    DWORD GetConfigFile(TCHAR **ppszConfig, DWORD *pdwSize);
 
index 64bb93c..67ebe25 100644 (file)
@@ -516,7 +516,7 @@ INTERFACE_LIST *AgentConnection::GetInterfaceList(void)
 
 DWORD AgentConnection::GetParameter(TCHAR *pszParam, DWORD dwBufSize, TCHAR *pszBuffer)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD dwRqId, dwRetCode;
 
    if (m_bIsConnected)
@@ -527,13 +527,13 @@ DWORD AgentConnection::GetParameter(TCHAR *pszParam, DWORD dwBufSize, TCHAR *psz
       msg.SetVariable(VID_PARAMETER, pszParam);
       if (SendMessage(&msg))
       {
-         pResponce = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, m_dwCommandTimeout);
-         if (pResponce != NULL)
+         pResponse = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, m_dwCommandTimeout);
+         if (pResponse != NULL)
          {
-            dwRetCode = pResponce->GetVariableLong(VID_RCC);
+            dwRetCode = pResponse->GetVariableLong(VID_RCC);
             if (dwRetCode == ERR_SUCCESS)
-               pResponce->GetVariableStr(VID_VALUE, pszBuffer, dwBufSize);
-            delete pResponce;
+               pResponse->GetVariableStr(VID_VALUE, pszBuffer, dwBufSize);
+            delete pResponse;
          }
          else
          {
@@ -702,7 +702,7 @@ void AgentConnection::OnTrap(CSCPMessage *pMsg)
 
 DWORD AgentConnection::GetList(TCHAR *pszParam)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    DWORD i, dwRqId, dwRetCode;
 
    if (m_bIsConnected)
@@ -714,18 +714,18 @@ DWORD AgentConnection::GetList(TCHAR *pszParam)
       msg.SetVariable(VID_PARAMETER, pszParam);
       if (SendMessage(&msg))
       {
-         pResponce = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, m_dwCommandTimeout);
-         if (pResponce != NULL)
+         pResponse = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, m_dwCommandTimeout);
+         if (pResponse != NULL)
          {
-            dwRetCode = pResponce->GetVariableLong(VID_RCC);
+            dwRetCode = pResponse->GetVariableLong(VID_RCC);
             if (dwRetCode == ERR_SUCCESS)
             {
-               m_dwNumDataLines = pResponce->GetVariableLong(VID_NUM_STRINGS);
+               m_dwNumDataLines = pResponse->GetVariableLong(VID_NUM_STRINGS);
                m_ppDataLines = (TCHAR **)malloc(sizeof(TCHAR *) * m_dwNumDataLines);
                for(i = 0; i < m_dwNumDataLines; i++)
-                  m_ppDataLines[i] = pResponce->GetVariableStr(VID_ENUM_VALUE_BASE + i);
+                  m_ppDataLines[i] = pResponse->GetVariableStr(VID_ENUM_VALUE_BASE + i);
             }
-            delete pResponce;
+            delete pResponse;
          }
          else
          {
@@ -904,10 +904,10 @@ DWORD AgentConnection::StartUpgrade(TCHAR *pszPkgName)
 
 DWORD AgentConnection::CheckNetworkService(DWORD *pdwStatus, DWORD dwIpAddr, int iServiceType, 
                                            WORD wPort, WORD wProto, 
-                                           TCHAR *pszRequest, TCHAR *pszResponce)
+                                           TCHAR *pszRequest, TCHAR *pszResponse)
 {
    DWORD dwRqId, dwResult;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    static WORD m_wDefaultPort[] = { 7, 22, 110, 25, 21, 80 };
 
    if (!m_bIsConnected)
@@ -925,20 +925,20 @@ DWORD AgentConnection::CheckNetworkService(DWORD *pdwStatus, DWORD dwIpAddr, int
                          (iServiceType <= NETSRV_HTTP)) ? iServiceType : 0]);
    msg.SetVariable(VID_IP_PROTO, (wProto != 0) ? wProto : (WORD)IPPROTO_TCP);
    msg.SetVariable(VID_SERVICE_REQUEST, pszRequest);
-   msg.SetVariable(VID_SERVICE_RESPONCE, pszResponce);
+   msg.SetVariable(VID_SERVICE_RESPONSE, pszResponse);
 
    if (SendMessage(&msg))
    {
       // Wait up to 90 seconds for results
-      pResponce = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 90000);
-      if (pResponce != NULL)
+      pResponse = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, 90000);
+      if (pResponse != NULL)
       {
-         dwResult = pResponce->GetVariableLong(VID_RCC);
+         dwResult = pResponse->GetVariableLong(VID_RCC);
          if (dwResult == ERR_SUCCESS)
          {
-            *pdwStatus = pResponce->GetVariableLong(VID_SERVICE_STATUS);
+            *pdwStatus = pResponse->GetVariableLong(VID_SERVICE_STATUS);
          }
-         delete pResponce;
+         delete pResponse;
       }
       else
       {
@@ -961,7 +961,7 @@ DWORD AgentConnection::CheckNetworkService(DWORD *pdwStatus, DWORD dwIpAddr, int
 DWORD AgentConnection::GetSupportedParameters(DWORD *pdwNumParams, NXC_AGENT_PARAM **ppParamList)
 {
    DWORD i, dwId, dwRqId, dwResult;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
 
    *pdwNumParams = 0;
    *ppParamList = NULL;
@@ -976,22 +976,22 @@ DWORD AgentConnection::GetSupportedParameters(DWORD *pdwNumParams, NXC_AGENT_PAR
 
    if (SendMessage(&msg))
    {
-      pResponce = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, m_dwCommandTimeout);
-      if (pResponce != NULL)
+      pResponse = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, m_dwCommandTimeout);
+      if (pResponse != NULL)
       {
-         dwResult = pResponce->GetVariableLong(VID_RCC);
+         dwResult = pResponse->GetVariableLong(VID_RCC);
          if (dwResult == ERR_SUCCESS)
          {
-            *pdwNumParams = pResponce->GetVariableLong(VID_NUM_PARAMETERS);
+            *pdwNumParams = pResponse->GetVariableLong(VID_NUM_PARAMETERS);
             *ppParamList = (NXC_AGENT_PARAM *)malloc(sizeof(NXC_AGENT_PARAM) * *pdwNumParams);
             for(i = 0, dwId = VID_PARAM_LIST_BASE; i < *pdwNumParams; i++)
             {
-               pResponce->GetVariableStr(dwId++, (*ppParamList)[i].szName, MAX_PARAM_NAME);
-               pResponce->GetVariableStr(dwId++, (*ppParamList)[i].szDescription, MAX_DB_STRING);
-               (*ppParamList)[i].iDataType = (int)pResponce->GetVariableShort(dwId++);
+               pResponse->GetVariableStr(dwId++, (*ppParamList)[i].szName, MAX_PARAM_NAME);
+               pResponse->GetVariableStr(dwId++, (*ppParamList)[i].szDescription, MAX_DB_STRING);
+               (*ppParamList)[i].iDataType = (int)pResponse->GetVariableShort(dwId++);
             }
          }
-         delete pResponce;
+         delete pResponse;
       }
       else
       {
@@ -1070,7 +1070,7 @@ DWORD AgentConnection::SetupEncryption(RSA *pServerKey)
 DWORD AgentConnection::GetConfigFile(TCHAR **ppszConfig, DWORD *pdwSize)
 {
    DWORD i, dwRqId, dwResult;
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
 #ifdef UNICODE
    BYTE *pBuffer;
 #endif
@@ -1088,21 +1088,21 @@ DWORD AgentConnection::GetConfigFile(TCHAR **ppszConfig, DWORD *pdwSize)
 
    if (SendMessage(&msg))
    {
-      pResponce = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, m_dwCommandTimeout);
-      if (pResponce != NULL)
+      pResponse = WaitForMessage(CMD_REQUEST_COMPLETED, dwRqId, m_dwCommandTimeout);
+      if (pResponse != NULL)
       {
-         dwResult = pResponce->GetVariableLong(VID_RCC);
+         dwResult = pResponse->GetVariableLong(VID_RCC);
          if (dwResult == ERR_SUCCESS)
          {
-            *pdwSize = pResponce->GetVariableBinary(VID_CONFIG_FILE, NULL, 0);
+            *pdwSize = pResponse->GetVariableBinary(VID_CONFIG_FILE, NULL, 0);
             *ppszConfig = (TCHAR *)malloc((*pdwSize + 1) * sizeof(TCHAR));
 #ifdef UNICODE
             pBuffer = (BYTE *)malloc(*pdwSize + 1);
-            pResponce->GetVariableBinary(VID_CONFIG_FILE, pBuffer, *pdwSize);
+            pResponse->GetVariableBinary(VID_CONFIG_FILE, pBuffer, *pdwSize);
             MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pBuffer, *pdwSize, *ppszConfig, *pdwSize);
             free(pBuffer);
 #else
-            pResponce->GetVariableBinary(VID_CONFIG_FILE, (BYTE *)(*ppszConfig), *pdwSize);
+            pResponse->GetVariableBinary(VID_CONFIG_FILE, (BYTE *)(*ppszConfig), *pdwSize);
 #endif
             (*ppszConfig)[*pdwSize] = 0;
 
@@ -1114,7 +1114,7 @@ DWORD AgentConnection::GetConfigFile(TCHAR **ppszConfig, DWORD *pdwSize)
                    ((*ppszConfig)[i] != _T('\n')))
                   (*ppszConfig)[i] = _T(' ');
          }
-         delete pResponce;
+         delete pResponse;
       }
       else
       {
index be7b40a..5271281 100644 (file)
@@ -48,7 +48,7 @@ static struct
    { ERR_OUT_OF_RESOURCES, _T("Out of resources") },
    { ERR_NOT_CONNECTED, _T("Not connected") },
    { ERR_CONNECTION_BROKEN, _T("Connection broken") },
-   { ERR_BAD_RESPONCE, _T("Bad responce") },
+   { ERR_BAD_RESPONSE, _T("Bad response") },
    { ERR_IO_FAILURE, _T("I/O failure") },
    { ERR_RESOURCE_BUSY, _T("Resource busy") },
    { ERR_EXEC_FAILED, _T("External program execution failed") },
index 27753d8..255f7f7 100644 (file)
@@ -149,7 +149,7 @@ Inconsistent database: interface %1 linked to object %2 which is not a node
 MessageId=
 SymbolicName=MSG_SNMP_UNKNOWN_TYPE
 Language=English
-Unknown SNMP variable type %1 in GET responce PDU
+Unknown SNMP variable type %1 in GET response PDU
 .
 
 MessageId=
@@ -161,7 +161,7 @@ Error %1 in processing SNMP GET request
 MessageId=
 SymbolicName=MSG_SNMP_BAD_PACKET
 Language=English
-Error in SNMP responce packet: %1
+Error in SNMP response packet: %1
 .
 
 MessageId=
index e0564f5..6a3ca33 100644 (file)
@@ -54,7 +54,7 @@ static void Help(void)
 
 static BOOL ExecCommand(TCHAR *pszCmd)
 {
-   CSCPMessage msg, *pResponce;
+   CSCPMessage msg, *pResponse;
    BOOL bConnClosed = FALSE;
    WORD wCode;
    TCHAR *pszText;
@@ -66,19 +66,19 @@ static BOOL ExecCommand(TCHAR *pszCmd)
 
    while(1)
    {
-      pResponce = RecvMsg();
-      if (pResponce == NULL)
+      pResponse = RecvMsg();
+      if (pResponse == NULL)
       {
          printf("Connection closed\n");
          bConnClosed = TRUE;
          break;
       }
 
-      wCode = pResponce->GetCode();
+      wCode = pResponse->GetCode();
       switch(wCode)
       {
          case CMD_ADM_MESSAGE:
-            pszText = pResponce->GetVariableStr(VID_MESSAGE);
+            pszText = pResponse->GetVariableStr(VID_MESSAGE);
             if (pszText != NULL)
             {
                fputs(pszText, stdout);
@@ -88,7 +88,7 @@ static BOOL ExecCommand(TCHAR *pszCmd)
          default:
             break;
       }
-      delete pResponce;
+      delete pResponse;
       if (wCode == CMD_REQUEST_COMPLETED)
          break;
    }
index 2b1d4f4..9f94653 100644 (file)
@@ -106,12 +106,12 @@ static int List(AgentConnection *pConn, char *pszParam)
 //
 
 static int CheckService(AgentConnection *pConn, int iServiceType, DWORD dwServiceAddr,
-                        WORD wProto, WORD wPort, char *pszRequest, char *pszResponce)
+                        WORD wProto, WORD wPort, char *pszRequest, char *pszResponse)
 {
    DWORD dwStatus, dwError;
 
    dwError = pConn->CheckNetworkService(&dwStatus, dwServiceAddr, iServiceType, wPort,
-                                        wProto, pszRequest, pszResponce);
+                                        wProto, pszRequest, pszResponse);
    if (dwError == ERR_SUCCESS)
    {
       printf("Service status: %d\n", dwStatus);
@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
    WORD wAgentPort = AGENT_LISTEN_PORT, wServicePort = 0, wServiceProto = 0;
    DWORD dwTimeout = 3000, dwServiceAddr = 0, dwError;
    char szSecret[MAX_SECRET_LENGTH] = "", szRequest[MAX_DB_STRING] = "";
-   char szKeyFile[MAX_PATH] = DEFAULT_DATA_DIR DFILE_KEYS, szResponce[MAX_DB_STRING] = "";
+   char szKeyFile[MAX_PATH] = DEFAULT_DATA_DIR DFILE_KEYS, szResponse[MAX_DB_STRING] = "";
    RSA *pServerKey = NULL;
 
    // Parse command line
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
                    "   -P <port>    : Specify network service port (to be used wth -S option).\n"
                    "   -q           : Quiet mode.\n"
                    "   -r <string>  : Service check request string.\n"
-                   "   -R <string>  : Service check expected responce string.\n"
+                   "   -R <string>  : Service check expected response string.\n"
                    "   -s <secret>  : Specify shared secret for authentication.\n"
                    "   -S <addr>    : Check state of network service at given address.\n"
                    "   -t <type>    : Set type of service to be checked.\n"
@@ -314,8 +314,8 @@ int main(int argc, char *argv[])
          case 'r':   // Service check request string
             strncpy(szRequest, optarg, MAX_DB_STRING);
             break;
-         case 'R':   // Service check responce string
-            strncpy(szResponce, optarg, MAX_DB_STRING);
+         case 'R':   // Service check response string
+            strncpy(szResponse, optarg, MAX_DB_STRING);
             break;
          case 's':   // Shared secret
             strncpy(szSecret, optarg, MAX_SECRET_LENGTH);
@@ -467,7 +467,7 @@ int main(int argc, char *argv[])
                         break;
                      case CMD_CHECK_SERVICE:
                         iExitCode = CheckService(&conn, iServiceType, dwServiceAddr,
-                                                 wServiceProto, wServicePort, szRequest, szResponce);
+                                                 wServiceProto, wServicePort, szRequest, szResponse);
                         break;
                      case CMD_GET_PARAMS:
                         iExitCode = ListParameters(&conn);
index 0e5292a..423fbf4 100644 (file)
@@ -43,7 +43,7 @@ static DWORD m_dwTimeout = 3000;
 int GetData(int argc, char *argv[])
 {
    SNMP_Transport *pTransport;
-   SNMP_PDU *request, *responce;
+   SNMP_PDU *request, *response;
    DWORD dwResult;
    int i, iExit = 0;
 
@@ -78,17 +78,17 @@ int GetData(int argc, char *argv[])
          }
       }
 
-      // Send request and process responce
+      // Send request and process response
       if (iExit == 0)
       {
-         if ((dwResult = pTransport->DoRequest(request, &responce, m_dwTimeout, 3)) == SNMP_ERR_SUCCESS)
+         if ((dwResult = pTransport->DoRequest(request, &response, m_dwTimeout, 3)) == SNMP_ERR_SUCCESS)
          {
             SNMP_Variable *var;
             char szBuffer[1024];
 
-            for(i = 0; i < (int)responce->GetNumVariables(); i++)
+            for(i = 0; i < (int)response->GetNumVariables(); i++)
             {
-               var = responce->GetVariable(i);
+               var = response->GetVariable(i);
                if (var->GetType() == ASN_NO_SUCH_OBJECT)
                {
                   printf("No such object: %s\n", var->GetName()->GetValueAsText());
@@ -103,7 +103,7 @@ int GetData(int argc, char *argv[])
                          var->GetType(),var->GetValueAsString(szBuffer, 1024));
                }
             }
-            delete responce;
+            delete response;
          }
          else
          {