mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-25 16:43:28 +00:00
don't stop BTdaemon on power down/client disconnect
This commit is contained in:
parent
15b09008ee
commit
fe19fafb3a
3
TODO.txt
3
TODO.txt
@ -21,7 +21,8 @@ NEXT:
|
|||||||
- DONE: stop all baseband connections on HCI_POWER_OFF
|
- DONE: stop all baseband connections on HCI_POWER_OFF
|
||||||
- DONE: handle HCI_POWER_ON and HCI_POWER_OFF in existing 4 states
|
- DONE: handle HCI_POWER_ON and HCI_POWER_OFF in existing 4 states
|
||||||
- DONE: store data of remote db on every change
|
- DONE: store data of remote db on every change
|
||||||
- don't stop BTdaemon on power down/client disconnect
|
- DONE: don't stop BTdaemon on power down/client disconnect
|
||||||
|
- handle transition for HCI_POWER_SLEEP and all HCI state transitions
|
||||||
- decide on configure flags
|
- decide on configure flags
|
||||||
- clean up components
|
- clean up components
|
||||||
|
|
||||||
|
@ -212,17 +212,8 @@ static void dummy_bluetooth_status_handler(BLUETOOTH_STATE state){
|
|||||||
static void (*bluetooth_status_handler)(BLUETOOTH_STATE state) = dummy_bluetooth_status_handler;
|
static void (*bluetooth_status_handler)(BLUETOOTH_STATE state) = dummy_bluetooth_status_handler;
|
||||||
|
|
||||||
static void daemon_no_connections_timeout(){
|
static void daemon_no_connections_timeout(){
|
||||||
#if 1
|
|
||||||
#ifdef USE_LAUNCHD
|
|
||||||
printf("No connection for %u seconds -> POWER OFF and quit\n", DAEMON_NO_CONNECTION_TIMEOUT/1000);
|
|
||||||
hci_power_control( HCI_POWER_OFF);
|
|
||||||
hci_close();
|
|
||||||
exit(0);
|
|
||||||
#else
|
|
||||||
printf("No connection for %u seconds -> POWER OFF\n", DAEMON_NO_CONNECTION_TIMEOUT/1000);
|
printf("No connection for %u seconds -> POWER OFF\n", DAEMON_NO_CONNECTION_TIMEOUT/1000);
|
||||||
hci_power_control( HCI_POWER_OFF);
|
hci_power_control( HCI_POWER_OFF);
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int btstack_command_handler(connection_t *connection, uint8_t *packet, uint16_t size){
|
static int btstack_command_handler(connection_t *connection, uint8_t *packet, uint16_t size){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user