Clear shutdown callchain after exec callbacks

This commit is contained in:
Andres Amaya Garcia 2015-12-16 16:43:04 +00:00
parent 0781293bda
commit 0024b78a39
4 changed files with 4 additions and 0 deletions

View File

@ -1047,6 +1047,7 @@ public:
virtual ble_error_t reset(void) {
/* Notify that the instance is about to shutdown */
shutdownCallChain.call(this);
shutdownCallChain.clear();
/* Clear Gap state */
state.advertising = 0;

View File

@ -376,6 +376,7 @@ public:
virtual ble_error_t reset(void) {
/* Notify that the instance is about to shutdown */
shutdownCallChain.call(this);
shutdownCallChain.clear();
onDataReadCallbackChain.clear();
onDataWriteCallbackChain.clear();

View File

@ -447,6 +447,7 @@ public:
virtual ble_error_t reset(void) {
/* Notify that the instance is about to shutdown */
shutdownCallChain.call(this);
shutdownCallChain.clear();
serviceCount = 0;
characteristicCount = 0;

View File

@ -284,6 +284,7 @@ public:
virtual ble_error_t reset(void) {
/* Notify that the instance is about to shutdown */
shutdownCallChain.call(this);
shutdownCallChain.clear();
securitySetupInitiatedCallback = NULL;
securitySetupCompletedCallback = NULL;