void SocketFinalize( TSS2_TCTI_CONTEXT *tctiContext /* in */ ) { if( tctiContext != NULL ) { // Send session end messages to servers. SendSessionEndSocketTcti( tctiContext, 1 ); SendSessionEndSocketTcti( tctiContext, 0 ); CloseSockets( TCTI_CONTEXT_INTEL->otherSock, TCTI_CONTEXT_INTEL->tpmSock ); free( tctiContext ); } }
TSS2_RC SocketFinalize( TSS2_TCTI_CONTEXT *tctiContext /* in */ ) { TSS2_RC rval = TSS2_RC_SUCCESS; if( tctiContext == NULL ) { rval = TSS2_TCTI_RC_BAD_REFERENCE; } else { // Send session end messages to servers. SendSessionEndSocketTcti( tctiContext, 1 ); SendSessionEndSocketTcti( tctiContext, 0 ); CloseSockets( TCTI_CONTEXT_INTEL->otherSock, TCTI_CONTEXT_INTEL->tpmSock ); free( tctiContext ); } return rval; }