OSDN Git Service

rusty-gd: make sure to notify HCI shim on stack start
authorZach Johnson <zachoverflow@google.com>
Wed, 10 Feb 2021 18:38:13 +0000 (10:38 -0800)
committerZach Johnson <zachoverflow@google.com>
Wed, 10 Feb 2021 18:38:13 +0000 (10:38 -0800)
this way it can register for events, etc

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost DirectHciTest
Change-Id: Iec2fb8b7dfe67dd843cc546eec217aa688f3c629

gd/rust/hci/src/lib.rs
main/shim/stack.cc

index a8af09e..c194de8 100644 (file)
@@ -224,7 +224,7 @@ async fn dispatch(
                                 }
                             },
                             None if code == EventCode::NumberOfCompletedPackets =>{},
-                            None => panic!("Unhandled subevent {:?}", code),
+                            None => panic!("Unhandled event {:?}", code),
                         }
                     },
                 }
index 94e272e..52daab4 100644 (file)
@@ -81,6 +81,7 @@ void Stack::StartEverything() {
       rust_controller_ = new ::rust::Box<rust::Controller>(
           rust::get_controller(**rust_stack_));
     }
+    bluetooth::shim::hci_on_reset_complete();
     return;
   }