aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin-base.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-06-05 20:21:52 -0500
committerDan Williams <dcbw@redhat.com>2011-06-05 20:58:13 -0500
commitb122938ab5fb6ff5be1d4575abb0ca81d2885ce3 (patch)
tree000c5147db0201ce8770bd6a821ef73c1ae52d51 /src/mm-plugin-base.c
parentd81fa43c1d721ed123401f4a89fd7b3771ab4463 (diff)
core: allow plugins to stop probing and not support a modem
Previously plugins could only stop probing, *or* stop probing and indicate support for a device. For the Alcatel X200/X060s debacle we need to stop probing and indicate that the plugin does not support the device at all.
Diffstat (limited to 'src/mm-plugin-base.c')
-rw-r--r--src/mm-plugin-base.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c
index 336f78ca..8d033a72 100644
--- a/src/mm-plugin-base.c
+++ b/src/mm-plugin-base.c
@@ -757,20 +757,13 @@ custom_init_response (MMAtSerialPort *port,
MMPluginBaseSupportsTaskPrivate *task_priv = MM_PLUGIN_BASE_SUPPORTS_TASK_GET_PRIVATE (task);
CustomInit *custom = task_priv->cur_custom->data;
gboolean retry = FALSE;
- gboolean fail = FALSE;
+ gboolean stop = FALSE;
guint32 level = 0;
custom->tries++;
- retry = custom->callback (task, response, error, custom->tries, &fail, &level, custom->callback_data);
+ retry = custom->callback (task, response, error, custom->tries, &stop, &level, custom->callback_data);
- if (fail) {
- /* Plugin said to fail the probe */
- probe_complete (task);
- return;
- }
-
- if (level > 0) {
- /* Plugin supports the modem */
+ if (stop) {
task_priv->probed_caps = level;
probe_complete (task);
return;