From: Martin Xu Date: Fri, 3 Dec 2010 11:06:47 +0000 (+0800) Subject: tethering: Set tethering_status earlier X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~2042 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19ac02e348fe64d2be0e28e30c377f79c5e9e185;p=profile%2Fivi%2Fconnman.git 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. --- 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; }