Commit aa89e85d authored by Chris Aillon's avatar Chris Aillon Committed by Chris Aillon

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
parent 9977ed57
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment