diff options
-rw-r--r-- | src/hcid.h | 2 | ||||
-rw-r--r-- | src/main.c | 21 |
2 files changed, 0 insertions, 23 deletions
@@ -99,8 +99,6 @@ void hci_req_queue_remove(int dev_id, bdaddr_t *dba); #define HCID_OFFMODE_DEVDOWN 0 #define HCID_OFFMODE_NOSCAN 1 -struct device_opts *alloc_device_opts(char *ref); - uint8_t get_startup_scan(int hdev); uint8_t get_startup_mode(int hdev); int get_discoverable_timeout(int dev_id); @@ -177,27 +177,6 @@ static inline void init_device_defaults(struct device_opts *device_opts) device_opts->discovto = HCID_DEFAULT_DISCOVERABLE_TIMEOUT; } -struct device_opts *alloc_device_opts(char *ref) -{ - struct device_list *device; - - device = g_try_new(struct device_list, 1); - if (!device) { - info("Can't allocate devlist opts buffer: %s (%d)", - strerror(errno), errno); - exit(1); - } - - device->ref = g_strdup(ref); - device->next = device_list; - device_list = device; - - memcpy(&device->opts, &default_device, sizeof(struct device_opts)); - device->opts.name = g_strdup(default_device.name); - - return &device->opts; -} - static void free_device_opts(void) { struct device_list *device, *next; |