"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/agent/core/session.cpp" between
netxms-3.8.382.tar.gz and netxms-3.8.405.tar.gz

About: NetXMS is a multi-platform open source network management and monitoring system.

session.cpp  (netxms-3.8.382):session.cpp  (netxms-3.8.405)
skipping to change at line 339 skipping to change at line 339
TCHAR buffer[64]; TCHAR buffer[64];
debugPrintf(6, _T("Received message %s (%d)"), NXCPMessageCodeName(m sg->getCode(), buffer), msg->getId()); debugPrintf(6, _T("Received message %s (%d)"), NXCPMessageCodeName(m sg->getCode(), buffer), msg->getId());
uint32_t rcc; uint32_t rcc;
switch(msg->getCode()) switch(msg->getCode())
{ {
case CMD_REQUEST_COMPLETED: case CMD_REQUEST_COMPLETED:
m_responseQueue->put(msg); m_responseQueue->put(msg);
break; break;
case CMD_REQUEST_SESSION_KEY: case CMD_REQUEST_SESSION_KEY:
if (!m_encryptionContext) // cannot use != nullptr because HP -UX compiler does not understand it if (m_encryptionContext == nullptr)
{ {
NXCPEncryptionContext *encryptionContext = nullptr; NXCPEncryptionContext *encryptionContext = nullptr;
NXCPMessage *response = nullptr; NXCPMessage *response = nullptr;
SetupEncryptionContext(msg, &encryptionContext, &response, nullptr, m_protocolVersion); SetupEncryptionContext(msg, &encryptionContext, &response, nullptr, m_protocolVersion);
m_encryptionContext = shared_ptr<NXCPEncryptionContext>(enc ryptionContext); m_encryptionContext = shared_ptr<NXCPEncryptionContext>(enc ryptionContext);
sendMessage(response); sendMessage(response);
delete response; delete response;
receiver.setEncryptionContext(m_encryptionContext); receiver.setEncryptionContext(m_encryptionContext);
} }
delete msg; delete msg;
skipping to change at line 564 skipping to change at line 564
if (request == INVALID_POINTER_VALUE) // Session termination indicator if (request == INVALID_POINTER_VALUE) // Session termination indicator
break; break;
uint16_t command = request->getCode(); uint16_t command = request->getCode();
// Prepare response message // Prepare response message
NXCPMessage response(CMD_REQUEST_COMPLETED, request->getId(), m_protocolVe rsion); NXCPMessage response(CMD_REQUEST_COMPLETED, request->getId(), m_protocolVe rsion);
// Check if authentication required // Check if authentication required
if ((!m_authenticated) && (command != CMD_AUTHENTICATE)) if ((!m_authenticated) && (command != CMD_AUTHENTICATE))
{ {
debugPrintf(6, _T("Authentication required")); debugPrintf(6, _T("Authentication required"));
response.setField(VID_RCC, ERR_AUTH_REQUIRED); response.setField(VID_RCC, ERR_AUTH_REQUIRED);
} }
else if ((g_dwFlags & AF_REQUIRE_ENCRYPTION) && !m_encryptionContext) // cannot use != nullptr because HP-UX compiler does not understand it else if ((g_dwFlags & AF_REQUIRE_ENCRYPTION) && (m_encryptionContext == nu llptr))
{ {
debugPrintf(6, _T("Encryption required")); debugPrintf(6, _T("Encryption required"));
response.setField(VID_RCC, ERR_ENCRYPTION_REQUIRED); response.setField(VID_RCC, ERR_ENCRYPTION_REQUIRED);
} }
else else
{ {
switch(command) switch(command)
{ {
case CMD_AUTHENTICATE: case CMD_AUTHENTICATE:
authenticate(request, &response); authenticate(request, &response);
break; break;
case CMD_GET_PARAMETER: case CMD_GET_PARAMETER:
getParameter(request, &response); getParameter(request, &response);
 End of changes. 4 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)