asynchronous and deferred port detection
Allow plugins to perform asynchronous port detection, and to defer port detection until later. This moves the prober bits into MMPluginBase so that all plugins can take adavantage of it only when needed; the probing is not done at udev time. Furthermore, plugins like Novatel can flip the secondary ports over the AT mode through deferred detection, by deferring the secondary ports until the main port has been detected and AT$NWDMAT has been sent. This commit also finishes the port of the rest of the plugins (except mbm) over to the new port detection methods and plugin API.
This commit is contained in:
@@ -87,6 +87,9 @@ mm_serial_parser_v0_parse (gpointer data,
|
||||
g_return_val_if_fail (parser != NULL, FALSE);
|
||||
g_return_val_if_fail (response != NULL, FALSE);
|
||||
|
||||
if (G_UNLIKELY (!response->len || !strlen (response->str)))
|
||||
return FALSE;
|
||||
|
||||
found = g_regex_match_full (parser->generic_response, response->str, response->len, 0, 0, &match_info, NULL);
|
||||
if (found) {
|
||||
str = g_match_info_fetch (match_info, 1);
|
||||
@@ -205,7 +208,10 @@ mm_serial_parser_v1_parse (gpointer data,
|
||||
g_return_val_if_fail (parser != NULL, FALSE);
|
||||
g_return_val_if_fail (response != NULL, FALSE);
|
||||
|
||||
/* First, check for successfule responses */
|
||||
if (G_UNLIKELY (!response->len || !strlen (response->str)))
|
||||
return FALSE;
|
||||
|
||||
/* First, check for successful responses */
|
||||
|
||||
found = g_regex_match_full (parser->regex_ok, response->str, response->len, 0, 0, NULL, NULL);
|
||||
if (found)
|
||||
|
Reference in New Issue
Block a user