params: change return type of param_modify_on_import to enum

Return early in param_import_callback() with 1 if we do a param_set in the param translation.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2024-02-05 18:30:54 +01:00
committed by Beat Küng
parent 982c998ab9
commit 584d8abe1e
5 changed files with 20 additions and 9 deletions
+4 -1
View File
@@ -1078,7 +1078,10 @@ param_import_callback(bson_decoder_t decoder, bson_node_t node)
return 0;
}
param_modify_on_import(node);
// if we do param_set() directly in the translation, set PARAM_SKIP_IMPORT as return value and return here
if (param_modify_on_import(node) == param_modify_on_import_ret::PARAM_SKIP_IMPORT) {
return 1;
}
// Find the parameter this node represents. If we don't know it, ignore the node.
param_t param = param_find_no_notification(node->name);