Fixed bug in trap log processing
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 8 Mar 2006 09:39:32 +0000 (09:39 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 8 Mar 2006 09:39:32 +0000 (09:39 +0000)
src/libnxcl/snmptrap.cpp
src/server/core/session.cpp

index 60b9fde..329bc78 100644 (file)
@@ -255,7 +255,7 @@ void ProcessTrapLogRecords(NXCL_Session *pSession, CSCPMessage *pMsg)
    {
       rec.qwId = pMsg->GetVariableInt64(dwId++);
       rec.dwTimeStamp = pMsg->GetVariableLong(dwId++);
-      rec.dwIpAddr = pMsg->GetVariableShort(dwId++);
+      rec.dwIpAddr = pMsg->GetVariableLong(dwId++);
       rec.dwObjectId = pMsg->GetVariableLong(dwId++);
       pMsg->GetVariableStr(dwId++, rec.szTrapOID, MAX_DB_STRING);
       rec.pszTrapVarbinds = pMsg->GetVariableStr(dwId++);
index f3f5afb..f63438c 100644 (file)
@@ -6275,7 +6275,7 @@ void ClientSession::SendTrapLog(CSCPMessage *pRequest)
             msg.SetVariable(dwId++, DBGetFieldAsyncIPAddr(hResult, 2));
             msg.SetVariable(dwId++, DBGetFieldAsyncULong(hResult, 3));
             msg.SetVariable(dwId++, DBGetFieldAsync(hResult, 4, szBuffer, 256));
-            DBGetFieldAsync(hResult, 7, szBuffer, 4096);
+            DBGetFieldAsync(hResult, 5, szBuffer, 4096);
             DecodeSQLString(szBuffer);
             msg.SetVariable(dwId++, szBuffer);
          }