From 19ac02e348fe64d2be0e28e30c377f79c5e9e185 Mon Sep 17 00:00:00 2001 From: Martin Xu Date: Fri, 3 Dec 2010 19:06:47 +0800 Subject: [PATCH] tethering: Set tethering_status earlier With synchronous technologies (e.g. ethernet), connman_technology_tethering_notify() is called immediatly after enabling or disabling tethering. If tethering_status is not properly set, then that will fail. --- src/tethering.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tethering.c b/src/tethering.c index e8d09c0..2915194 100644 --- a/src/tethering.c +++ b/src/tethering.c @@ -349,13 +349,13 @@ int __connman_tethering_set_status(connman_bool_t status) if (status == tethering_status) return -EALREADY; + tethering_status = status; + if (status == TRUE) __connman_technology_enable_tethering(BRIDGE_NAME); else __connman_technology_disable_tethering(BRIDGE_NAME); - tethering_status = status; - return 0; } -- 2.7.4