mirror of https://github.com/ecmwf/eccodes.git
ECC-1070: bufr_dump -O should not unpack the data section
This commit is contained in:
parent
40067d2879
commit
04ac0d108d
|
@ -605,8 +605,10 @@ static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comm
|
|||
int tab = 0;
|
||||
long count = 0;
|
||||
|
||||
c = a->context;
|
||||
if ((a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0)
|
||||
return;
|
||||
|
||||
c = a->context;
|
||||
grib_value_count(a, &count);
|
||||
if (count == 0)
|
||||
return;
|
||||
|
@ -624,10 +626,6 @@ static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comm
|
|||
|
||||
err = grib_unpack_string_array(a, values, &size);
|
||||
|
||||
if ((a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0)
|
||||
return;
|
||||
|
||||
|
||||
/* print_offset(self->dumper.out,d,a); */
|
||||
print_offset(self->dumper.out, self->begin, self->theEnd);
|
||||
|
||||
|
@ -662,5 +660,6 @@ static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comm
|
|||
}
|
||||
|
||||
fprintf(self->dumper.out, "\n");
|
||||
for (i=0; i<size; ++i) grib_context_free(c, values[i]);
|
||||
grib_context_free(c, values);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ label="bufr_dump_data_test"
|
|||
#Create log file
|
||||
fLog=${label}".log"
|
||||
rm -f $fLog
|
||||
touch $fLog
|
||||
|
||||
#Define tmp bufr files
|
||||
fJsonTmp=${label}".json.tmp"
|
||||
|
@ -32,8 +31,7 @@ fi
|
|||
bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt`
|
||||
REDIRECT=/dev/null
|
||||
|
||||
for file in ${bufr_files}
|
||||
do
|
||||
for file in ${bufr_files}; do
|
||||
${tools_dir}/bufr_dump -O ${data_dir}/bufr/$file >/dev/null
|
||||
done
|
||||
|
||||
|
|
|
@ -506,18 +506,6 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
sprintf(tmp, "MESSAGE %d ( length=%ld )", options->handle_count, length);
|
||||
if (!grib_options_on("C"))
|
||||
fprintf(stdout, "#============== %-38s ==============\n", tmp);
|
||||
err = grib_set_long(h, "unpack", 1);
|
||||
if (err) {
|
||||
if (options->fail) {
|
||||
fprintf(stderr, "ERROR: unable to unpack data section: %s\n", grib_get_error_message(err));
|
||||
exit(err);
|
||||
}
|
||||
else {
|
||||
fprintf(stdout, "ERROR: unable to unpack data section\n");
|
||||
options->error = err;
|
||||
/*return err; See ECC-723*/
|
||||
}
|
||||
}
|
||||
grib_dump_content(h, stdout, options->dump_mode, options->dump_flags, 0);
|
||||
}
|
||||
else if (dump_descriptors) {
|
||||
|
|
Loading…
Reference in New Issue