From: Seonah Moon Date: Fri, 8 Apr 2016 06:25:10 +0000 (+0900) Subject: Apply Tizen coding rules X-Git-Tag: accepted/tizen/common/20160422.172021~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76f4e6197d35d47ee070fcf12630f86fb7d0e7a3;p=platform%2Fcore%2Fapi%2Ftethering.git Apply Tizen coding rules Change-Id: I6c397f399d67892bf21686632c570db88988d305 Signed-off-by: Seonah Moon --- diff --git a/packaging/capi-network-tethering.spec b/packaging/capi-network-tethering.spec index 959bcdb..02894c1 100644 --- a/packaging/capi-network-tethering.spec +++ b/packaging/capi-network-tethering.spec @@ -1,6 +1,6 @@ Name: capi-network-tethering Summary: Tethering Framework -Version: 1.0.32 +Version: 1.0.33 Release: 1 Group: System/Network License: Apache-2.0 diff --git a/src/tethering.c b/src/tethering.c index 5c39b85..cbfdafa 100755 --- a/src/tethering.c +++ b/src/tethering.c @@ -1336,21 +1336,21 @@ static bool __get_wifi_mode_type(tethering_wifi_mode_type_e type, char **buf) _retvm_if(buf == NULL, false, "parameter(buf) is NULL\n"); switch (type) { - case TETHERING_WIFI_MODE_TYPE_B: - *buf = g_strdup("b"); - break; - case TETHERING_WIFI_MODE_TYPE_G: - *buf = g_strdup("g"); - break; - case TETHERING_WIFI_MODE_TYPE_A: - *buf = g_strdup("a"); - break; - case TETHERING_WIFI_MODE_TYPE_AD: - *buf = g_strdup("ad"); - break; - default: - ERR("Not supported type : %d\n", type); - return false; + case TETHERING_WIFI_MODE_TYPE_B: + *buf = g_strdup("b"); + break; + case TETHERING_WIFI_MODE_TYPE_G: + *buf = g_strdup("g"); + break; + case TETHERING_WIFI_MODE_TYPE_A: + *buf = g_strdup("a"); + break; + case TETHERING_WIFI_MODE_TYPE_AD: + *buf = g_strdup("ad"); + break; + default: + ERR("Not supported type : %d\n", type); + return false; } return true; } @@ -1384,7 +1384,7 @@ static int __prepare_wifi_settings(tethering_h tethering, _softap_settings_t *se set->mac_filter = th->mac_filter; set->channel = th->channel; - __get_wifi_mode_type (th->mode_type, &ptr); + __get_wifi_mode_type(th->mode_type, &ptr); if (ptr == NULL) { g_strlcpy(set->mode, "", sizeof(set->mode)); } else { @@ -3358,7 +3358,7 @@ API int tethering_wifi_enable_dhcp(tethering_h tethering, bool enable) GDBusProxy *proxy = th->client_bus_proxy; - parameters = g_dbus_proxy_call_sync (proxy, "enable_dhcp", + parameters = g_dbus_proxy_call_sync(proxy, "enable_dhcp", g_variant_new("(b)", enable), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); @@ -3375,14 +3375,13 @@ API int tethering_wifi_enable_dhcp(tethering_h tethering, bool enable) return result; } - g_variant_get (parameters, "(u)", &result); + g_variant_get(parameters, "(u)", &result); g_variant_unref(parameters); - if (enable) { + if (enable) th->dhcp_enabled = true; - } else { + else th->dhcp_enabled = false; - } return TETHERING_ERROR_NONE; } @@ -3406,7 +3405,7 @@ API int tethering_wifi_set_dhcp_range(tethering_h tethering, char *rangestart, c GDBusProxy *proxy = th->client_bus_proxy; - parameters = g_dbus_proxy_call_sync (proxy, "dhcp_range", + parameters = g_dbus_proxy_call_sync(proxy, "dhcp_range", g_variant_new("(ss)", rangestart, rangestop), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); if (error) { @@ -3423,7 +3422,7 @@ API int tethering_wifi_set_dhcp_range(tethering_h tethering, char *rangestart, c return result; } - g_variant_get (parameters, "(u)", &result); + g_variant_get(parameters, "(u)", &result); g_variant_unref(parameters); th->dhcp_enabled = true; diff --git a/test/tethering_test.c b/test/tethering_test.c index 9c540f7..1f9982b 100755 --- a/test/tethering_test.c +++ b/test/tethering_test.c @@ -912,9 +912,8 @@ static int test_tethering_wifi_is_dhcp_enabled(void) if (__is_err(ret) == true) { printf("Fail to get dhcp server status!!\n"); return -1; - } - else { - printf("DHCP server is %s\n", enabled? "enabled": "disabled"); + } else { + printf("DHCP server is %s\n", enabled ? "enabled" : "disabled"); } return 1;