The Unidata Local Data Manager (LDM) system includes network client and server programs designed for event-driven data distribution, and is the fundamental component of the Unidata Internet Data Distribution (IDD) system.
Within the pqing source directory, there is a file, wmo_message.c. Within that file, there is a function, ids_len. This function is called to calculate the length of the GRIB bulletin. The original function assumed that the data is GRIB 1 format. I made the following changes to the function (I account for the GRIB version) to calculate the message length, recompiled pqing and the changes corrected the problem.
static int
ids_len(const char *cp)
{
int len;
const unsigned char *up;
int vers = *(cp+7);
if (vers == 1) {
up = (const unsigned char *)cp + IDS_LEN -1 ;
len = *up++ * 256 *256;
len += *up++ * 256;
len += *up;
}
else {
up = (const unsigned char *)cp + 8 ;
len = *up++ * 256 *256 * 256 *256 *256 *256 *256;
len += *up++ * 256 *256 * 256 *256 *256 *256;
len += *up++ * 256 *256 * 256 *256 *256;
len += *up++ * 256 *256 * 256 *256;
len += *up++ * 256 *256 * 256;
len += *up++ * 256 *256;
len += *up++ * 256;
len += *up;
}
return len;
}
From ESupport ticket ZNI-140417:
Within the pqing source directory, there is a file, wmo_message.c. Within that file, there is a function, ids_len. This function is called to calculate the length of the GRIB bulletin. The original function assumed that the data is GRIB 1 format. I made the following changes to the function (I account for the GRIB version) to calculate the message length, recompiled pqing and the changes corrected the problem.