diff --git a/alert/main.c b/alert/main.c
index 25100e9..6e2e058 100644
--- a/alert/main.c
+++ b/alert/main.c
static int alert_init(void)
{
- if (!main_opts.attrib_server) {
+ if (!main_opts.gatt_enabled) {
DBG("Attribute server is disabled");
return -1;
}
static void alert_exit(void)
{
- if (!main_opts.attrib_server)
+ if (!main_opts.gatt_enabled)
return;
alert_server_exit();
diff --git a/plugins/gatt-example.c b/plugins/gatt-example.c
index f026761..165d218 100644
--- a/plugins/gatt-example.c
+++ b/plugins/gatt-example.c
static int gatt_example_init(void)
{
- if (!main_opts.attrib_server) {
+ if (!main_opts.gatt_enabled) {
DBG("Attribute server is disabled");
return -ENOTSUP;
}
static void gatt_example_exit(void)
{
- if (!main_opts.attrib_server)
+ if (!main_opts.gatt_enabled)
return;
btd_unregister_adapter_driver(&gatt_example_adapter_driver);
diff --git a/proximity/reporter.c b/proximity/reporter.c
index 9777574..d4a4c96 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
int reporter_init(struct btd_adapter *adapter)
{
- if (!main_opts.attrib_server) {
+ if (!main_opts.gatt_enabled) {
DBG("Attribute server is disabled");
return -1;
}
diff --git a/src/adapter.c b/src/adapter.c
index acb845e..13f3683 100644
--- a/src/adapter.c
+++ b/src/adapter.c
adapter->dev_class = new_class;
- if (main_opts.attrib_server) {
+ if (main_opts.gatt_enabled) {
/* Removes service class */
class[1] = class[1] & 0x1f;
attrib_gap_set(adapter, GATT_CHARAC_APPEARANCE, class, 2);
ADAPTER_INTERFACE, "Name",
DBUS_TYPE_STRING, &name);
- if (main_opts.attrib_server)
+ if (main_opts.gatt_enabled)
attrib_gap_set(adapter, GATT_CHARAC_DEVICE_NAME,
(const uint8_t *) name, strlen(name));
}
sdp_init_services_list(&adapter->bdaddr);
- if (main_opts.attrib_server)
+ if (main_opts.gatt_enabled)
btd_adapter_gatt_server_start(adapter);
load_drivers(adapter);
g_slist_free(adapter->devices);
unload_drivers(adapter);
- if (main_opts.attrib_server)
+ if (main_opts.gatt_enabled)
btd_adapter_gatt_server_stop(adapter);
g_slist_free(adapter->pin_callbacks);
diff --git a/src/hcid.h b/src/hcid.h
index e2eaf86..df2829a 100644
--- a/src/hcid.h
+++ b/src/hcid.h
gboolean reverse_sdp;
gboolean name_resolv;
gboolean debug_keys;
- gboolean attrib_server;
+ gboolean gatt_enabled;
uint8_t mode;
uint8_t discov_interval;
diff --git a/src/main.c b/src/main.c
index 60a0816..f01e070 100644
--- a/src/main.c
+++ b/src/main.c
main_opts.debug_keys = boolean;
boolean = g_key_file_get_boolean(config, "General",
- "AttributeServer", &err);
+ "EnableGatt", &err);
if (err)
g_clear_error(&err);
else
- main_opts.attrib_server = boolean;
+ main_opts.gatt_enabled = boolean;
main_opts.link_mode = HCI_LM_ACCEPT;
diff --git a/time/main.c b/time/main.c
index a4de0fe..cbcdb0d 100644
--- a/time/main.c
+++ b/time/main.c
static int time_init(void)
{
- if (!main_opts.attrib_server) {
+ if (!main_opts.gatt_enabled) {
DBG("Attribute server is disabled");
return -1;
}
static void time_exit(void)
{
- if (!main_opts.attrib_server)
+ if (!main_opts.gatt_enabled)
return;
time_server_exit();