summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2012-01-19 09:03:47 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-20 00:46:50 +0100
commit9a7822288bed6100cd920431ceb65f056e6e53f8 (patch)
treeec634c8b1a50e9e1720e750bf5661974828a5575 /plugins
parente1d92d253c5db96bdc8fe2a21e463fc730570311 (diff)
downloadconnman-9a7822288bed6100cd920431ceb65f056e6e53f8.tar.gz
connman-9a7822288bed6100cd920431ceb65f056e6e53f8.tar.bz2
connman-9a7822288bed6100cd920431ceb65f056e6e53f8.zip
ofono: Register technology driver
With e1d92d253c5db96bdc8fe2a21e463fc730570311 we need to register a driver for each technology. Fixes BMC#24702.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ofono.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c
index b15ad03e..c9a3256d 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -2409,6 +2409,22 @@ static struct connman_device_driver modem_driver = {
.disable = modem_disable,
};
+static int tech_probe(struct connman_technology *technology)
+{
+ return 0;
+}
+
+static void tech_remove(struct connman_technology *technology)
+{
+}
+
+static struct connman_technology_driver tech_driver = {
+ .name = "cellular",
+ .type = CONNMAN_SERVICE_TYPE_CELLULAR,
+ .probe = tech_probe,
+ .remove = tech_remove,
+};
+
static guint watch;
static guint modem_added_watch;
static guint modem_removed_watch;
@@ -2523,6 +2539,13 @@ static int ofono_init(void)
goto remove;
}
+ err = connman_technology_driver_register(&tech_driver);
+ if (err < 0) {
+ connman_device_driver_unregister(&modem_driver);
+ connman_network_driver_unregister(&network_driver);
+ goto remove;
+ }
+
return 0;
remove:
@@ -2566,6 +2589,7 @@ static void ofono_exit(void)
context_hash = NULL;
}
+ connman_technology_driver_unregister(&tech_driver);
connman_device_driver_unregister(&modem_driver);
connman_network_driver_unregister(&network_driver);