if (ret != BLUETOOTH_ERROR_NONE)
BT_ERR("Failed to stop ADV %d", ret);
- if (main_loop != NULL) {
+ if (main_loop != NULL)
g_main_loop_quit(main_loop);
- }
}
static void _bt_otp_set_char_value(const char *obj_path,
goto fail;
}
- while ((filename = g_dir_read_name(dir))) {
+ while ((filename = g_dir_read_name(dir)))
list = g_slist_append(list, (gpointer) filename);
- }
g_dir_close(dir);
}
if (g_strcmp0(obj_path, otp_feature_obj_path)) {
- if (!selected_object) {
+ if (!selected_object)
return BLUETOOTH_OTP_ERROR_OBJECT_NOT_SELECTED;
- }
}
info = otp_get_char_value(obj_path);
/* Send indication for CPs */
if (!g_strcmp0(char_path, otp_oacp_obj_path)) {
- if (OACP_indicate) {
+ if (OACP_indicate)
_bt_otp_send_indication(char_path, &info, &addr_hex);
- }
} else if (!g_strcmp0(char_path, otp_olcp_obj_path)) {
- if (OLCP_indicate) {
+ if (OLCP_indicate)
_bt_otp_send_indication(char_path, &info, &addr_hex);
- }
}
} else {
BT_ERR("Array Len 0");
indicate ? "StartNotify" : "StopNotify");
BT_INFO("Type '%s'\n", g_variant_get_type_string(var));
- if (!g_strcmp0(char_path, otp_oacp_obj_path)) {
+ if (!g_strcmp0(char_path, otp_oacp_obj_path))
OACP_indicate = indicate;
- } else if (!g_strcmp0(char_path, otp_olcp_obj_path)) {
+ else if (!g_strcmp0(char_path, otp_olcp_obj_path))
OLCP_indicate = indicate;
- }
}
}
return;
BT_INFO("Interface %s, Signal %s", interface_name, signal_name);
if (g_strcmp0(interface_name, BT_OTP_INTERFACE_NAME) == 0) {
- if (strcasecmp(signal_name, BLE_DISABLED) == 0) {
+ if (strcasecmp(signal_name, BLE_DISABLED) == 0)
_bt_otp_exit();
- }
}
}
BT_DBG("g_main_loop_quit called!");
- if (main_loop != NULL) {
+ if (main_loop != NULL)
g_main_loop_unref(main_loop);
- }
return 0;
}