Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 626519f8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "floss: Support multiple advertising sets"

parents 91c37049 4ce3aa4d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -440,7 +440,7 @@ impl IAdvertisingSetCallback for AdvertisingSetCallback {
        let mut context = self.context.lock().unwrap();
        if status != AdvertisingStatus::Success {
            print_error!(
                "on_advertising_set_started: remove advertising set registered ({})",
                "on_advertising_set_started: removing advertising set registered ({})",
                reg_id
            );
            context.adv_sets.remove(&reg_id);
@@ -464,7 +464,6 @@ impl IAdvertisingSetCallback for AdvertisingSetCallback {

    fn on_advertising_set_stopped(&self, advertiser_id: i32) {
        print_info!("on_advertising_set_stopped: advertiser_id = {}", advertiser_id);
        self.context.lock().unwrap().adv_sets.retain(|_, s| s.adv_id != Some(advertiser_id));
    }

    fn on_advertising_enabled(&self, advertiser_id: i32, enable: bool, status: AdvertisingStatus) {
+0 −5
Original line number Diff line number Diff line
@@ -951,11 +951,6 @@ impl CommandHandler {
            "on" => {
                let mut context = self.context.lock().unwrap();

                if context.adv_sets.keys().len() > 0 {
                    print_error!("Already started advertising");
                    return;
                }

                let s = AdvSet::new();
                let reg_id = context.gatt_dbus.as_mut().unwrap().start_advertising_set(
                    s.params.clone(),