Fix the waring issue 42/65242/2 accepted/tizen/common/20160414.143701 accepted/tizen/mobile/20160411.100406 accepted/tizen/tv/20160411.100328 accepted/tizen/wearable/20160411.100355 submit/tizen_common/20160413.090423 submit/tizen_mobile/20160411.030431 submit/tizen_tv/20160411.030435 submit/tizen_wearable/20160411.030439
authorHyuk Lee <hyuk0512.lee@samsung.com>
Fri, 8 Apr 2016 05:27:53 +0000 (14:27 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Fri, 8 Apr 2016 07:11:35 +0000 (16:11 +0900)
Change-Id: I098d6e7aa631adf782163b2cbf075f600a9488e2
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
bt-service/bt-request-handler.c
bt-service/bt-service-adapter-le.c
bt-service/bt-service-adapter.c
bt-service/bt-service-agent.c
bt-service/bt-service-dpm.c
bt-service/bt-service-event-receiver.c
bt-service/bt-service-main.c

index a8c4ae5..01cbaed 100755 (executable)
@@ -2110,8 +2110,8 @@ gboolean __bt_service_check_privilege(int function_name,
         char *client_creds = NULL;
         char *user_creds = NULL;
         char *client_session = "";
-        int client_creds_method = CLIENT_METHOD_SMACK;
-        int user_creds_method = USER_METHOD_UID;
+        enum cynara_client_creds client_creds_method = CLIENT_METHOD_SMACK;
+        enum cynara_user_creds user_creds_method = USER_METHOD_UID;
         char err_msg[256] = {0, };
 
         retv_if(unique_name == NULL, FALSE);
index 02ad31b..3787c27 100755 (executable)
@@ -141,7 +141,7 @@ void _bt_clear_gatt_client_senders(void)
                gatt_client_senders = NULL;
        }
 }
-
+#if 0
 static void __bt_send_foreach_event(gpointer data, gpointer user_data)
 {
        char *sender = data;
@@ -150,7 +150,7 @@ static void __bt_send_foreach_event(gpointer data, gpointer user_data)
        _bt_send_event_to_dest(sender, BT_DEVICE_EVENT,BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED,
                                        param);
 }
-
+#endif
 void _bt_send_char_value_changed_event(void *param)
 {
 #if 0
index 7263dd6..e3dbbef 100755 (executable)
@@ -688,7 +688,7 @@ int _bt_enable_core(void)
        return BLUETOOTH_ERROR_NONE;
 }
 
-#if defined(TIZEN_BT_FLIGHTMODE_ENABLED) || !defined(TIZEN_WEARABLE)
+#if defined(TIZEN_TELEPHONY_ENABLED) || (!defined(TIZEN_WEARABLE) && defined(ENABLE_TIZEN_2_4))
 static void __bt_service_flight_ps_mode_cb(keynode_t *node, void *data)
 {
        gboolean flight_mode = FALSE;
index 7eef8dc..d0f442b 100755 (executable)
@@ -739,7 +739,9 @@ static gboolean __authorize_request(GapAgentPrivate *agent, GDBusProxy *device,
        tethering_h tethering = NULL;
 #endif
        int result = BLUETOOTH_ERROR_NONE;
+#ifndef AUTO_ACCEPT
        int request_type = BT_AGENT_EVENT_AUTHORIZE_REQUEST;
+#endif
 
        BT_DBG("+");
 
@@ -890,23 +892,23 @@ fail:
                goto done;
        }
 
-       if (!strcasecmp(uuid, OPP_UUID))
-               request_type = BT_AGENT_EVENT_EXCHANGE_REQUEST;
-       else if (!strcasecmp(uuid, PBAP_UUID))
-               request_type = BT_AGENT_EVENT_PBAP_REQUEST;
-       else if (!strcasecmp(uuid, MAP_UUID))
-               request_type = BT_AGENT_EVENT_MAP_REQUEST;
-
        if (trust) {
                BT_INFO("Trusted device, so authorize\n");
                gap_agent_reply_authorize(agent,
-                                             GAP_AGENT_ACCEPT, NULL);
+                               GAP_AGENT_ACCEPT, NULL);
        } else {
 #ifdef AUTO_ACCEPT
                gap_agent_reply_authorize(agent, GAP_AGENT_ACCEPT, NULL);
 #else
+               if (!strcasecmp(uuid, OPP_UUID))
+                       request_type = BT_AGENT_EVENT_EXCHANGE_REQUEST;
+               else if (!strcasecmp(uuid, PBAP_UUID))
+                       request_type = BT_AGENT_EVENT_PBAP_REQUEST;
+               else if (!strcasecmp(uuid, MAP_UUID))
+                       request_type = BT_AGENT_EVENT_MAP_REQUEST;
+
                _bt_launch_system_popup(request_type, name, NULL, NULL,
-                                               _gap_agent_get_path(agent));
+                               _gap_agent_get_path(agent));
 #endif
        }
 
index 8637310..68e3029 100755 (executable)
 #include "bt-service-dpm.h"
 
 static dpm_policy_t policy_table[DPM_POLICY_END] = {
-       [DPM_POLICY_ALLOW_BLUETOOTH] = {DPM_BT_ERROR},
-       [DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = {DPM_STATUS_ERROR},
-       [DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = {DPM_STATUS_ERROR},
-       [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = {NULL},
-       [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = {NULL},
-       [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = {NULL},
-       [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = {NULL},
-       [DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = {DPM_STATUS_ERROR},
-       [DPM_POLICY_BLUETOOTH_PAIRING_STATE] = {DPM_STATUS_ERROR},
-       [DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = {DPM_STATUS_ERROR},
-       [DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE] = {DPM_STATUS_ERROR},
-       [DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE] = {DPM_STATUS_ERROR},
-       [DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE] = {DPM_STATUS_ERROR},
+       [DPM_POLICY_ALLOW_BLUETOOTH] = {{DPM_BT_ERROR}},
+       [DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = {{DPM_STATUS_ERROR}},
+       [DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = {{DPM_STATUS_ERROR}},
+       [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = {{NULL}},
+       [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = {{NULL}},
+       [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = {{NULL}},
+       [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = {{NULL}},
+       [DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = {{DPM_STATUS_ERROR}},
+       [DPM_POLICY_BLUETOOTH_PAIRING_STATE] = {{DPM_STATUS_ERROR}},
+       [DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = {{DPM_STATUS_ERROR}},
+       [DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE] = {{DPM_STATUS_ERROR}},
+       [DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE] = {{DPM_STATUS_ERROR}},
+       [DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE] = {{DPM_STATUS_ERROR}},
 };
 
 
@@ -571,4 +571,4 @@ dpm_result_t _bt_dpm_clear_bluetooth_devices_from_list(void)
        }
 
        return err;
-}
\ No newline at end of file
+}
index 1cd92d2..66d5754 100755 (executable)
@@ -461,7 +461,6 @@ void _bt_handle_adapter_event(GVariant *msg, const char *member)
        } else if (strcasecmp(member, "AdvertisingEnabled") == 0) {
                BT_DBG("Advertising Enabled");
                int slot_id;
-               const char *sender;
                int event;
                int adv_handle;
                gboolean status = FALSE;
@@ -473,7 +472,6 @@ void _bt_handle_adapter_event(GVariant *msg, const char *member)
                /* Send event to application */
                _bt_set_advertising_status(slot_id, status);
 
-               sender = _bt_get_adv_slot_owner(slot_id);
                adv_handle = _bt_get_adv_slot_adv_handle(slot_id);
 
                if (status)
@@ -484,6 +482,8 @@ void _bt_handle_adapter_event(GVariant *msg, const char *member)
                                        adv_handle);
 
 #if 0
+               const char *sender;
+               sender = _bt_get_adv_slot_owner(slot_id);
                _bt_send_event_to_dest(sender, BT_ADAPTER_EVENT,
                                event,
                                param);
index 7a18ca9..0ecc306 100755 (executable)
@@ -60,11 +60,10 @@ static void __bt_release_service(void)
 
 static void __bt_sigterm_handler(int signo, siginfo_t *info, void *data)
 {
-       int ret;
-
        BT_INFO("signal [%d] is sent by [%d]", signo, info->si_pid);
 
 #ifndef TIZEN_TV
+       int ret;
        ret = _bt_recover_adapter();
        if (ret != BLUETOOTH_ERROR_NONE)
                BT_ERR("_bt_recover_adapter is failed : %d", ret);
@@ -146,12 +145,14 @@ gboolean _bt_reliable_terminate_service(gpointer user_data)
 
 static gboolean __bt_check_bt_service(void *data)
 {
-       int bt_status = VCONFKEY_BT_STATUS_OFF;
-       int bt_le_status = VCONFKEY_BT_LE_STATUS_OFF;
        bt_status_t status = BT_DEACTIVATED;
        bt_le_status_t le_status = BT_LE_DEACTIVATED;
+#ifndef TIZEN_TV
+       int bt_status = VCONFKEY_BT_STATUS_OFF;
+       int bt_le_status = VCONFKEY_BT_LE_STATUS_OFF;
        int flight_mode_deactivation = 0;
        int bt_off_due_to_timeout = 0;
+#endif
 #if 0
        int ps_mode_deactivation = 0;
 #endif