summaryrefslogtreecommitdiff
path: root/src/technology.c
diff options
context:
space:
mode:
authorAlok Barsode <alok.barsode@linux.intel.com>2011-08-24 16:44:16 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2011-08-25 11:14:22 +0200
commitbdf2640d2d020331efa7975f52ffa5378ae451fc (patch)
treeee59a63c728e21bed5d1de7c3f1ac2b14b38ae0e /src/technology.c
parentafe64c7ea9931f2442a464cb5c7d5bcd47e98560 (diff)
downloadconnman-bdf2640d2d020331efa7975f52ffa5378ae451fc.tar.gz
connman-bdf2640d2d020331efa7975f52ffa5378ae451fc.tar.bz2
connman-bdf2640d2d020331efa7975f52ffa5378ae451fc.zip
technology: Fix enable notifier to be invoked just once
When there are multiple devices, the technology enable notifier was invoked multiple times. But when disabling the technology, the disable notifier was invoked just once, hence there was a mismatch in the technology states.
Diffstat (limited to 'src/technology.c')
-rw-r--r--src/technology.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/technology.c b/src/technology.c
index 4d8eb03d..ae381aad 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -693,9 +693,8 @@ int __connman_technology_enabled(enum connman_service_type type)
if (g_atomic_int_get(&technology->blocked))
return -ERFKILL;
- __connman_notifier_enable(type);
-
if (g_atomic_int_exchange_and_add(&technology->enabled, 1) == 0) {
+ __connman_notifier_enable(type);
technology->state = CONNMAN_TECHNOLOGY_STATE_ENABLED;
state_changed(technology);
}