Currently, the Unicable settings are always cleared
when enabling or disabling the corresponding satellite position
or its owning adapter. The reason is that the idnode with Unicable
configuration is always unconditionally deleted
during the "set" operation.
This change adds a check for the existing Unicable configuration
and preserves the existing idnode if its type remains the same.
The same logic is already used when changing the configuration
related to LNB, switch and rotor.
{
linuxdvb_satconf_ele_t *ls = o;
const char *str = p;
+ if (ls->lse_en50494 && !strcmp(str ?: "", ls->lse_en50494->ld_type))
+ return 0;
if (ls->lse_en50494)
linuxdvb_en50494_destroy(ls->lse_en50494);
ls->lse_en50494 = linuxdvb_en50494_create0(str, NULL, ls, 0);