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

Side by Side Diff: src/tcs/rpc/tcstp/rpc_dir.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_delegate.c ('k') | src/tcs/rpc/tcstp/rpc_ek.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 21 matching lines...) Expand all
32 { 32 {
33 TSS_RESULT result; 33 TSS_RESULT result;
34 TSS_HCONTEXT hContext; 34 TSS_HCONTEXT hContext;
35 TCPA_DIRINDEX dirIndex; 35 TCPA_DIRINDEX dirIndex;
36 TCPA_DIGEST dirDigest; 36 TCPA_DIGEST dirDigest;
37 TPM_AUTH auth; 37 TPM_AUTH auth;
38 38
39 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 39 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
40 return TCSERR(TSS_E_INTERNAL_ERROR); 40 return TCSERR(TSS_E_INTERNAL_ERROR);
41 41
42 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 42 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
43 43
44 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &dirIndex, 0, &data->comm)) 44 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &dirIndex, 0, &data->comm))
45 return TCSERR(TSS_E_INTERNAL_ERROR); 45 return TCSERR(TSS_E_INTERNAL_ERROR);
46 if (getData(TCSD_PACKET_TYPE_DIGEST, 2, &dirDigest, 0, &data->comm)) 46 if (getData(TCSD_PACKET_TYPE_DIGEST, 2, &dirDigest, 0, &data->comm))
47 return TCSERR(TSS_E_INTERNAL_ERROR); 47 return TCSERR(TSS_E_INTERNAL_ERROR);
48 if (getData(TCSD_PACKET_TYPE_AUTH, 3, &auth, 0, &data->comm)) 48 if (getData(TCSD_PACKET_TYPE_AUTH, 3, &auth, 0, &data->comm))
49 return TCSERR(TSS_E_INTERNAL_ERROR); 49 return TCSERR(TSS_E_INTERNAL_ERROR);
50 50
51 MUTEX_LOCK(tcsp_lock); 51 MUTEX_LOCK(tcsp_lock);
52 52
(...skipping 18 matching lines...) Expand all
71 tcs_wrap_DirRead(struct tcsd_thread_data *data) 71 tcs_wrap_DirRead(struct tcsd_thread_data *data)
72 { 72 {
73 TSS_RESULT result; 73 TSS_RESULT result;
74 TSS_HCONTEXT hContext; 74 TSS_HCONTEXT hContext;
75 TCPA_DIRINDEX dirIndex; 75 TCPA_DIRINDEX dirIndex;
76 TCPA_DIRVALUE dirValue; 76 TCPA_DIRVALUE dirValue;
77 77
78 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 78 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
79 return TCSERR(TSS_E_INTERNAL_ERROR); 79 return TCSERR(TSS_E_INTERNAL_ERROR);
80 80
81 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 81 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
82 82
83 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &dirIndex, 0, &data->comm)) 83 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &dirIndex, 0, &data->comm))
84 return TCSERR(TSS_E_INTERNAL_ERROR); 84 return TCSERR(TSS_E_INTERNAL_ERROR);
85 85
86 MUTEX_LOCK(tcsp_lock); 86 MUTEX_LOCK(tcsp_lock);
87 87
88 result = TCSP_DirRead_Internal(hContext, dirIndex, &dirValue); 88 result = TCSP_DirRead_Internal(hContext, dirIndex, &dirValue);
89 89
90 MUTEX_UNLOCK(tcsp_lock); 90 MUTEX_UNLOCK(tcsp_lock);
91 91
92 if (result == TSS_SUCCESS) { 92 if (result == TSS_SUCCESS) {
93 initData(&data->comm, 1); 93 initData(&data->comm, 1);
94 if (setData(TCSD_PACKET_TYPE_DIGEST, 0, &dirValue, 0, &data->com m)) { 94 if (setData(TCSD_PACKET_TYPE_DIGEST, 0, &dirValue, 0, &data->com m)) {
95 return TCSERR(TSS_E_INTERNAL_ERROR); 95 return TCSERR(TSS_E_INTERNAL_ERROR);
96 } 96 }
97 } else 97 } else
98 initData(&data->comm, 0); 98 initData(&data->comm, 0);
99 99
100 data->comm.hdr.u.result = result; 100 data->comm.hdr.u.result = result;
101 101
102 return TSS_SUCCESS; 102 return TSS_SUCCESS;
103 } 103 }
OLDNEW
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_delegate.c ('k') | src/tcs/rpc/tcstp/rpc_ek.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698