Question in function nm_device_state_changed()
- From: 代尔欣 <daierxin gmail com>
- To: networkmanager-list gnome org
- Subject: Question in function nm_device_state_changed()
- Date: Wed, 6 May 2009 11:40:44 +0800
Hi all,
I have a question about the NetworkManager-0.7.1 codes.
In NetworkManager-0.7.1/src/nm-device.c:
void nm_device_state_changed (NMDevice *device,
NMDeviceState state,
NMDeviceStateReason reason)
{
...
// Here the fifth parameter is set to 0. I think it should be set to "reason" so that the receiver of the signal "state-changed" can do
// something special base on the "state change reason". e.g. When "NM_DEVICE_STATE_DISCONNECTED" state signaled, if
// the reason is "NM_DEVICE_STATE_REASON_USER_REQUESTED" then we do not schedule auto connect in
// NetworkManagerPolicy.c device_state_changed() or
// set a flag in device-related device_state_changed() and reload the can_activate() function to check this flag.
g_signal_emit_by_name (device, "state-changed", state, old_state, 0);
...
}
If I'm wrong, please point out. Thanks!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]