summaryrefslogtreecommitdiffstats
path: root/src/low-can-binding.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-10 15:14:56 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:41 +0100
commit7b131462d3b84f9fd5e87938c5f26d951d39a6cb (patch)
tree1e5ac1db9bb31f33707701f94ba3b418a777fc98 /src/low-can-binding.cpp
parent390edc67f93cb9447fb4585a12f58a63754c56d5 (diff)
Instead of a global pointer, config is now a Singleton.
Change-Id: I0cfc34f330c531ba5f070542a1cb723be4bcc70a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/low-can-binding.cpp')
-rw-r--r--src/low-can-binding.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp
index 93574908..8411b65d 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -42,7 +42,6 @@ extern "C"
// Interface between the daemon and the binding
const struct afb_binding_interface *binder_interface;
-configuration_t *config;
/********************************************************************************
*
@@ -221,9 +220,7 @@ extern "C"
*/
int afbBindingV1ServiceInit(struct afb_service service)
{
- config = new configuration_t();
-
- can_bus_t& can_bus_manager = config->get_can_bus_manager();
+ can_bus_t& can_bus_manager = configuration_t::instance().get_can_bus_manager();
/* Open CAN socket */
if(can_bus_manager.init_can_dev() == 0)