From 7b131462d3b84f9fd5e87938c5f26d951d39a6cb Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 10 Mar 2017 15:14:56 +0100 Subject: Instead of a global pointer, config is now a Singleton. Change-Id: I0cfc34f330c531ba5f070542a1cb723be4bcc70a Signed-off-by: Romain Forlot --- src/low-can-binding.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/low-can-binding.cpp') 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) -- cgit 1.2.3-korg