diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-02-05 08:38:23 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-02-05 08:38:23 +0100 |
commit | 7fbee6ce27176bfc7ae9b34a4de9452cf5f6fa43 (patch) | |
tree | 5cabb0ab457846912d99ef675160be0dce4fbe6f /plugins/mm-plugin-hso.c | |
parent | dc645b92b9a7db3076ae34986ac219d01677d124 (diff) |
Imported Upstream version 0.4+git.20110124t203624.00b6cceupstream/0.4+git.20110124t203624.00b6cce
Diffstat (limited to 'plugins/mm-plugin-hso.c')
-rw-r--r-- | plugins/mm-plugin-hso.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/mm-plugin-hso.c b/plugins/mm-plugin-hso.c index dc0a8fc..7b71932 100644 --- a/plugins/mm-plugin-hso.c +++ b/plugins/mm-plugin-hso.c @@ -105,6 +105,7 @@ grab_port (MMPluginBase *base, const char *name, *subsys, *sysfs_path; char *devfile; guint32 caps; + guint16 vendor = 0, product = 0; port = mm_plugin_base_supports_task_get_port (task); g_assert (port); @@ -112,6 +113,11 @@ grab_port (MMPluginBase *base, subsys = g_udev_device_get_subsystem (port); name = g_udev_device_get_name (port); + if (!mm_plugin_base_get_device_ids (base, subsys, name, &vendor, &product)) { + g_set_error (error, 0, 0, "Could not get modem product ID."); + return NULL; + } + devfile = g_strdup (g_udev_device_get_device_file (port)); if (!devfile) { if (!strcmp (subsys, "net")) { @@ -139,7 +145,9 @@ grab_port (MMPluginBase *base, if (!existing) { modem = mm_modem_hso_new (sysfs_path, mm_plugin_base_supports_task_get_driver (task), - mm_plugin_get_name (MM_PLUGIN (base))); + mm_plugin_get_name (MM_PLUGIN (base)), + vendor, + product); if (modem) { if (!mm_modem_grab_port (modem, subsys, name, MM_PORT_TYPE_UNKNOWN, NULL, error)) { g_object_unref (modem); |