Skip to content

Commit

Permalink
cleanup(libsinsp): init m_agent_info
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Terzolo <andrea.terzolo@polito.it>
Co-authored-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
  • Loading branch information
3 people committed Mar 27, 2023
1 parent a56acbe commit aca8669
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions userspace/libsinsp/sinsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ sinsp::sinsp(bool static_container, const std::string &static_id, const std::str
m_filter = NULL;
m_fds_to_remove = new std::vector<int64_t>;
m_machine_info = NULL;
m_agent_info = NULL;
#ifdef SIMULATE_DROP_MODE
m_isdropping = false;
#endif
Expand Down Expand Up @@ -319,6 +320,15 @@ void sinsp::init()
m_num_cpus = 0;
}

//
// Retrieve agent information
//
m_agent_info = scap_get_agent_info(m_h);
if (m_agent_info == NULL)
{
ASSERT(false);
}

//
// Attach the protocol decoders
//
Expand Down

0 comments on commit aca8669

Please sign in to comment.