summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2013-11-29 16:21:36 +0800
committerZhang zhengguang <zhengguang.zhang@intel.com>2013-11-29 16:26:45 +0800
commit32f5ff7f6d9e6b9440728e15bc2f23879b258078 (patch)
tree36729658ea954bd49cf3c33bbe8eaf206da90e0a
parenta530ebe0ed32fd3d4d8fe1c698ccf919d1e6256e (diff)
downloadconnman-accepted/tizen/20131202.210836.tar.gz
connman-accepted/tizen/20131202.210836.tar.bz2
connman-accepted/tizen/20131202.210836.zip
Root cause: When rfkill is disabled, it didn't handle correctly in old code, which leads to rfkill logic error. Change-Id: I176888f0c00eb4968d0d27aea06853970230119c Signed-off-by: Zhang zhengguang <zhengguang.zhang@intel.com>
-rw-r--r--src/main.c6
-rw-r--r--src/rfkill.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index c257ca0b..7a6b7da8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -690,8 +690,10 @@ int main(int argc, char *argv[])
__connman_dhcpv6_init();
__connman_wpad_init();
__connman_wispr_init();
- __connman_rfkill_init();
+#ifndef DISABLE_RFKILL
+ __connman_rfkill_init();
+#endif
g_free(option_config);
g_free(option_device);
g_free(option_plugin);
@@ -702,7 +704,9 @@ int main(int argc, char *argv[])
g_source_remove(signal);
+#ifndef DISABLE_RFKILL
__connman_rfkill_cleanup();
+#endif
__connman_wispr_cleanup();
__connman_wpad_cleanup();
__connman_dhcpv6_cleanup();
diff --git a/src/rfkill.c b/src/rfkill.c
index e978d712..e21b2a15 100644
--- a/src/rfkill.c
+++ b/src/rfkill.c
@@ -164,9 +164,6 @@ int __connman_rfkill_block(enum connman_service_type type, connman_bool_t block)
DBG("type %d block %d", type, block);
-#if defined DISABLE_RFKILL
- DBG("rfkill is disabled by default");
-#else
rfkill_type = convert_service_type(type);
if (rfkill_type == NUM_RFKILL_TYPES)
return -EINVAL;
@@ -188,7 +185,6 @@ int __connman_rfkill_block(enum connman_service_type type, connman_bool_t block)
err = 0;
close(fd);
-#endif
return err;
}