summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaesubkim <taesub.kim@samsung.com>2016-08-09 12:53:05 +0900
committertaesubkim <taesub.kim@samsung.com>2016-08-09 12:53:08 +0900
commitd333d3fff20e65bf0dfb3813e81e1974d842b9c8 (patch)
treead0b731888a225bb20e03e7a39b825063754e225
parent1450f2c8397fdefe0ad1aa9c61347fb7b54e88ad (diff)
downloadwifi-d333d3fff20e65bf0dfb3813e81e1974d842b9c8.tar.gz
wifi-d333d3fff20e65bf0dfb3813e81e1974d842b9c8.tar.bz2
wifi-d333d3fff20e65bf0dfb3813e81e1974d842b9c8.zip
Change-Id: Ic7cfb01de0fbe852c837a7238284100a0651bb63 Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
-rwxr-xr-xpackaging/capi-network-wifi.spec2
-rwxr-xr-xtest/wifi_test.c37
2 files changed, 26 insertions, 13 deletions
diff --git a/packaging/capi-network-wifi.spec b/packaging/capi-network-wifi.spec
index d323055..dd9821d 100755
--- a/packaging/capi-network-wifi.spec
+++ b/packaging/capi-network-wifi.spec
@@ -1,6 +1,6 @@
Name: capi-network-wifi
Summary: Network Wi-Fi library in TIZEN C API
-Version: 1.0.77
+Version: 1.0.78
Release: 1
Group: System/Network
License: Apache-2.0
diff --git a/test/wifi_test.c b/test/wifi_test.c
index 2f61cbf..a809dfe 100755
--- a/test/wifi_test.c
+++ b/test/wifi_test.c
@@ -1080,14 +1080,21 @@ int test_wifi_activate(void)
{
int rv = 0;
- rv = wifi_activate(__test_activated_callback, NULL);
+ bool state = false;
- if (rv != WIFI_ERROR_NONE) {
- printf("Fail to activate Wi-Fi device [%s]\n", __test_convert_error_to_string(rv));
- return -1;
- }
+ rv = wifi_is_activated(&state);
+
+ if(state != true) {
+ rv = wifi_activate(__test_activated_callback, NULL);
- printf("Success to activate Wi-Fi device\n");
+ if (rv != WIFI_ERROR_NONE) {
+ printf("Fail to activate Wi-Fi device [%s]", __test_convert_error_to_string(rv));
+ return -1;
+ }
+ }
+ else {
+ __test_activated_callback(WIFI_ERROR_NONE, NULL);
+ }
return 1;
}
@@ -1095,15 +1102,21 @@ int test_wifi_activate(void)
int test_wifi_deactivate(void)
{
int rv = 0;
+ bool state = false;
- rv = wifi_deactivate(__test_deactivated_callback, NULL);
+ rv = wifi_is_activated(&state);
- if (rv != WIFI_ERROR_NONE) {
- printf("Fail to deactivate Wi-Fi device [%s]\n", __test_convert_error_to_string(rv));
- return -1;
- }
+ if(state == true) {
+ rv = wifi_deactivate(__test_deactivated_callback, NULL);
- printf("Success to deactivate Wi-Fi device\n");
+ if (rv != WIFI_ERROR_NONE) {
+ printf("Fail to deactivate Wi-Fi device [%s]\n", __test_convert_error_to_string(rv));
+ return -1;
+ }
+ }
+ else {
+ __test_deactivated_callback(WIFI_ERROR_NONE, NULL);
+ }
return 1;
}