all: fix bug that caused a copied DefaultAdapter
The DefaultAdapter was a regular value, not a pointer-to-struct. This meant that simply copying bluetooth.DefaultAdapter caused a copy of the object itself (instead of a copy of the reference, as intended). This meant that write events did not arrive.
This commit is contained in:
parent
37eb64b519
commit
f69df9d879
2 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ type Adapter struct {
|
||||||
// it will return the SoftDevice interface.
|
// it will return the SoftDevice interface.
|
||||||
//
|
//
|
||||||
// Make sure to call Enable() before using it to initialize the adapter.
|
// Make sure to call Enable() before using it to initialize the adapter.
|
||||||
var DefaultAdapter = Adapter{isDefault: true}
|
var DefaultAdapter = &Adapter{isDefault: true}
|
||||||
|
|
||||||
// Enable configures the BLE stack. It must be called before any
|
// Enable configures the BLE stack. It must be called before any
|
||||||
// Bluetooth-related calls (unless otherwise indicated).
|
// Bluetooth-related calls (unless otherwise indicated).
|
||||||
|
|
|
@ -12,7 +12,7 @@ type Adapter struct {
|
||||||
// DefaultAdapter is the default adapter on the system.
|
// DefaultAdapter is the default adapter on the system.
|
||||||
//
|
//
|
||||||
// Make sure to call Enable() before using it to initialize the adapter.
|
// Make sure to call Enable() before using it to initialize the adapter.
|
||||||
var DefaultAdapter = Adapter{}
|
var DefaultAdapter = &Adapter{}
|
||||||
|
|
||||||
// Enable configures the BLE stack. It must be called before any
|
// Enable configures the BLE stack. It must be called before any
|
||||||
// Bluetooth-related calls (unless otherwise indicated).
|
// Bluetooth-related calls (unless otherwise indicated).
|
||||||
|
|
Loading…
Reference in a new issue