|
3 | 3 | * @author Martin Pulec <pulec@cesnet.cz> |
4 | 4 | */ |
5 | 5 | /* |
6 | | - * Copyright (c) 2012-2025 CESNET |
| 6 | + * Copyright (c) 2012-2026 CESNET, zájmové sdružení právnických osob |
7 | 7 | * All rights reserved. |
8 | 8 | * |
9 | 9 | * Redistribution and use in source and binary forms, with or without |
@@ -352,19 +352,21 @@ get_libraries_for_class(enum library_class cls, int abi_version, |
352 | 352 | map<string, const void *> ret; |
353 | 353 | auto& libraries = get_libmap(); |
354 | 354 | auto it = libraries.find(cls); |
355 | | - if (it != libraries.end()) { |
356 | | - for (auto && item : it->second) { |
357 | | - if (abi_version == item.second.abi_version) { |
358 | | - if (item.second.visibility_flag == 0 || |
359 | | - (include_flags & |
360 | | - item.second.visibility_flag) != 0U) { |
361 | | - ret[item.first] = item.second.data; |
362 | | - } |
363 | | - } else { |
364 | | - LOG(LOG_LEVEL_WARNING) << "Module " << item.first << " ABI version mismatch (required " << |
365 | | - abi_version << ", have " << item.second.abi_version << ")\n"; |
366 | | - |
367 | | - } |
| 355 | + if (it == libraries.end()) { // no library of given class |
| 356 | + return ret; |
| 357 | + } |
| 358 | + for (auto &&item : it->second) { |
| 359 | + if (abi_version != item.second.abi_version) { |
| 360 | + MSG(WARNING, |
| 361 | + "Module %s ABI version mismatch (required %d, have " |
| 362 | + "%d)\n", |
| 363 | + item.first.c_str(), abi_version, |
| 364 | + item.second.abi_version); |
| 365 | + continue; |
| 366 | + } |
| 367 | + if (item.second.visibility_flag == 0 || |
| 368 | + (include_flags & item.second.visibility_flag) != 0U) { |
| 369 | + ret[item.first] = item.second.data; |
368 | 370 | } |
369 | 371 | } |
370 | 372 |
|
|
0 commit comments