diff --git a/src/adapter.c b/src/adapter.c
index f4bb622..f9eb3af 100644
--- a/src/adapter.c
+++ b/src/adapter.c
void btd_adapter_class_changed(struct btd_adapter *adapter, uint8_t *new_class)
{
uint32_t class;
+ uint8_t cls[3];
class = new_class[0] | (new_class[1] << 8) | (new_class[2] << 16);
adapter->dev_class = class;
- if (main_opts.gatt_enabled) {
- uint8_t cls[3];
+ memcpy(cls, new_class, sizeof(cls));
- memcpy(cls, new_class, sizeof(cls));
-
- /* Removes service class */
- cls[1] = cls[1] & 0x1f;
- attrib_gap_set(adapter, GATT_CHARAC_APPEARANCE, cls, 2);
- }
+ /* Removes service class */
+ cls[1] = cls[1] & 0x1f;
+ attrib_gap_set(adapter, GATT_CHARAC_APPEARANCE, cls, 2);
g_dbus_emit_property_changed(btd_get_dbus_connection(), adapter->path,
ADAPTER_INTERFACE, "Class");
g_dbus_emit_property_changed(btd_get_dbus_connection(), adapter->path,
ADAPTER_INTERFACE, "Name");
- if (main_opts.gatt_enabled)
- attrib_gap_set(adapter, GATT_CHARAC_DEVICE_NAME,
+ attrib_gap_set(adapter, GATT_CHARAC_DEVICE_NAME,
(const uint8_t *) name, strlen(name));
}
sdp_init_services_list(&adapter->bdaddr);
- if (main_opts.gatt_enabled)
- btd_adapter_gatt_server_start(adapter);
+ btd_adapter_gatt_server_start(adapter);
load_config(adapter);
convert_device_storage(adapter);
g_slist_free(adapter->devices);
unload_drivers(adapter);
- if (main_opts.gatt_enabled)
- btd_adapter_gatt_server_stop(adapter);
+ btd_adapter_gatt_server_stop(adapter);
g_slist_free(adapter->pin_callbacks);
diff --git a/src/hcid.h b/src/hcid.h
index 1e5e15a..43a75fd 100644
--- a/src/hcid.h
+++ b/src/hcid.h
gboolean reverse_sdp;
gboolean name_resolv;
gboolean debug_keys;
- gboolean gatt_enabled;
uint8_t mode;
diff --git a/src/main.c b/src/main.c
index f8c9369..9ea12df 100644
--- a/src/main.c
+++ b/src/main.c
else
main_opts.debug_keys = boolean;
- boolean = g_key_file_get_boolean(config, "General",
- "EnableGatt", &err);
- if (err)
- g_clear_error(&err);
- else
- main_opts.gatt_enabled = boolean;
-
main_opts.link_mode = HCI_LM_ACCEPT;
main_opts.link_policy = HCI_LP_RSWITCH | HCI_LP_SNIFF |
diff --git a/src/main.conf b/src/main.conf
index 787ef4f..aa59c82 100644
--- a/src/main.conf
+++ b/src/main.conf
# makes debug link keys valid only for the duration of the connection
# that they were created for.
DebugKeys = false
-
-# Enable the GATT functionality. Default is false
-EnableGatt = false