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

Side by Side Diff: src/tcs/rpc/tcstp/rpc_tick.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_sign.c ('k') | src/tcs/rpc/tcstp/rpc_transport.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-2007 7 * (C) Copyright International Business Machines Corp. 2004-2007
8 * 8 *
9 */ 9 */
10 10
(...skipping 20 matching lines...) Expand all
31 tcs_wrap_ReadCurrentTicks(struct tcsd_thread_data *data) 31 tcs_wrap_ReadCurrentTicks(struct tcsd_thread_data *data)
32 { 32 {
33 TCS_CONTEXT_HANDLE hContext; 33 TCS_CONTEXT_HANDLE hContext;
34 UINT32 pulCurrentTime; 34 UINT32 pulCurrentTime;
35 BYTE *prgbCurrentTime; 35 BYTE *prgbCurrentTime;
36 TSS_RESULT result; 36 TSS_RESULT result;
37 37
38 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 38 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
39 return TCSERR(TSS_E_INTERNAL_ERROR); 39 return TCSERR(TSS_E_INTERNAL_ERROR);
40 40
41 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 41 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
42 42
43 MUTEX_LOCK(tcsp_lock); 43 MUTEX_LOCK(tcsp_lock);
44 44
45 result = TCSP_ReadCurrentTicks_Internal(hContext, &pulCurrentTime, &prgb CurrentTime); 45 result = TCSP_ReadCurrentTicks_Internal(hContext, &pulCurrentTime, &prgb CurrentTime);
46 46
47 MUTEX_UNLOCK(tcsp_lock); 47 MUTEX_UNLOCK(tcsp_lock);
48 48
49 if (result == TSS_SUCCESS) { 49 if (result == TSS_SUCCESS) {
50 initData(&data->comm, 2); 50 initData(&data->comm, 2);
51 if (setData(TCSD_PACKET_TYPE_UINT32, 0, &pulCurrentTime, 0, &dat a->comm)) { 51 if (setData(TCSD_PACKET_TYPE_UINT32, 0, &pulCurrentTime, 0, &dat a->comm)) {
(...skipping 21 matching lines...) Expand all
73 TPM_AUTH auth, *pAuth; 73 TPM_AUTH auth, *pAuth;
74 TPM_NONCE nonce; 74 TPM_NONCE nonce;
75 TPM_DIGEST digest; 75 TPM_DIGEST digest;
76 UINT32 sigSize, tcSize, i; 76 UINT32 sigSize, tcSize, i;
77 BYTE *sig, *tc; 77 BYTE *sig, *tc;
78 TSS_RESULT result; 78 TSS_RESULT result;
79 79
80 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 80 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
81 return TCSERR(TSS_E_INTERNAL_ERROR); 81 return TCSERR(TSS_E_INTERNAL_ERROR);
82 82
83 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 83 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
84 84
85 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hKey, 0, &data->comm)) 85 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hKey, 0, &data->comm))
86 return TCSERR(TSS_E_INTERNAL_ERROR); 86 return TCSERR(TSS_E_INTERNAL_ERROR);
87 if (getData(TCSD_PACKET_TYPE_NONCE, 2, &nonce, 0, &data->comm)) 87 if (getData(TCSD_PACKET_TYPE_NONCE, 2, &nonce, 0, &data->comm))
88 return TCSERR(TSS_E_INTERNAL_ERROR); 88 return TCSERR(TSS_E_INTERNAL_ERROR);
89 if (getData(TCSD_PACKET_TYPE_DIGEST, 3, &digest, 0, &data->comm)) 89 if (getData(TCSD_PACKET_TYPE_DIGEST, 3, &digest, 0, &data->comm))
90 return TCSERR(TSS_E_INTERNAL_ERROR); 90 return TCSERR(TSS_E_INTERNAL_ERROR);
91 if (getData(TCSD_PACKET_TYPE_AUTH, 4, &auth, 0, &data->comm)) 91 if (getData(TCSD_PACKET_TYPE_AUTH, 4, &auth, 0, &data->comm))
92 pAuth = NULL; 92 pAuth = NULL;
93 else 93 else
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 free(sig); 129 free(sig);
130 free(tc); 130 free(tc);
131 return TCSERR(TSS_E_INTERNAL_ERROR); 131 return TCSERR(TSS_E_INTERNAL_ERROR);
132 } 132 }
133 } else 133 } else
134 initData(&data->comm, 0); 134 initData(&data->comm, 0);
135 135
136 data->comm.hdr.u.result = result; 136 data->comm.hdr.u.result = result;
137 return TSS_SUCCESS; 137 return TSS_SUCCESS;
138 } 138 }
OLDNEW
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_sign.c ('k') | src/tcs/rpc/tcstp/rpc_transport.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698