Skip to content
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

More Highsierra work #7

Merged
merged 2 commits into from
Feb 1, 2018
Merged

Conversation

jacobrosenthal
Copy link

ping #3

darwin/device.go Outdated
@@ -507,7 +507,8 @@ func (d *Device) HandleXpcEvent(event xpc.Dict, err error) {
case evtCharacteristicRead:
// Notification
c := d.conn(args)
if args.isNotification() != 0 {

// if args.isNotification() != 0 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jacobrosenthal this is great, thanks for working on this. I would suggest removing instead of commenting, please.

darwin/device.go Outdated
@@ -516,7 +517,7 @@ func (d *Device) HandleXpcEvent(event xpc.Dict, err error) {
sub.fn(args.data())
}
break
}
// }
c.rspc <- m

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jacobrosenthal once again, thanks for working on this. Now that you have removed the condition, this line of code is unreachable, and is why the build is failing, due to the go vet check.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words, this line can, and should be removed, as it is no longer needed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moogle19 done, but then that break means the go channel thing on the next line is never happening..

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line c.rspc <- m is to send message m to the channel c.rspc if not handled by the preceding code. Since your change handled m, no need to send now. That is why go get says that line should be removed.

@deadprogram
Copy link

@jacobrosenthal pretty please with sugar on top!

@jacobrosenthal jacobrosenthal force-pushed the highsierra2-upstream branch 2 times, most recently from c7b611c to 2e4f05c Compare January 12, 2018 00:11
@jacobrosenthal
Copy link
Author

Rebased to pull that commented code out. I would test this though, Im not a go guy and I barely understand that code flow. Also fixed a few more xpcids from reports on the noble side.

@deadprogram
Copy link

@moogle19 seems like this is ready to merge, no?

@jacobrosenthal
Copy link
Author

So I've found via noble the args.isNotification wasn't a goble implementation anomaly, but was actually removed from the xpcids. So I'm now confident in that removal. Weve shipped these xpcids in noble 1.8.0 as of today.

@moogle19 moogle19 merged commit cb19fdf into go-ble:master Feb 1, 2018
@moogle19
Copy link

moogle19 commented Feb 1, 2018

@jacobrosenthal Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants