From 3fa518f42900dbc2827303a010f40283daefa7e3 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Mon, 23 Jan 2017 17:27:21 +0900 Subject: [PATCH] Fix: ifdef logic error + runtime profile determination Change-Id: Ie99001670d3c28ae458571c841ca6bda1c9a3caf CC: Jihoon Park Signed-off-by: MyungJoo Ham --- daemon/discovery_provider/WifiDirectDiscoveryProvider.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/daemon/discovery_provider/WifiDirectDiscoveryProvider.cpp b/daemon/discovery_provider/WifiDirectDiscoveryProvider.cpp index 699c310..c1a2c59 100755 --- a/daemon/discovery_provider/WifiDirectDiscoveryProvider.cpp +++ b/daemon/discovery_provider/WifiDirectDiscoveryProvider.cpp @@ -266,11 +266,15 @@ int init_wfd_client(void* disc_provider) ret = wifi_direct_set_connection_state_changed_cb(_cb_connection, (void*)NULL); _D("wifi_direct_set_connection_state_changed_cb() result=[%d]", ret); -// CAUTION: TIZEN_TV and TIZEN_TV_PRODUCT has been deadcode in Tizen.org -#if defined(TIZEN_TV) && defined(TIZEN_PRODUCT_TV) && defined(ENABLE_EXTRA_INFO) +#if defined(TIZEN_TV) || defined(TIZEN_PRODUCT_TV) || defined(ENABLE_EXTRA_INFO) ret = wifi_direct_set_peer_info_connection_state_changed_cb(_cb_peer_info_connection, (void*)NULL); _D("wifi_direct_set_peer_info_connection_state_changed_cb() result=[%d]", ret); -#endif /* defined(TIZEN_TV) && defined(TIZEN_PRODUCT_TV) && defined(ENABLE_EXTRA_INFO) */ +#else + if (conv::util::getTizenProfile() == conv::util::TIZEN_PROFILE_TV) { + ret = wifi_direct_set_peer_info_connection_state_changed_cb(_cb_peer_info_connection, (void*)NULL); + _D("wifi_direct_set_peer_info_connection_state_changed_cb() result=[%d]", ret); + } +#endif /* defined(TIZEN_TV) || defined(TIZEN_PRODUCT_TV) || defined(ENABLE_EXTRA_INFO) */ return ret; } -- 2.7.4