From a859bcd92998cd539648e5589de1408e35837cb3 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Fri, 26 Oct 2012 10:33:11 +0300 Subject: [PATCH] technology: Do not proceed with tethering if technology is not enabled Fixes BMC#25846 --- src/technology.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/technology.c b/src/technology.c index 324a103..1ff8fb7 100644 --- a/src/technology.c +++ b/src/technology.c @@ -223,6 +223,10 @@ static int set_tethering(struct connman_technology *technology, technology->driver->set_tethering == NULL) return -EOPNOTSUPP; + __sync_synchronize(); + if (technology->enabled == FALSE) + return -EACCES; + bridge = __connman_tethering_get_bridge(); if (bridge == NULL) return -EOPNOTSUPP; -- 2.7.4