summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-04-07 11:53:09 -0400
committerLubomir Rintel <lkundrak@v3.sk>2015-04-14 17:04:31 +0200
commit994136e14216bcbf722e95872b8da1490d8f47ff (patch)
tree1381f056ccdad605da8dff1187ee4c5bfc761766
parent5eec0818a1aae3ba1541179925946986d972dc1e (diff)
downloadNetworkManager-994136e14216bcbf722e95872b8da1490d8f47ff.tar.gz
device,libnm,cli: add "new-activation" reason for device state change
It will be used when the device is disconnected for new connection activation. (cherry picked from commit 1ad193a01759f1dd8cbb16317b9b3490fa95193a)
-rw-r--r--clients/cli/common.c3
-rw-r--r--libnm-core/nm-dbus-interface.h2
-rw-r--r--libnm-util/NetworkManager.h2
-rw-r--r--src/devices/nm-device.c1
4 files changed, 8 insertions, 0 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c
index 6b13f7f80c..a47c32e838 100644
--- a/clients/cli/common.c
+++ b/clients/cli/common.c
@@ -705,6 +705,9 @@ nmc_device_reason_to_string (NMDeviceStateReason reason)
case NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT:
return _("SIM PIN was incorrect");
+ case NM_DEVICE_STATE_REASON_NEW_ACTIVATION:
+ return _("New connection activation was enqueued");
+
default:
/* TRANSLATORS: Unknown reason for a device state change (NMDeviceStateReason) */
return _("Unknown");
diff --git a/libnm-core/nm-dbus-interface.h b/libnm-core/nm-dbus-interface.h
index 1c5a2b12a2..9bab80f354 100644
--- a/libnm-core/nm-dbus-interface.h
+++ b/libnm-core/nm-dbus-interface.h
@@ -466,6 +466,7 @@ typedef enum {
* @NM_DEVICE_STATE_REASON_MODEM_FAILED: Modem failed or no longer available
* @NM_DEVICE_STATE_REASON_MODEM_AVAILABLE: Modem now ready and available
* @NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT: SIM PIN was incorrect
+ * @NM_DEVICE_STATE_REASON_NEW_ACTIVATION: New connection activation was enqueued
*
* Device state change reason codes
*
@@ -532,6 +533,7 @@ typedef enum {
NM_DEVICE_STATE_REASON_MODEM_FAILED = 57,
NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58,
NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT = 59,
+ NM_DEVICE_STATE_REASON_NEW_ACTIVATION = 60,
} NMDeviceStateReason;
diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h
index 74364afa7c..5a98b8e496 100644
--- a/libnm-util/NetworkManager.h
+++ b/libnm-util/NetworkManager.h
@@ -471,6 +471,7 @@ typedef enum {
* @NM_DEVICE_STATE_REASON_MODEM_FAILED: Modem failed or no longer available
* @NM_DEVICE_STATE_REASON_MODEM_AVAILABLE: Modem now ready and available
* @NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT: SIM PIN was incorrect
+ * @NM_DEVICE_STATE_REASON_NEW_ACTIVATION: New connection activation was enqueued
*
* Device state change reason codes
*
@@ -537,6 +538,7 @@ typedef enum {
NM_DEVICE_STATE_REASON_MODEM_FAILED = 57,
NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58,
NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT = 59,
+ NM_DEVICE_STATE_REASON_NEW_ACTIVATION = 60,
NM_DEVICE_STATE_REASON_LAST = 0xFFFF
} NMDeviceStateReason;
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index d41a21eb76..b5da8423aa 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -447,6 +447,7 @@ static const char *reason_table[] = {
[NM_DEVICE_STATE_REASON_MODEM_FAILED] = "modem-failed",
[NM_DEVICE_STATE_REASON_MODEM_AVAILABLE] = "modem-available",
[NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT] = "sim-pin-incorrect",
+ [NM_DEVICE_STATE_REASON_NEW_ACTIVATION] = "new-activation",
};
static const char *