On Tue, 2013-02-19 at 22:38 -0500, david feeney wrote:
> Hello,
> 
> I have two nm_client applications running simultaneously: 1)
> nm_applet, and 2) my_app.
> 
> Initially both programs agree on the state of the wifi device i.e.
> nm_device_get_state (device):
> 
> 1 )
> 
> nm-applet: W: notify_active_ap_changed_cb Device State = 100
> nm-applet: W: Device Product = BCM4312 802.11b/g LP-PHY
> nm-applet: W: Device Vendor = Broadcom Corporation
> 
> 2) 
> 
> my_app[30408]: Q: show_wifi_device_info Device State = 100
> my_app[30408]: Q: Device Product = BCM4312 802.11b/g LP-PHY
> my_app[30408]: Q: Device Vendor = Broadcom Corporation
> 
> 
> Then I Disconnect the device, from either application and my_app
> cannot obtain the new State:
> 
> 1) 
> nm-applet: W: notify_active_ap_changed_cb Device State = 30
> nm-applet: W: Device Product = BCM4312 802.11b/g LP-PHY
> nm-applet: W: Device Vendor = Broadcom Corporation
> 
> 2)
> my_app[30408]: Q: show_wifi_device_info Device State = 100
> my_app[30408]: Q: Device Product = BCM4312 802.11b/g LP-PHY
> my_app[30408]: Q: Device Vendor = Broadcom Corporation
> 
> I am polling the nm_device_get_state (device) to get updated status;
> will this not work?

Not with libnm-glib, no.  It grabs the initial state synchronously, and
then uses PropertiesChanged signals from NetworkManager for all further
updates.  This requires a glib event loop, which depending on your
application shouldnt be that hard to do.  Happy to offer tips on that.

Dan


_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to