In case of OpenSession success return TRUSTED_APP origin 50/162050/2
authorTomasz Swierczek <t.swierczek@samsung.com>
Tue, 28 Nov 2017 19:07:11 +0000 (20:07 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Tue, 28 Nov 2017 20:29:55 +0000 (21:29 +0100)
This commit is a workaround of the fact that daemon is not passing
data properly between its classes and client library.

Change-Id: I3e52606d646c7f9e6d574582b7233aefbc252338

TEECLib/src/teec_api.c

index a23aa71..91f5185 100644 (file)
@@ -1231,7 +1231,11 @@ TEEC_Result TEEC_OpenSession(TEEC_Context *context, TEEC_Session *session,
                }
 
                return result;
-       } else session_imp->sessionID = os.sessionID;
+       } else {
+                       session_imp->sessionID = os.sessionID;
+                       /* A workaround for daemon not passing properly data upwards */
+                       if (returnOrigin) *returnOrigin = TEEC_ORIGIN_TRUSTED_APP;
+       }
 
        if (operation) postProcessOperation(operation, &os.operation, tmpSharedMem);