tethering: Set tethering_status earlier
[platform/upstream/connman.git] / src / tethering.c
index e8d09c0..2915194 100644 (file)
@@ -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;
 }