Fix rigctld segfault when using -P RTS

https://github.com/Hamlib/Hamlib/issues/1182
pull/1191/head
Mike Black W9MDB 2022-12-10 11:49:45 -06:00
rodzic 17ad0fcb90
commit 5339b431e4
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -7,6 +7,8 @@ A developer cannot apply for HSHR for segfaults on his/her own code.
Here is the list of the brave fellows:
* Saku Nyland OH1KH v4.5.1, 10/2022, rigctld.c using ptt_type=RTS
* David Kjellquist WB5NHL, v1.1.3, 09/2002, kenwood/ts570.c
caught on TS570D backend startup.

Wyświetl plik

@ -701,7 +701,9 @@ int main(int argc, char *argv[])
{
my_rig->state.pttport.type.ptt = ptt_type;
my_rig->state.pttport_deprecated.type.ptt = ptt_type;
my_rig->caps->ptt_type = ptt_type;
// This causes segfault since backend rig_caps are const
// rigctld will use the rig->state version of this for clients
//my_rig->caps->ptt_type = ptt_type;
}
if (dcd_type != RIG_DCD_NONE)