mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 07:13:33 +08:00
BSON coder unit tests, fixes arising from test failures.
This commit is contained in:
@@ -452,7 +452,7 @@ param_reset(param_t param)
|
||||
|
||||
/* if we found one, erase it */
|
||||
if (s != NULL) {
|
||||
int pos = utarry_eltidx(param_values, s);
|
||||
int pos = utarray_eltidx(param_values, s);
|
||||
utarray_erase(param_values, pos, 1);
|
||||
}
|
||||
}
|
||||
@@ -489,7 +489,7 @@ param_export(int fd, bool only_unsaved)
|
||||
|
||||
param_lock();
|
||||
|
||||
bson_encoder_init(&encoder, fd);
|
||||
bson_encoder_init_file(&encoder, fd);
|
||||
|
||||
/* no modified parameters -> we are done */
|
||||
if (param_values == NULL) {
|
||||
@@ -680,7 +680,7 @@ param_import_internal(int fd, bool mark_saved)
|
||||
int result = -1;
|
||||
struct param_import_state state;
|
||||
|
||||
if (bson_decoder_init(&decoder, fd, param_import_callback, &state)) {
|
||||
if (bson_decoder_init_file(&decoder, fd, param_import_callback, &state)) {
|
||||
debug("decoder init failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user