summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-12-01 01:56:51 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-12-01 01:56:51 +0200
commitf345d81fe368294091c4f87be1f80e2226ef4ce1 (patch)
tree46e6f552fcd491dc5b1f482251c43c04f92d8dfb /src/main.c
parent152a3cbd8f2ff8fbf7b0739adf0624ce430a9ee3 (diff)
Stop the security manager if we do a DEVDOWN in adapter_up
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 46d5568d..e9454603 100644
--- a/src/main.c
+++ b/src/main.c
@@ -484,7 +484,10 @@ static void device_devup_setup(int dev_id)
configure_device(dev_id);
start_security_manager(dev_id);
- manager_start_adapter(dev_id);
+
+ /* Return value 1 means ioctl(DEVDOWN) was performed */
+ if (manager_start_adapter(dev_id) == 1)
+ stop_security_manager(dev_id);
}
static void init_all_devices(int ctl)