From 7cc46916cc6f567f38bfc59c820f7708be4586a5 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 15 Jul 2012 19:43:17 -0300 Subject: [PATCH] notifier: Avoid shadowing connected variable --- src/notifier.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/notifier.c b/src/notifier.c index b328a2a..ebde689 100644 --- a/src/notifier.c +++ b/src/notifier.c @@ -139,15 +139,6 @@ static void state_changed(void) DBUS_TYPE_STRING, ¬ifier_state); } -static void technology_connected(enum connman_service_type type, - connman_bool_t connected) -{ - DBG("type %d connected %d", type, connected); - - __connman_technology_set_connected(type, connected); - state_changed(); -} - void __connman_notifier_connect(enum connman_service_type type) { DBG("type %d", type); @@ -167,8 +158,10 @@ void __connman_notifier_connect(enum connman_service_type type) break; } - if (__sync_fetch_and_add(&connected[type], 1) == 0) - technology_connected(type, TRUE); + if (__sync_fetch_and_add(&connected[type], 1) == 0) { + __connman_technology_set_connected(type, TRUE); + state_changed(); + } } void __connman_notifier_enter_online(enum connman_service_type type) @@ -215,7 +208,8 @@ void __connman_notifier_disconnect(enum connman_service_type type) if (__sync_fetch_and_sub(&connected[type], 1) != 1) return; - technology_connected(type, FALSE); + __connman_technology_set_connected(type, FALSE); + state_changed(); } void __connman_notifier_default_changed(struct connman_service *service) -- 2.7.4