Commit c51c4474 authored by Chris Aillon's avatar Chris Aillon Committed by Chris Aillon
Browse files

2005-10-18 Christopher Aillon <caillon@redhat.com>

	* test/libnm_glib_test.c: Test unregistering, too.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1041 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 846ac5f2
2005-10-18 Christopher Aillon <caillon@redhat.com>
* test/libnm_glib_test.c: Test unregistering, too.
2005-10-17 Christopher Aillon <caillon@redhat.com>
* configure.in: Bump to 0.5.0
......
......@@ -61,6 +61,7 @@ int main( int argc, char *argv[] )
{
GMainLoop *loop;
libnm_glib_ctx *ctx;
guint id;
ctx = libnm_glib_init ();
if (!ctx)
......@@ -68,14 +69,17 @@ int main( int argc, char *argv[] )
fprintf (stderr, "Could not initialize libnm.\n");
exit (1);
}
libnm_glib_register_callback (ctx, status_printer, ctx, NULL);
loop = g_main_loop_new (NULL, FALSE);
// id = g_timeout_add (2000, status_printer, (gpointer)ctx);
id = libnm_glib_register_callback (ctx, status_printer, ctx, NULL);
fprintf (stderr, "Registered Callback with ID %d\n", id);
libnm_glib_unregister_callback (ctx, id);
fprintf (stderr, "Unregistered Callback with ID %d\n", id);
g_main_loop_run (loop);
id = libnm_glib_register_callback (ctx, status_printer, ctx, NULL);
fprintf (stderr, "Registered Callback with ID %d\n", id);
// g_source_remove (id);
loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (loop);
exit (0);
}
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