These changes improve the saving of VPN properties in order to avoid
losing information if connman-vpnd crashes. Also new feature to multiple
values in one D-Bus call is added.
The first patch in this set addresses the issue of not saving VPN
provider values immediately after the value has been changed over D-Bus.
To avoid unnecessary writes to disk the value of the property is
compared to the existing one. To do this for user routes, the routes are
read into a sorted list to make the comparing of them more efficient. As
a result each successful value change will be written immediately to
provider settings.
The second patch adds a new feature to add multiple VPN provider
properties using one D-Bus call: SetProperties. This new function
accepts input in the same format as GetProperties returns. This changed
improves the performance when changing multiple values as the saving of
properties is done after the complete dict is processed, if there are
any changes to any of the values. Empty values are also allowed to be
able to set and clear certain values in one D-Bus method call. In case
there are errorous properties these are reported back as comma separated
property name list at the end of the appropriate error message.
The third patch adds documentation of the SetProperties D-Bus method and
also documents all errors for SetProperty and ClearProperty D-Bus
methods.
Jussi Laakkonen (3):
vpn-provider: Save configuration only when a property value is changed
vpn-provider: Implement setting of multiple VPN properties with one
call
doc: Document VPN connection SetProperties D-Bus method
doc/vpn-connection-api.txt | 28 +++
vpn/vpn-provider.c | 342 +++++++++++++++++++++++++++++++++----
2 files changed, 334 insertions(+), 36 deletions(-)
--
2.20.1