diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-02-01 09:09:37 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-02-02 23:23:16 +0100 |
commit | f40f0f752f731d421d3f878a39c1769eff2cf5eb (patch) | |
tree | d547d99fc725a1fcf55ab4ca13eef6200da746f2 | |
parent | 669fe553c19b9e2a591b73523d4670530ce1c41a (diff) | |
download | NetworkManager-lr/conn-activation.tar.gz |
cli: don't look up a device for activation request unless we have tolr/conn-activation
Let the server decide which device to use if the user didn't explicitly
specify the interface, wireless access point or a wimax nsp.
The server will just reuse the device for an already active connection
or potentially do a better guess.
-rw-r--r-- | clients/cli/connections.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 3f7fc5cbca..73e54fda7b 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -1567,6 +1567,7 @@ find_device_for_connection (NmCli *nmc, int i, j; g_return_val_if_fail (nmc != NULL, FALSE); + g_return_val_if_fail (iface || ap || nsp, FALSE); g_return_val_if_fail (device != NULL && *device == NULL, FALSE); g_return_val_if_fail (spec_object != NULL && *spec_object == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); @@ -2052,7 +2053,7 @@ nmc_activate_connection (NmCli *nmc, g_return_val_if_fail (nmc != NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - if (connection) { + if (connection && (ifname || ap || nsp)) { device_found = find_device_for_connection (nmc, connection, ifname, ap, nsp, &device, &spec_object, &local); /* Virtual connection may not have their interfaces created yet */ |