Re: nm_device_disconnect



Thanks for the answer,
Is there an other way ? Because I want the adhoc network to stop as soon as possible. Plus I do not do anything in the disconnect callback, so I fear that it is just my callback that is called when the adhoc network is disconnected (by somebody else or by the fact that the network is not available anymore) and then that this not the function for my purpose.

Well, well, what I am looking for is the function that is called when in a GUI the user hit the disconnect button... So it exists somewhere, but maybe it is not in a public API ?

-- Manuel



On 04/01/2014 08:16 PM, Dan Winship wrote:
On 04/01/2014 01:18 PM, Manuel Yguel wrote:
however in the include directory of libnm-glib the file nm-device.h
contains only the following function:
                    void nm_device_disconnect (NMDevice *device,
NMDeviceDeactivateFn callback, gpointer user_data);

I tried to use the last one with a dummy callback function and with a
pointer to a NMClient object but it did not disconnect the network.

Thanks for any hint or pointer.
A libnm-glib method that takes a callback is most likely asynchronous.
So you need to call nm_device_disconnect() and then run the main loop
until the callback gets called.

-- Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]