Commit 7420ae83 authored by Thomas Haller's avatar Thomas Haller
Browse files

all: rename "bind" option for AddAndActivateConnection2 to "bind-activation"

"bind" specifically binds the lifetime of the activation (NMActiveConnection).
In combination with "persist=volatile", the lifetime of the NMSettingsConnection
is indirectly bound to the NMActiveConnection. But still these concepts make sense
independently.
In the future, it may make sense to also bind the lifetime of the NMSettingsConnection
to the D-Bus client. Hence, rename the option to allow for the distinction.

Also, belatedly fix libnm comment about "bind" only working with
"persist" "volatile".

Fixes: eb883e34
parent da05a6b5
Pipeline #8971 passed with stages
in 17 minutes and 24 seconds
......@@ -129,7 +129,7 @@
parameters. At this time the following options are supported:
* persist: A string value of either "disk" (default), "memory" or "volatile". If "memory" is passed, the connection will not be saved to disk. If "volatile" is passed, the connection will not be saved to disk and will be destroyed when disconnected.
* bind: Bind the activation lifetime. Set to "dbus-name" to automatically disconnect when the requesting process disappears from the bus. The default of "none" means the connection is kept activated normally.
* bind-activation: Bind the activation lifetime. Set to "dbus-name" to automatically disconnect when the requesting process disappears from the bus. The default of "none" means the connection is kept activated normally.
-->
<method name="AddAndActivateConnection2">
<arg name="connection" type="a{sa{sv}}" direction="in"/>
......
......@@ -1304,12 +1304,10 @@ nm_client_add_and_activate_connection_finish (NMClient *client,
* * "persist": A string describing how the connection should be stored.
* The default is "disk", but it can be modified to "memory" (until
* the daemon quits) or "volatile" (will be deleted on disconnect).
* * "bind": Bind the connection lifetime to something. The default is "none",
* * "bind-activation": Bind the connection lifetime to something. The default is "none",
* meaning an explicit disconnect is needed. The value "dbus-client"
* means the connection will automatically be closed when the calling
* means the connection will automatically be deactivated when the calling
* DBus client disappears from the system bus.
* A non-default "bind" option must always be used together with
* "persist" set to "volatile".
*
* Since: 1.16
**/
......
......@@ -5270,7 +5270,7 @@ impl_manager_add_and_activate_connection (NMDBusObject *obj,
"Option \"persist\" must be one of \"volatile\", \"memory\" or \"disk\"");
goto error;
}
} else if ( nm_streq (option_name, "bind")
} else if ( nm_streq (option_name, "bind-activation")
&& g_variant_is_of_type (option_value, G_VARIANT_TYPE_STRING)) {
s = g_variant_get_string (option_value, NULL);
......@@ -5281,7 +5281,7 @@ impl_manager_add_and_activate_connection (NMDBusObject *obj,
else {
error = g_error_new_literal (NM_MANAGER_ERROR,
NM_MANAGER_ERROR_INVALID_ARGUMENTS,
"Option \"bind\" must be one of \"dbus-client\" or \"none\"");
"Option \"bind-activation\" must be one of \"dbus-client\" or \"none\"");
goto error;
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment