@@ -104,12 +104,6 @@ impl StateMachine {
104104 selector
105105 . send ( DeviceSelectorEvent :: ImAToken ( ( dev. id ( ) , tx) ) )
106106 . ok ( ) ?;
107- send_status (
108- status,
109- crate :: StatusUpdate :: DeviceAvailable {
110- dev_info : dev. get_device_info ( ) ,
111- } ,
112- ) ;
113107
114108 // We can be cancelled from the user (through keep_alive()) or from the device selector
115109 // (through a DeviceCommand::Cancel on rx). We'll combine those signals into a single
@@ -130,11 +124,6 @@ impl StateMachine {
130124 selector
131125 . send ( DeviceSelectorEvent :: SelectedToken ( dev. id ( ) ) )
132126 . ok ( ) ?;
133-
134- send_status (
135- status,
136- crate :: StatusUpdate :: DeviceSelected ( dev. get_device_info ( ) ) ,
137- ) ;
138127 }
139128 BlinkResult :: Cancelled => {
140129 info ! ( "Device {:?} was not selected" , dev. id( ) ) ;
@@ -148,20 +137,10 @@ impl StateMachine {
148137 }
149138 Ok ( DeviceCommand :: Removed ) => {
150139 info ! ( "Device {:?} was removed" , dev. id( ) ) ;
151- send_status (
152- status,
153- crate :: StatusUpdate :: DeviceUnavailable {
154- dev_info : dev. get_device_info ( ) ,
155- } ,
156- ) ;
157140 return None ;
158141 }
159142 Ok ( DeviceCommand :: Continue ) => {
160143 // Just continue
161- send_status (
162- status,
163- crate :: StatusUpdate :: DeviceSelected ( dev. get_device_info ( ) ) ,
164- ) ;
165144 }
166145 Err ( _) => {
167146 warn ! ( "Error when trying to receive messages from DeviceSelector! Exiting." ) ;
@@ -432,13 +411,6 @@ impl StateMachine {
432411 return ;
433412 }
434413
435- send_status (
436- & status,
437- crate :: StatusUpdate :: DeviceAvailable {
438- dev_info : dev. get_device_info ( ) ,
439- } ,
440- ) ;
441-
442414 // Iterate the exclude list and see if there are any matches.
443415 // If so, we'll keep polling the device anyway to test for user
444416 // consent, to be consistent with CTAP2 device behavior.
@@ -476,22 +448,13 @@ impl StateMachine {
476448 break ;
477449 }
478450 } ;
479- let dev_info = dev. get_device_info ( ) ;
480- send_status ( & status, crate :: StatusUpdate :: Success { dev_info } ) ;
481451 callback. call ( Ok ( RegisterResult :: CTAP2 ( result) ) ) ;
482452 break ;
483453 }
484454
485455 // Sleep a bit before trying again.
486456 thread:: sleep ( Duration :: from_millis ( 100 ) ) ;
487457 }
488-
489- send_status (
490- & status,
491- crate :: StatusUpdate :: DeviceUnavailable {
492- dev_info : dev. get_device_info ( ) ,
493- } ,
494- ) ;
495458 } ,
496459 ) ;
497460
@@ -566,13 +529,6 @@ impl StateMachine {
566529 return ;
567530 }
568531
569- send_status (
570- & status,
571- crate :: StatusUpdate :: DeviceAvailable {
572- dev_info : dev. get_device_info ( ) ,
573- } ,
574- ) ;
575-
576532 send_status ( & status, crate :: StatusUpdate :: PresenceRequired ) ;
577533
578534 ' outer: while alive ( ) {
@@ -611,8 +567,6 @@ impl StateMachine {
611567 break ' outer;
612568 }
613569 } ;
614- let dev_info = dev. get_device_info ( ) ;
615- send_status ( & status, crate :: StatusUpdate :: Success { dev_info } ) ;
616570 callback. call ( Ok ( SignResult :: CTAP2 ( result) ) ) ;
617571 break ' outer;
618572 }
@@ -622,13 +576,6 @@ impl StateMachine {
622576 // Sleep a bit before trying again.
623577 thread:: sleep ( Duration :: from_millis ( 100 ) ) ;
624578 }
625-
626- send_status (
627- & status,
628- crate :: StatusUpdate :: DeviceUnavailable {
629- dev_info : dev. get_device_info ( ) ,
630- } ,
631- ) ;
632579 } ,
633580 ) ;
634581
@@ -673,7 +620,6 @@ impl StateMachine {
673620 & status,
674621 crate :: StatusUpdate :: InteractiveManagement ( (
675622 tx,
676- dev. get_device_info ( ) ,
677623 dev. get_authenticator_info ( ) . cloned ( ) ,
678624 ) ) ,
679625 ) ;
0 commit comments