diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-02-07 17:05:26 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:15:00 +0100 |
commit | a8ca3df9be2a44465380fe68c5ea276cc51a3927 (patch) | |
tree | c219245ecb12f8ffcba7b1fc99df50e9f50bb57d /plugins/mm-plugin-gobi.c | |
parent | 23a615605996415cfdbc8d80831959e5f2679278 (diff) |
plugins: always set a proper error domain in GErrors
Diffstat (limited to 'plugins/mm-plugin-gobi.c')
-rw-r--r-- | plugins/mm-plugin-gobi.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/mm-plugin-gobi.c b/plugins/mm-plugin-gobi.c index 767e6ce0..89bc9243 100644 --- a/plugins/mm-plugin-gobi.c +++ b/plugins/mm-plugin-gobi.c @@ -41,7 +41,10 @@ grab_port (MMPluginBase *base, /* The Gobi plugin only handles AT and QCDM ports (for now) */ if (!mm_port_probe_is_at (probe) && !mm_port_probe_is_qcdm (probe)) { - g_set_error (error, 0, 0, "Ignoring non-AT/non-QCDM port"); + g_set_error_literal (error, + MM_CORE_ERROR, + MM_CORE_ERROR_UNSUPPORTED, + "Ignoring non-AT/non-QCDM port"); return NULL; } @@ -50,7 +53,10 @@ grab_port (MMPluginBase *base, driver = mm_port_probe_get_port_driver (probe); if (!mm_plugin_base_get_device_ids (base, subsys, name, &vendor, &product)) { - g_set_error (error, 0, 0, "Could not get modem product ID."); + g_set_error_literal (error, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "Could not get modem product ID"); return NULL; } @@ -106,4 +112,3 @@ mm_plugin_gobi_class_init (MMPluginGobiClass *klass) pb_class->grab_port = grab_port; } - |