Fix: ifdef logic error + runtime profile determination 47/111647/2
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 23 Jan 2017 08:27:21 +0000 (17:27 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 23 Jan 2017 08:52:55 +0000 (17:52 +0900)
Change-Id: Ie99001670d3c28ae458571c841ca6bda1c9a3caf
CC: Jihoon Park <jpark0@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
daemon/discovery_provider/WifiDirectDiscoveryProvider.cpp

index 699c310..c1a2c59 100755 (executable)
@@ -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;
 }