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-generic.c | |
parent | 23a615605996415cfdbc8d80831959e5f2679278 (diff) |
plugins: always set a proper error domain in GErrors
Diffstat (limited to 'plugins/mm-plugin-generic.c')
-rw-r--r-- | plugins/mm-plugin-generic.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/mm-plugin-generic.c b/plugins/mm-plugin-generic.c index 8b2bc3bc..5c45322e 100644 --- a/plugins/mm-plugin-generic.c +++ b/plugins/mm-plugin-generic.c @@ -26,6 +26,8 @@ #include <gmodule.h> +#include <mm-errors-types.h> + #include "mm-plugin-generic.h" #include "mm-broadband-modem.h" #include "mm-serial-parsers.h" @@ -55,7 +57,10 @@ grab_port (MMPluginBase *base, /* The generic plugin cannot do anything with non-AT and non-QCDM ports */ if (!mm_port_probe_is_at (probe) && !mm_port_probe_is_qcdm (probe)) { - g_set_error (error, 0, 0, "Ignoring non-AT/non-QCDM ports"); + g_set_error (error, + MM_CORE_ERROR, + MM_CORE_ERROR_UNSUPPORTED, + "Ignoring non-AT/non-QCDM ports"); return NULL; } @@ -66,7 +71,10 @@ grab_port (MMPluginBase *base, devfile = g_udev_device_get_device_file (port); if (!devfile) { if (!driver || !g_str_equal (driver, "bluetooth")) { - g_set_error (error, 0, 0, "Could not get port's sysfs file."); + g_set_error (error, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "Could not get port's sysfs file."); return NULL; } |