ECC-817: grib_ls for GRIB1 has problems dealing with mars.step when it's unaliased

This commit is contained in:
Shahram Najm 2019-02-25 16:45:52 +00:00
parent 4430798914
commit 74ac44013c
2 changed files with 10 additions and 2 deletions

View File

@ -216,7 +216,11 @@ static int unpack_long(grib_accessor* a, long* val, size_t *len)
}
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), self->date,&date))!=GRIB_SUCCESS) return ret;
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), self->time,&time))!=GRIB_SUCCESS) return ret;
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), self->step,&step))!=GRIB_SUCCESS) return ret;
if ((ret=grib_get_long(grib_handle_of_accessor(a), self->step,&step))!=GRIB_SUCCESS) {
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), "endStep",&step))!=GRIB_SUCCESS) {
return ret; /* See ECC-817 */
}
}
if (self->stepUnits) {
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), self->stepUnits,&stepUnits))!=GRIB_SUCCESS) return ret;

View File

@ -211,7 +211,11 @@ static int unpack_long(grib_accessor* a, long* val, size_t *len)
}
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), self->date,&date))!=GRIB_SUCCESS) return ret;
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), self->time,&time))!=GRIB_SUCCESS) return ret;
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), self->step,&step))!=GRIB_SUCCESS) return ret;
if ((ret=grib_get_long(grib_handle_of_accessor(a), self->step,&step))!=GRIB_SUCCESS) {
if ((ret=grib_get_long_internal(grib_handle_of_accessor(a), "endStep",&step))!=GRIB_SUCCESS) {
return ret; /* See ECC-817 */
}
}
/* Seconds will always be zero. So convert to minutes */
if (self->stepUnits) {