File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -73,20 +73,19 @@ class PrivacyDevice : private mbed::NonCopyable<PrivacyDevice>,
73
73
if (_ble.hasInitialized ()) {
74
74
/* ble instance already initialised, skip init and start activity */
75
75
start ();
76
- return ;
77
- }
78
-
79
- /* this will inform us off all events so we can schedule their handling
80
- * using our event queue */
81
- _ble.onEventsToProcess (
82
- makeFunctionPointer (this , &PrivacyDevice::schedule_ble_events)
83
- );
76
+ } else {
77
+ /* this will inform us off all events so we can schedule their handling
78
+ * using our event queue */
79
+ _ble.onEventsToProcess (
80
+ makeFunctionPointer (this , &PrivacyDevice::schedule_ble_events)
81
+ );
84
82
85
- error = _ble.init (this , &PrivacyDevice::on_init_complete);
83
+ ble_error_t error = _ble.init (this , &PrivacyDevice::on_init_complete);
86
84
87
- if (error) {
88
- printf (" Error returned by BLE::init.\r\n " );
89
- return ;
85
+ if (error) {
86
+ printf (" Error returned by BLE::init.\r\n " );
87
+ return ;
88
+ }
90
89
}
91
90
92
91
/* this will not return until shutdown */
You can’t perform that action at this time.
0 commit comments