diff options
Diffstat (limited to 'wilink_6_1/stad/src/Connection_Managment/externalSec.c')
-rw-r--r-- | wilink_6_1/stad/src/Connection_Managment/externalSec.c | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/wilink_6_1/stad/src/Connection_Managment/externalSec.c b/wilink_6_1/stad/src/Connection_Managment/externalSec.c index 0b470e8..5e4c924 100644 --- a/wilink_6_1/stad/src/Connection_Managment/externalSec.c +++ b/wilink_6_1/stad/src/Connection_Managment/externalSec.c @@ -115,8 +115,6 @@ TI_STATUS externalSec_config(mainSec_t *pMainSec) return status; } - - /** * * Function - externalSec_create. @@ -162,6 +160,41 @@ struct externalSec_t* externalSec_create(TI_HANDLE hOs) /** * +* Function - externalSec_unload. +* +* \b Description: +* +* Called by mainSecSM (mainSec_unload). +* +* \b ARGS: +* +* +* \b RETURNS: +* +* TI_STATUS - 0 on success, any other value on failure. +* +*/ +TI_STATUS externalSec_unload(struct externalSec_t *pExternalSec) +{ + TI_STATUS status; + + if (!pExternalSec) + { + return TI_NOK; + } + status = fsm_Unload(pExternalSec->hOs, pExternalSec->pExternalSecSm); + if (status != TI_OK) + { + /* report failure but don't stop... */ + TRACE0(pExternalSec->hReport, REPORT_SEVERITY_ERROR, "EXTERNAL SECURITY: Error releasing FSM memory \n"); + } + + os_memoryFree(pExternalSec->hOs, pExternalSec, sizeof(struct externalSec_t)); + return TI_OK; +} + +/** +* * Function - externalSecSM_start. * * \b Description: @@ -321,4 +354,3 @@ TI_STATUS externalSecSM_Unexpected(struct externalSec_t *pExternalSec) TRACE0(pExternalSec->hReport, REPORT_SEVERITY_ERROR, "EXTERNAL_SEC_SM: ERROR UnExpected Event\n"); return(TI_OK); } - |