OLD | NEW |
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 23 matching lines...) Expand all Loading... |
34 TCPA_CAPABILITY_AREA capArea; | 34 TCPA_CAPABILITY_AREA capArea; |
35 UINT32 subCapSize; | 35 UINT32 subCapSize; |
36 BYTE *subCap; | 36 BYTE *subCap; |
37 UINT32 respSize; | 37 UINT32 respSize; |
38 BYTE *resp; | 38 BYTE *resp; |
39 TSS_RESULT result; | 39 TSS_RESULT result; |
40 | 40 |
41 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 41 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
42 return TCSERR(TSS_E_INTERNAL_ERROR); | 42 return TCSERR(TSS_E_INTERNAL_ERROR); |
43 | 43 |
44 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 44 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
45 | 45 |
46 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &capArea, 0, &data->comm)) | 46 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &capArea, 0, &data->comm)) |
47 return TCSERR(TSS_E_INTERNAL_ERROR); | 47 return TCSERR(TSS_E_INTERNAL_ERROR); |
48 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &subCapSize, 0, &data->comm)) | 48 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &subCapSize, 0, &data->comm)) |
49 return TCSERR(TSS_E_INTERNAL_ERROR); | 49 return TCSERR(TSS_E_INTERNAL_ERROR); |
50 | 50 |
51 subCap = calloc(1, subCapSize); | 51 subCap = calloc(1, subCapSize); |
52 if (subCap == NULL) { | 52 if (subCap == NULL) { |
53 LogError("malloc of %u bytes failed.", subCapSize); | 53 LogError("malloc of %u bytes failed.", subCapSize); |
54 return TCSERR(TSS_E_OUTOFMEMORY); | 54 return TCSERR(TSS_E_OUTOFMEMORY); |
(...skipping 17 matching lines...) Expand all Loading... |
72 free(resp); | 72 free(resp); |
73 return TCSERR(TSS_E_INTERNAL_ERROR); | 73 return TCSERR(TSS_E_INTERNAL_ERROR); |
74 } | 74 } |
75 free(resp); | 75 free(resp); |
76 } else | 76 } else |
77 initData(&data->comm, 0); | 77 initData(&data->comm, 0); |
78 | 78 |
79 data->comm.hdr.u.result = result; | 79 data->comm.hdr.u.result = result; |
80 return TSS_SUCCESS; | 80 return TSS_SUCCESS; |
81 } | 81 } |
OLD | NEW |