| 408 | } |
| 409 | |
| 410 | bool KernelSML::HandleDestroyAgent(AgentSML* pAgentSML, char const* /*pCommandName*/, Connection* /*pConnection*/, AnalyzeXML* /*pIncoming*/, soarxml::ElementXML* /*pResponse*/) |
| 411 | { |
| 412 | if (!pAgentSML) |
| 413 | { |
| 414 | return false ; |
| 415 | } |
| 416 | |
| 417 | FireAgentEvent(pAgentSML, smlEVENT_BEFORE_AGENT_DESTROYED); |
| 418 | |
| 419 | // Close log |
| 420 | if (m_CommandLineInterface.IsLogOpen()) |
| 421 | { |
| 422 | m_CommandLineInterface.DoCommand(0, pAgentSML, "clog --close", false, true, 0) ; |
| 423 | } |
| 424 | |
| 425 | // Release any wmes or other objects we're keeping |
| 426 | pAgentSML->DeleteSelf() ; |
| 427 | pAgentSML = NULL ; // At this point the pointer is invalid so clear it. |
| 428 | |
| 429 | return true ; |
| 430 | } |
| 431 | |
| 432 | // Shutdown is an irrevocal request to delete all agents and prepare for kernel deletion. |
| 433 | bool KernelSML::HandleShutdown(AgentSML* /*pAgentSML*/, char const* /*pCommandName*/, Connection* /*pConnection*/, AnalyzeXML* /*pIncoming*/, soarxml::ElementXML* /*pResponse*/) |
nothing calls this directly
no test coverage detected