NetworkManager r4203 - in trunk: . include introspection src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r4203 - in trunk: . include introspection src
- Date: Wed, 22 Oct 2008 13:35:07 +0000 (UTC)
Author: dcbw
Date: Wed Oct 22 13:35:07 2008
New Revision: 4203
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4203&view=rev
Log:
2008-10-22 Dan Williams <dcbw redhat com>
* include/NetworkManager.h
introspection/nm-device.xml
- Add device state change reason for carrier changes
* src/nm-device-ethernet.c
- (set_carrier): use the carrier change reason when changing device
state in response to carrier changes
Modified:
trunk/ChangeLog
trunk/include/NetworkManager.h
trunk/introspection/nm-device.xml
trunk/src/nm-device-ethernet.c
Modified: trunk/include/NetworkManager.h
==============================================================================
--- trunk/include/NetworkManager.h (original)
+++ trunk/include/NetworkManager.h Wed Oct 22 13:35:07 2008
@@ -337,6 +337,9 @@
/* Device disconnected by user or client */
NM_DEVICE_STATE_REASON_USER_REQUESTED,
+ /* Carrier/link changed */
+ NM_DEVICE_STATE_REASON_CARRIER,
+
/* Unused */
NM_DEVICE_STATE_REASON_LAST = 0xFFFF
} NMDeviceStateReason;
Modified: trunk/introspection/nm-device.xml
==============================================================================
--- trunk/introspection/nm-device.xml (original)
+++ trunk/introspection/nm-device.xml Wed Oct 22 13:35:07 2008
@@ -340,6 +340,11 @@
A user or client requested the disconnection.
</tp:docstring>
</tp:enumvalue>
+ <tp:enumvalue suffix="CARRIER" value="40">
+ <tp:docstring>
+ The device's carrier/link changed.
+ </tp:docstring>
+ </tp:enumvalue>
</tp:enum>
</interface>
Modified: trunk/src/nm-device-ethernet.c
==============================================================================
--- trunk/src/nm-device-ethernet.c (original)
+++ trunk/src/nm-device-ethernet.c Wed Oct 22 13:35:07 2008
@@ -190,10 +190,10 @@
nm_info ("(%s): carrier now %s (device state %d)", nm_device_get_iface (NM_DEVICE (self)), carrier ? "ON" : "OFF", state);
if (state == NM_DEVICE_STATE_UNAVAILABLE) {
if (carrier)
- nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE);
+ nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER);
} else if (state >= NM_DEVICE_STATE_DISCONNECTED) {
if (!carrier)
- nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_NONE);
+ nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_CARRIER);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]