Call to SOPC_Toolkit_Clear never returns: a Secure Channel is never notified as closed to Services layer
Description
In some case call to SOPC_Toolkit_Clear never returns because a Secure Channel is never notified as closed to Services layer
Analysis
In the Secure Channel layer MAX index was considered invalid in the SC_CloseConnection function whereas valid indexes are 1..MAX. The SC was never indicated as closed which could lead toolkit Clear function to never terminates (waiting all SC closed) if the SC with this index was connected on SOPC_Toolkit_Clear.