| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 UINT32 outDataSize; | 41 UINT32 outDataSize; |
| 42 BYTE *outData; | 42 BYTE *outData; |
| 43 TSS_RESULT result; | 43 TSS_RESULT result; |
| 44 | 44 |
| 45 int i; | 45 int i; |
| 46 | 46 |
| 47 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 47 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
| 48 return TCSERR(TSS_E_INTERNAL_ERROR); | 48 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 49 | 49 |
| 50 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 50 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
| 51 | 51 |
| 52 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &keyHandle, 0, &data->comm)) | 52 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &keyHandle, 0, &data->comm)) |
| 53 return TCSERR(TSS_E_INTERNAL_ERROR); | 53 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 54 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &inDataSize, 0, &data->comm)) | 54 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &inDataSize, 0, &data->comm)) |
| 55 return TCSERR(TSS_E_INTERNAL_ERROR); | 55 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 56 | 56 |
| 57 inData = calloc(1, inDataSize); | 57 inData = calloc(1, inDataSize); |
| 58 if (inData == NULL) { | 58 if (inData == NULL) { |
| 59 LogError("malloc of %u bytes failed.", inDataSize); | 59 LogError("malloc of %u bytes failed.", inDataSize); |
| 60 return TCSERR(TSS_E_OUTOFMEMORY); | 60 return TCSERR(TSS_E_OUTOFMEMORY); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return TCSERR(TSS_E_INTERNAL_ERROR); | 96 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 97 } | 97 } |
| 98 free(outData); | 98 free(outData); |
| 99 } else | 99 } else |
| 100 initData(&data->comm, 0); | 100 initData(&data->comm, 0); |
| 101 | 101 |
| 102 data->comm.hdr.u.result = result; | 102 data->comm.hdr.u.result = result; |
| 103 | 103 |
| 104 return TSS_SUCCESS; | 104 return TSS_SUCCESS; |
| 105 } | 105 } |
| OLD | NEW |