-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
new(userspace/libsinsp): expose get_owner_last_error
in plugin's capture listening capability
#2147
Conversation
…pture listening capability. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/milestone 0.19.0 |
// Return a string with the error that was last generated by the plugin's | ||
// owner, or NULL if no error is present. | ||
// The string pointer is owned by the plugin's owenr. | ||
const char* (*get_owner_last_error)(ss_plugin_owner_t* o); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed to expose table_reader
and table_writer
from plugin sdks.
@@ -371,7 +371,10 @@ void sinsp::open_common(scap_open_args* oargs, | |||
// notify registered plugins of capture open | |||
for(auto& p : m_plugin_manager->plugins()) { | |||
if(p->caps() & CAP_CAPTURE_LISTENING) { | |||
p->capture_open(); | |||
if(!p->capture_open()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manage errors in capture_open/close.
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2147 +/- ##
==========================================
- Coverage 74.69% 74.68% -0.02%
==========================================
Files 254 254
Lines 33502 33508 +6
Branches 5746 5753 +7
==========================================
Hits 25025 25025
- Misses 8477 8483 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: