Prevent ble.shutdown() as it corrupts something...
This commit is contained in:
parent
b5c4082988
commit
4109e3053f
|
@ -995,6 +995,10 @@ static int lble_init(lua_State *L) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lble_shutdown(lua_State *L) {
|
static int lble_shutdown(lua_State *L) {
|
||||||
|
// It seems that shutting down the stack corrupts some critical data structures
|
||||||
|
// so, for now, don't allow it.
|
||||||
|
luaL_error(L, "Shutting down the BLE stack is currently not possible");
|
||||||
|
|
||||||
inited = SHUTTING;
|
inited = SHUTTING;
|
||||||
|
|
||||||
ble_gap_adv_stop();
|
ble_gap_adv_stop();
|
||||||
|
|
|
@ -57,7 +57,8 @@ ble.advertise("foo")
|
||||||
|
|
||||||
## ble.shutdown()
|
## ble.shutdown()
|
||||||
|
|
||||||
Shuts down the BlueTooth controller and returns it to the state where another `init` ought to work (but currently doesn't).
|
Shuts down the BlueTooth controller and returns it to the state where another `init` ought to work (but currently doesn't). And, at the moment, shutting
|
||||||
|
it down doesn't work either -- it appears to corrupt some deep data structures.
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
`ble.shutdown()`
|
`ble.shutdown()`
|
||||||
|
|
Loading…
Reference in New Issue