Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: src/tcs/rpc/tcstp/rpc_context.c

Issue 3581012: Upgrade from trousers 0.3.3 to 0.3.6 and from testsuite 0.2 to 0.3. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/trousers.git
Patch Set: git cl push Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_cmk.c ('k') | src/tcs/rpc/tcstp/rpc_counter.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Licensed Materials - Property of IBM 3 * Licensed Materials - Property of IBM
4 * 4 *
5 * trousers - An open source TCG Software Stack 5 * trousers - An open source TCG Software Stack
6 * 6 *
7 * (C) Copyright International Business Machines Corp. 2004-2006 7 * (C) Copyright International Business Machines Corp. 2004-2006
8 * 8 *
9 */ 9 */
10 10
(...skipping 16 matching lines...) Expand all
27 #include "rpc_tcstp_tcs.h" 27 #include "rpc_tcstp_tcs.h"
28 28
29 29
30 TSS_RESULT 30 TSS_RESULT
31 tcs_wrap_OpenContext(struct tcsd_thread_data *data) 31 tcs_wrap_OpenContext(struct tcsd_thread_data *data)
32 { 32 {
33 TCS_CONTEXT_HANDLE hContext; 33 TCS_CONTEXT_HANDLE hContext;
34 TSS_RESULT result; 34 TSS_RESULT result;
35 UINT32 tpm_version = tpm_metrics.version.minor; 35 UINT32 tpm_version = tpm_metrics.version.minor;
36 36
37 » LogDebugFn("thread %zd", THREAD_ID); 37 » LogDebugFn("thread %ld", THREAD_ID);
38 38
39 result = TCS_OpenContext_Internal(&hContext); 39 result = TCS_OpenContext_Internal(&hContext);
40 if (result == TSS_SUCCESS) { 40 if (result == TSS_SUCCESS) {
41 initData(&data->comm, 2); 41 initData(&data->comm, 2);
42 if (setData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->com m)) 42 if (setData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->com m))
43 return TCSERR(TSS_E_INTERNAL_ERROR); 43 return TCSERR(TSS_E_INTERNAL_ERROR);
44 44
45 if (setData(TCSD_PACKET_TYPE_UINT32, 1, &tpm_version, 0, &data-> comm)) 45 if (setData(TCSD_PACKET_TYPE_UINT32, 1, &tpm_version, 0, &data-> comm))
46 return TCSERR(TSS_E_INTERNAL_ERROR); 46 return TCSERR(TSS_E_INTERNAL_ERROR);
47 47
(...skipping 11 matching lines...) Expand all
59 59
60 TSS_RESULT 60 TSS_RESULT
61 tcs_wrap_CloseContext(struct tcsd_thread_data *data) 61 tcs_wrap_CloseContext(struct tcsd_thread_data *data)
62 { 62 {
63 TCS_CONTEXT_HANDLE hContext; 63 TCS_CONTEXT_HANDLE hContext;
64 TSS_RESULT result; 64 TSS_RESULT result;
65 65
66 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 66 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
67 return TCSERR(TSS_E_INTERNAL_ERROR); 67 return TCSERR(TSS_E_INTERNAL_ERROR);
68 68
69 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 69 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
70 70
71 result = TCS_CloseContext_Internal(hContext); 71 result = TCS_CloseContext_Internal(hContext);
72 72
73 /* This will signal the thread that the connection has been closed clean ly */ 73 /* This will signal the thread that the connection has been closed clean ly */
74 if (result == TSS_SUCCESS) 74 if (result == TSS_SUCCESS)
75 data->context = NULL_TCS_HANDLE; 75 data->context = NULL_TCS_HANDLE;
76 76
77 initData(&data->comm, 0); 77 initData(&data->comm, 0);
78 data->comm.hdr.u.result = result; 78 data->comm.hdr.u.result = result;
79 79
80 return TSS_SUCCESS; 80 return TSS_SUCCESS;
81 } 81 }
OLDNEW
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_cmk.c ('k') | src/tcs/rpc/tcstp/rpc_counter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698