File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
ble-api-implementation/source Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1007,6 +1007,7 @@ class Gap {
1007
1007
* This call will attempt to cancel the most recently requested connection.
1008
1008
*
1009
1009
* @return BLE_ERROR_NONE if the connection attempt has been requested to be cancelled.
1010
+ * Returns BLE_ERROR_OPERATION_NOT_PERMITTED if no ongoing connection for last used address found.
1010
1011
*/
1011
1012
MBED_DEPRECATED_SINCE (" mbed-os-6.3.0" , " Defective API. Please use the cancelConnect that takes peer address as parameters." )
1012
1013
ble_error_t cancelConnect();
@@ -1019,6 +1020,7 @@ class Gap {
1019
1020
* @param peerAddress Address you want to cancel connection process for.
1020
1021
*
1021
1022
* @return BLE_ERROR_NONE if the connection attempt has been requested to be cancelled.
1023
+ * Returns BLE_ERROR_OPERATION_NOT_PERMITTED if no ongoing connection for address found.
1022
1024
*/
1023
1025
ble_error_t cancelConnect (
1024
1026
peer_address_type_t peerAddressType,
Original file line number Diff line number Diff line change @@ -335,11 +335,11 @@ ble_error_t PalGap::cancel_connection_creation(
335
335
/* connection handle */ connection_id,
336
336
/* reason - invalid (use success) */ 0x00
337
337
);
338
- break ;
338
+ return BLE_ERROR_NONE ;
339
339
}
340
340
}
341
341
342
- return BLE_ERROR_NONE ;
342
+ return BLE_ERROR_OPERATION_NOT_PERMITTED ;
343
343
}
344
344
345
345
Original file line number Diff line number Diff line change @@ -635,7 +635,7 @@ ble_error_t Gap::cancelConnect()
635
635
if (_last_used_peer_address_type != peer_address_type_t ::ANONYMOUS) {
636
636
return cancelConnect (_last_used_peer_address_type, _last_used_peer_address);
637
637
}
638
- return BLE_ERROR_NONE ;
638
+ return BLE_ERROR_OPERATION_NOT_PERMITTED ;
639
639
}
640
640
641
641
ble_error_t Gap::cancelConnect (
You can’t perform that action at this time.
0 commit comments