2 * =====================================================================================
4 * Filename: CommandOpenSession.cpp
6 * Description: CommandOpenSession class
9 * Created: 23 April 2015 12:42:03 IST
13 * Author: CHERYL (cb), cheryl.b@samsung.com
14 * Organization: Samsung Electronics
16 * =====================================================================================
19 /*-----------------------------------------------------------------------------
21 *-----------------------------------------------------------------------------*/
22 #include "ClientCommands/CommandOpenSession.h"
23 #include "TEEContext.h"
25 /*-----------------------------------------------------------------------------
27 *-----------------------------------------------------------------------------*/
29 * OpenSession command handling.
30 * @param data received from TEECLib
31 * @param TEECtx object associated with command
33 CommandOpenSession::CommandOpenSession(OpenSessionData data, TEEContext *TEECtx) :
39 * OpenSession command execute.
42 CommandOpenSession::~CommandOpenSession() {
45 void CommandOpenSession::execute() {
46 TEEC_Result result = TEEC_ERROR_GENERIC;
47 result = pTEECtx->openSession(data);
48 if (result != TEEC_SUCCESS) {
49 FinalizeContextData fdata;
50 fdata.contextID = data.contextID;
51 pTEECtx->finContext(fdata);