-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error notification when using host mode (no device) #38
base: main
Are you sure you want to change the base?
Conversation
- When creating an EventStream with no device (dev number is 0) there would be a failed assertion message to stderr. The event stream device uuid is only gotten if the device number if non-zero. - Added unit test to create an event stream in host mode - Made temp file permissions non-executable
This is a duplicate of #32 although it solves the problem differently. |
#32 does not appear to fix the issue. I closed this PR in haste apparently (re-opening). |
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
==========================================
+ Coverage 71.18% 73.01% +1.82%
==========================================
Files 3 3
Lines 288 289 +1
==========================================
+ Hits 205 211 +6
+ Misses 61 57 -4
+ Partials 22 21 -1
Continue to review full report at Codecov.
|
@patsoffice Thanks for the patch. This will need a little more work to support multiple versions of Go. Let's wait for #41 to be reviewed and merged and then we can tackle this. |
@@ -158,7 +158,9 @@ func (es *EventStream) Start() { | |||
// in C callback | |||
cbInfo := registry.Add(es) | |||
es.registryID = cbInfo | |||
es.uuid = GetDeviceUUID(es.Device) | |||
if es.Device != 0 { |
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.
I'm not sure if this will need to be revised in light of the changes in #41.
We need to rebase this against master and test it with multiple versions of Go.
@patsoffice Do you want to take another look at this? |
Changes
a failed assertion message to stderr. The event stream device uuid is only
gotten if the device number if non-zero.
What does this pull request do?
When creating an EventStream with no device (dev id 0), there would be a failed assertion message output.
This pull request changes the package to only get a device uuid if the device id is non-zero.
How should this be manually tested?
This can be tested by running: