Change CRC to use all data by substituting CRC value with zeros

pull/699/head
Mike Black W9MDB 2021-05-06 23:58:15 -05:00
rodzic dd2f0f380e
commit 102439be15
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -6326,11 +6326,13 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len)
rxb = !rxa;
txb = split == 1;
snprintf(response, max_response_len,
"VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d\nRig=%s\nApp=Hamlib\nVersion=20210429\n",
"VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d\nRig=%s\nApp=Hamlib\nVersion=20210506\nCRC=0x00000000\n",
rig_strvfo(vfoA), freqA, modeAstr, (int)widthA, rxa, txa, rig_strvfo(vfoB),
freqB, modeBstr, (int)widthB, rxb, txb, split, satmode, rig->caps->model_name);
unsigned long crc = gen_crc((unsigned char *)response, strlen(response));
sprintf(crcstr, "CRC=0x%08lx\n", crc);
char *p = strstr(response,"CRC=");
if (p)
sprintf(p, "CRC=0x%08lx\n", crc);
strcat(response, crcstr);
RETURNFUNC(RIG_OK);
}