softdevice: fix event handler

This commit is contained in:
Ayke van Laethem 2019-11-16 19:00:18 +01:00
parent ca2f0920f9
commit 6ded078c91
No known key found for this signature in database
GPG Key ID: E97FF5335DFDFDED

@ -114,13 +114,13 @@ func (a *Adapter) Enable() error {
}
func handleEvent() {
handler := defaultAdapter.handler
if handler == nil {
return
}
id := eventBuf.header.evt_id
switch {
case id >= C.BLE_GAP_EVT_BASE && id <= C.BLE_GAP_EVT_LAST:
handler := defaultAdapter.handler
if handler == nil {
return
}
gapEvent := GAPEvent{
Connection: Connection(eventBuf.evt.unionfield_gap_evt().conn_handle),
}