mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 09:04:55 +00:00
2005-10-17 Christopher Aillon <caillon@redhat.com>
* gnome/libnm_glib/libnm_glib.c: Make libnm_glib_unregister_callback () actually unregister the callback git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1034 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
9977ed57e5
commit
aa89e85d0b
|
@ -1,3 +1,8 @@
|
|||
2005-10-17 Christopher Aillon <caillon@redhat.com>
|
||||
|
||||
* gnome/libnm_glib/libnm_glib.c:
|
||||
Make libnm_glib_unregister_callback () actually unregister the callback
|
||||
|
||||
2005-10-17 Robert Love <rml@novell.com>
|
||||
|
||||
* src/NetworkManagerDevice.c: Actually wait 20s, as we intend, not
|
||||
|
|
|
@ -134,6 +134,17 @@ static void libnm_glib_schedule_single_callback (libnm_glib_ctx *ctx, libnm_glib
|
|||
g_source_unref (source);
|
||||
}
|
||||
|
||||
static void libnm_glib_unschedule_single_callback (libnm_glib_ctx *ctx, libnm_glib_callback *callback)
|
||||
{
|
||||
GSource *source;
|
||||
|
||||
g_return_if_fail (ctx != NULL);
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
source = g_main_context_find_source_by_user_data (callback->gmain_ctx, callback);
|
||||
if (source)
|
||||
g_source_destroy (source);
|
||||
}
|
||||
|
||||
static void libnm_glib_call_callbacks (libnm_glib_ctx *ctx)
|
||||
{
|
||||
|
@ -525,6 +536,7 @@ void libnm_glib_unregister_callback (libnm_glib_ctx *ctx, guint id)
|
|||
libnm_glib_callback *callback = (libnm_glib_callback *)(elem->data);
|
||||
if (callback && (callback->id == id))
|
||||
{
|
||||
libnm_glib_unschedule_single_callback (ctx, callback);
|
||||
ctx->callbacks = g_slist_remove_link (ctx->callbacks, elem);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue