char *value = NULL;
GVariantIter *iter = NULL;
g_variant_get(val, "as", &iter);
+
+ ret_if(iter == NULL);
+
while (g_variant_iter_loop(iter, "s", &name)) {
BT_DBG("name = %s", name);
g_variant_iter_loop(iter, "s", &value);
if (FALSE == _bt_update_le_feature_support(name, value))
BT_INFO("Fail to update LE feature info");
}
- if (iter)
- g_variant_iter_free(iter);
+
+ g_variant_iter_free(iter);
} else if (strcasecmp(property, "IpspInitStateChanged") == 0) {
gboolean ipsp_initialized = FALSE;
GVariant *param = NULL;
bt_remote_dev_info_t *remote_dev_info;
g_variant_iter_init(&value_iter, msg);
+#ifdef TIZEN_FEATURE_BT_DPM
+ int desktop_state = DPM_BT_ERROR;
+#endif
while ((g_variant_iter_loop(&value_iter, "{sv}", &property, &val))) {
BT_DBG("Property %s", property);
if (strcasecmp(property, "Connected") == 0) {
BT_DBG("Name %s", remote_dev_info->name);
#ifdef TIZEN_FEATURE_BT_DPM
- if (_bt_dpm_get_bluetooth_desktop_connectivity_state() ==
- DPM_RESTRICTED) {
+ _bt_dpm_get_bluetooth_desktop_connectivity_state(&desktop_state);
+ if (desktop_state == DPM_RESTRICTED) {
bluetooth_device_class_t device_class;
_bt_divide_device_class(&device_class, remote_dev_info->class);
BT_DBG("BT_PROXIMITY_REPORTER_INTERFACE");
_bt_handle_pxp_property_changed_event(val,
object_path, BT_PXP_REPORTER_ROLE);
- } else if (strcasecmp(interface_name, BT_PROXIMITY_MONITOR_INTERFACE) == 0) {
- BT_DBG("BT_PROXIMITY_MONITOR_INTERFACE");
- _bt_handle_pxp_property_changed_event(val,
- object_path, BT_PXP_MONITOR_ROLE);
}
g_variant_unref(val);
}
&le_dev_info->rssi,
&le_dev_info->adv_data_len,
&value);
+
+ ret_if(value == NULL);
+
_bt_convert_device_path_to_address(path, le_dev_info->address);
buffer_len = g_variant_get_size(value);
if (bt_event == BT_DEVICE_EVENT) {
bt_cache_info_t *cache_info;
bt_remote_dev_info_t *dev_info;
-
+#ifdef TIZEN_FEATURE_BT_DPM
+ int desktop_state = DPM_BT_ERROR;
+#endif
ret_if(_bt_is_discovering() == FALSE &&
_bt_is_le_scanning() == FALSE);
dev_info->name = g_strdup(dev_info->address);
#ifdef TIZEN_FEATURE_BT_DPM
- if (_bt_dpm_get_bluetooth_desktop_connectivity_state() ==
- DPM_RESTRICTED) {
+ _bt_dpm_get_bluetooth_desktop_connectivity_state(&desktop_state);
+ if (desktop_state == DPM_RESTRICTED) {
bluetooth_device_class_t device_class;
_bt_divide_device_class(&device_class, dev_info->class);
BT_DBG("[%s]device_class.major_class : %d", dev_info->name, device_class.major_class);
_bt_stop_advertising_by_terminated_process(name);
/* Stop LE Scan */
_bt_stop_le_scan(name);
+
+ /* Stop the Proximity reporter service */
+ _bt_proximity_reporter_stop_by_terminated_process(name);
+
g_free(name);
g_free(previous);
g_free(current);