Skip to content

Commit

Permalink
Clear shutdown callchain after exec callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Amaya Garcia authored and Andres Amaya Garcia committed Dec 16, 2015
1 parent 0781293 commit 0024b78
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions ble/Gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ class Gap {
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;
Expand Down
1 change: 1 addition & 0 deletions ble/GattClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ class GattClient {
virtual ble_error_t reset(void) {
/* Notify that the instance is about to shutdown */
shutdownCallChain.call(this);
shutdownCallChain.clear();

onDataReadCallbackChain.clear();
onDataWriteCallbackChain.clear();
Expand Down
1 change: 1 addition & 0 deletions ble/GattServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ class GattServer {
virtual ble_error_t reset(void) {
/* Notify that the instance is about to shutdown */
shutdownCallChain.call(this);
shutdownCallChain.clear();

serviceCount = 0;
characteristicCount = 0;
Expand Down
1 change: 1 addition & 0 deletions ble/SecurityManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ class SecurityManager {
virtual ble_error_t reset(void) {
/* Notify that the instance is about to shutdown */
shutdownCallChain.call(this);
shutdownCallChain.clear();

securitySetupInitiatedCallback = NULL;
securitySetupCompletedCallback = NULL;
Expand Down

0 comments on commit 0024b78

Please sign in to comment.