static uint8_t current_time_read(struct attribute *a, gpointer user_data) { uint8_t value[10]; if (encode_current_time(value) < 0) return ATT_ECODE_IO; /* FIXME: Provide the adapter in next function */ attrib_db_update(NULL, a->handle, NULL, value, sizeof(value), NULL); return 0; }
static uint8_t current_time_read(struct attribute *a, struct btd_device *device, gpointer user_data) { struct btd_adapter *adapter = user_data; uint8_t value[10]; if (encode_current_time(value) < 0) return ATT_ECODE_IO; attrib_db_update(adapter, a->handle, NULL, value, sizeof(value), NULL); return 0; }