fn run_regulatory_manager(
    iface_manager: Arc<Mutex<dyn IfaceManagerApi + Send>>,
    regulatory_sender: oneshot::Sender<()>,
) -> BoxFuture<'static, Result<(), Error>> {
    match fuchsia_component::client::connect_to_protocol::<RegulatoryRegionWatcherMarker>() {
        Ok(regulatory_svc) => {
            let regulatory_manager = RegulatoryManager::new(regulatory_svc, iface_manager);
            let regulatory_fut = async move {
                regulatory_manager.run(regulatory_sender).await.unwrap_or_else(|e| {
                    error!("regulatory manager failed: {:?}", e);
                });
                Ok(())
            };

            Box::pin(regulatory_fut)
        }
        Err(e) => {
            error!("could not connect to regulatory manager: {:?}", e);
            let regulatory_fut = async move { Ok(()) };
            Box::pin(regulatory_fut)
        }
    }
}
// Some builds will not include the RegulatoryRegionWatcher.  In such cases, wlancfg can continue
// to run, though it will not be able to set its country code and will fallback to world wide.
Some builds will not include the RegulatoryRegionWatcher.  In such cases, wlancfg can continue
to run, though it will not be able to set its country code and will fallback to world wide.
Some builds will not include the RegulatoryRegionWatcher . In such cases wlancfg can continue to run though it will not be able to set its country code and will fallback to world wide .
fn run_regulatory_manager(
    iface_manager: Arc<Mutex<dyn IfaceManagerApi + Send>>,
    regulatory_sender: oneshot::Sender<()>,
) -> BoxFuture<'static, Result<(), Error>> {
    match fuchsia_component::client::connect_to_protocol::<RegulatoryRegionWatcherMarker>() {
        Ok(regulatory_svc) => {
            let regulatory_manager = RegulatoryManager::new(regulatory_svc, iface_manager);
            let regulatory_fut = async move {
                regulatory_manager.run(regulatory_sender).await.unwrap_or_else(|e| {
                    error!("regulatory manager failed: {:?}", e);
                });
                Ok(())
            };
            Box::pin(regulatory_fut)
        }
        Err(e) => {
            error!("could not connect to regulatory manager: {:?}", e);
            let regulatory_fut = async move { Ok(()) };
            Box::pin(regulatory_fut)
        }
    }
}
fn run_regulatory_manager ( iface_manager : Arc < Mutex < dyn IfaceManagerApi + Send > > , regulatory_sender : oneshot :: Sender < ( ) > , ) -> BoxFuture < ' static , Result < ( ) , Error > > { match fuchsia_component :: client :: connect_to_protocol :: < RegulatoryRegionWatcherMarker > ( ) { Ok ( regulatory_svc ) => { let regulatory_manager = RegulatoryManager :: new ( regulatory_svc , iface_manager ) ; let regulatory_fut = async move { regulatory_manager . run ( regulatory_sender ) . await . unwrap_or_else ( | e | { error ! ( " " e ) ; } ) ; Ok ( ( ) ) } ; Box :: pin ( regulatory_fut ) } Err ( e ) => { error ! ( " " e ) ; let regulatory_fut = async move { Ok ( ( ) ) } ; Box :: pin ( regulatory_fut ) } } }
Some builds will not include the RegulatoryRegionWatcher.
Some builds will not include the RegulatoryRegionWatcher .
iface_manager
Arc<Mutex<dyn IfaceManagerApi + Send>>
regulatory_sender
oneshot::Sender<()>
iface_manager
Arc<Mutex<dyn IfaceManagerApi + Send>>
regulatory_sender
oneshot::Sender<()>