Skip to content

Commit 1e82083

Browse files
jasondellalucepoiana
authored andcommitted
fix: revert 18e4fd8
Signed-off-by: Jason Dellaluce <[email protected]>
1 parent 642aa14 commit 1e82083

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

userspace/libsinsp/sinsp.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,13 @@ int32_t sinsp::next(OUT sinsp_evt **puevt)
13081308
get_procs_cpu_from_driver(ts);
13091309
}
13101310

1311-
// this is used by things like the k8s and mesos clients
1311+
//
1312+
// Store a couple of values that we'll need later inside the event.
1313+
// These are potentially used both for parsing the event for internal
1314+
// state management, and for managing the k8s and mesos clients.
1315+
//
1316+
m_nevts++;
1317+
evt->m_evtnum = m_nevts;
13121318
m_lastevent_ts = ts;
13131319

13141320
if (m_automatic_threadtable_purging)
@@ -1456,10 +1462,6 @@ int32_t sinsp::next(OUT sinsp_evt **puevt)
14561462
m_parser->process_event(evt);
14571463
#endif
14581464

1459-
// set the event number
1460-
m_nevts++;
1461-
evt->m_evtnum = m_nevts;
1462-
14631465
//
14641466
// If needed, dump the event to file
14651467
//

0 commit comments

Comments
 (0)