summaryrefslogtreecommitdiff
path: root/src/notifier.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-07-15 19:43:17 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-07-15 19:43:17 -0300
commit7cc46916cc6f567f38bfc59c820f7708be4586a5 (patch)
tree5493929d984bfa8fd7d5f06c84fabc77eea460d0 /src/notifier.c
parent2c92d0971c65ad04d25bd2909a0040b3c0e32fcd (diff)
downloadconnman-7cc46916cc6f567f38bfc59c820f7708be4586a5.tar.gz
connman-7cc46916cc6f567f38bfc59c820f7708be4586a5.tar.bz2
connman-7cc46916cc6f567f38bfc59c820f7708be4586a5.zip
notifier: Avoid shadowing connected variable
Diffstat (limited to 'src/notifier.c')
-rw-r--r--src/notifier.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/notifier.c b/src/notifier.c
index b328a2ad..ebde689b 100644
--- a/src/notifier.c
+++ b/src/notifier.c
@@ -139,15 +139,6 @@ static void state_changed(void)
DBUS_TYPE_STRING, &notifier_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)