From 32a0c8fbb7d5fa76e963aec2e288a0e2dcc214a4 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 5 Jan 2012 01:30:08 +0100 Subject: plugin-manager: new defer-until-suggested support check result handling 'net' ports will be supported as soon as there is another port reporting successful support. --- src/mm-plugin-base.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/mm-plugin-base.c') diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c index 6ceaafab..6a64e19e 100644 --- a/src/mm-plugin-base.c +++ b/src/mm-plugin-base.c @@ -617,15 +617,18 @@ supports_port (MMPlugin *plugin, } /* Before launching any probing, check if the port is a net device (which - * cannot be probed). */ + * cannot be probed). + * TODO: With the new defer-until-suggested we probably don't need the modem + * object being passed down here just for this. */ if (g_str_equal (subsys, "net")) { /* If we already have a existing modem, then mark it as supported. * Otherwise, just defer a bit */ - g_simple_async_result_set_op_res_gpointer (async_result, - GUINT_TO_POINTER ((existing ? - MM_PLUGIN_SUPPORTS_PORT_SUPPORTED : - MM_PLUGIN_SUPPORTS_PORT_DEFER)), - NULL); + g_simple_async_result_set_op_res_gpointer ( + async_result, + GUINT_TO_POINTER ((existing ? + MM_PLUGIN_SUPPORTS_PORT_SUPPORTED : + MM_PLUGIN_SUPPORTS_PORT_DEFER_UNTIL_SUGGESTED)), + NULL); g_simple_async_result_complete_in_idle (async_result); goto out; } -- cgit v1.2.3-70-g09d2