Previously, on service disappeared event the list of the known
proxy objects was cleared, but pointers to the default entity
per command family wasn’t reset. Reset default entities for
the command families to remove the dead pointers to the deleted
proxy objects.
==1325== Invalid read of size 8
==1325== at 0x4055D4: proxy_interface_is_same (dbus-proxy.c:439)
==1325== by 0x407C28: match_by_partial_name (network.c:220)
==1325== by 0x40547C: proxy_interface_find_all (dbus-proxy.c:424)
==1325== by 0x405592: proxy_property_str_completion (dbus-proxy.c:153)
==1325== by 0x407DA9: network_name_completion (network.c:241)
==1325== by 0x4E596D5: rl_completion_matches (in /usr/lib64/libreadline.so.7.0)
Switch the command pattern to match the common command scheme
where the entity name (network name) follows the command family name:
From
known-network forget <network name>
To
known-network <network name> forget
In addition, it extracts the network match by name logic into its
own function for the further reusability. In the case of ambiguity
between the network objects with the same SSID but different security
types the logic asks to specify the security type in addition
to the network name as follows:
known-network <network name.security> forget
Entering 23 characters at a prompt resulted in 9 extra characters being
added to the line. At this point, you would only be abel to backspace
until the 9th character.
It seems that claling both rl_replace_line("", 0) and rl_redisplay()
before rl_replace_line(masked_input.mask, 0) causes this to happen. Both
calls are redundant anyways as iwctl functions exactly the same without
them (plus no more bug).
Station, WSC, Ad-Hoc and AP family_arg_completion functions were
identical except for which commands they were referencing and the
interface type they were interested in. Combine all these into a single
function.
This function now takes an extra argument 'extra_interface'. When
non-NULL, the property match is furthered filtered by checking whether
the proxy_interface on the given path also contains an interface of type
'extra_interface'