| | |
| | | |
| | | if (identifiers == NULL || *num_identifiers == 0) { |
| | | result_adapterInfos = getAdapterInfos(NULL, &adapter_num); |
| | | if (result_adapterInfos != FUNC_RET_OK) { |
| | | if ((result_adapterInfos != FUNC_RET_OK) || (adapter_num == 0)) { |
| | | return generate_disk_pc_id(identifiers, num_identifiers, false); |
| | | } |
| | | result_diskinfos = getDiskInfos(NULL, &disk_num); |
| | | if (result_diskinfos != FUNC_RET_OK) { |
| | | if ((result_diskinfos != FUNC_RET_OK) || (disk_num == 0)) { |
| | | return generate_ethernet_pc_id(identifiers, num_identifiers, true); |
| | | } |
| | | *num_identifiers = disk_num * adapter_num; |
| | |
| | | PcIdentifier concat_identifiers[2]; |
| | | char* b64_data = NULL; |
| | | int b64_size = 0; |
| | | size_t concatIdentifiersSize = sizeof(PcIdentifier) * 2; |
| | | const size_t concatIdentifiersSize = sizeof(PcIdentifier) * 2; |
| | | //concat_identifiers = (PcIdentifier *) malloc(concatIdentifiersSize); |
| | | memcpy(&concat_identifiers[0], identifier1, sizeof(PcIdentifier)); |
| | | memcpy(&concat_identifiers[1], identifier2, sizeof(PcIdentifier)); |