Skip to content

Commit

Permalink
chore(userspace/libsinsp): make threadinfo check more trivial
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
  • Loading branch information
2 people authored and poiana committed May 25, 2023
1 parent 15b754f commit 6a1fade
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions userspace/libsinsp/filterchecks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1312,19 +1312,10 @@ uint8_t* sinsp_filter_check_fd::extract(sinsp_evt *evt, OUT uint32_t* len, bool
break;
case TYPE_UID:
{
// note: we need to skip events that have no thread info
if(evt->get_type() == PPME_CONTAINER_JSON_E ||
evt->get_type() == PPME_CONTAINER_JSON_2_E ||
evt->get_type() == PPME_USER_ADDED_E ||
evt->get_type() == PPME_USER_DELETED_E ||
evt->get_type() == PPME_GROUP_ADDED_E ||
evt->get_type() == PPME_GROUP_DELETED_E ||
evt->get_type() == PPME_PLUGINEVENT_E ||
evt->get_type() == PPME_ASYNCEVENT_E)
if(m_tinfo == nullptr)
{
return NULL;
}
ASSERT(m_tinfo != NULL);

m_tstr = to_string(m_tinfo->m_tid) + to_string(m_tinfo->m_lastevent_fd);
RETURN_EXTRACT_STRING(m_tstr);
Expand Down

0 comments on commit 6a1fade

Please sign in to comment.