diff options
author | Szymon Janc <szymon.janc@gmail.com> | 2013-11-25 22:15:47 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-11-27 11:22:02 +0200 |
commit | acd6aa883bbf3440ce5c589a68877ceddbbe30b3 (patch) | |
tree | 33c463ba10e4c19a9110937bae8d3134f4cec763 /src | |
parent | bc05407e078ad09a7845138421c939731205954a (diff) | |
download | bluez-acd6aa883bbf3440ce5c589a68877ceddbbe30b3.tar.gz |
Rename adapter_find_device to btd_adapter_find_device
Allow this symbol to be exported and usable from external plugins.
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 22 | ||||
-rw-r--r-- | src/adapter.h | 2 | ||||
-rw-r--r-- | src/attrib-server.c | 2 | ||||
-rw-r--r-- | src/profile.c | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/adapter.c b/src/adapter.c index ef38d50ec..55a41dbfa 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -690,7 +690,7 @@ int adapter_set_name(struct btd_adapter *adapter, const char *name) return set_name(adapter, name); } -struct btd_device *adapter_find_device(struct btd_adapter *adapter, +struct btd_device *btd_adapter_find_device(struct btd_adapter *adapter, const bdaddr_t *dst) { struct btd_device *device; @@ -1081,7 +1081,7 @@ struct btd_device *btd_adapter_get_device(struct btd_adapter *adapter, if (!adapter) return NULL; - device = adapter_find_device(adapter, addr); + device = btd_adapter_find_device(adapter, addr); if (device) return device; @@ -4427,7 +4427,7 @@ static int adapter_authorize(struct btd_adapter *adapter, const bdaddr_t *dst, struct btd_device *device; static guint id = 0; - device = adapter_find_device(adapter, dst); + device = btd_adapter_find_device(adapter, dst); if (!device) return 0; @@ -4633,7 +4633,7 @@ int btd_adapter_pincode_reply(struct btd_adapter *adapter, /* Since a pincode was requested, update the starting time to * the point where the pincode is provided. */ - device = adapter_find_device(adapter, bdaddr); + device = btd_adapter_find_device(adapter, bdaddr); device_bonding_restart_timer(device); id = mgmt_reply(adapter->mgmt, MGMT_OP_PIN_CODE_REPLY, @@ -4967,7 +4967,7 @@ static void bonding_complete(struct btd_adapter *adapter, if (status == 0) device = btd_adapter_get_device(adapter, bdaddr, addr_type); else - device = adapter_find_device(adapter, bdaddr); + device = btd_adapter_find_device(adapter, bdaddr); if (device != NULL) device_bonding_complete(device, status); @@ -4994,7 +4994,7 @@ static void bonding_attempt_complete(struct btd_adapter *adapter, if (status == 0) device = btd_adapter_get_device(adapter, bdaddr, addr_type); else - device = adapter_find_device(adapter, bdaddr); + device = btd_adapter_find_device(adapter, bdaddr); if (status == MGMT_STATUS_AUTH_FAILED && adapter->pincode_requested) { /* On faliure, issue a bonding_retry if possible. */ @@ -5153,7 +5153,7 @@ static void dev_disconnected(struct btd_adapter *adapter, DBG("Device %s disconnected, reason %u", dst, reason); - device = adapter_find_device(adapter, &addr->bdaddr); + device = btd_adapter_find_device(adapter, &addr->bdaddr); if (device) adapter_remove_connection(adapter, device); @@ -5768,7 +5768,7 @@ static void device_blocked_callback(uint16_t index, uint16_t length, ba2str(&ev->addr.bdaddr, addr); DBG("hci%u %s blocked", index, addr); - device = adapter_find_device(adapter, &ev->addr.bdaddr); + device = btd_adapter_find_device(adapter, &ev->addr.bdaddr); if (device) device_block(device, TRUE); } @@ -5789,7 +5789,7 @@ static void device_unblocked_callback(uint16_t index, uint16_t length, ba2str(&ev->addr.bdaddr, addr); DBG("hci%u %s unblocked", index, addr); - device = adapter_find_device(adapter, &ev->addr.bdaddr); + device = btd_adapter_find_device(adapter, &ev->addr.bdaddr); if (device) device_unblock(device, FALSE, TRUE); } @@ -5811,7 +5811,7 @@ static void connect_failed_callback(uint16_t index, uint16_t length, DBG("hci%u %s status %u", index, addr, ev->status); - device = adapter_find_device(adapter, &ev->addr.bdaddr); + device = btd_adapter_find_device(adapter, &ev->addr.bdaddr); if (device) { /* If the device is in a bonding process cancel any auth request * sent to the agent before proceeding, but keep the bonding @@ -5857,7 +5857,7 @@ static void unpaired_callback(uint16_t index, uint16_t length, DBG("hci%u addr %s", index, addr); - device = adapter_find_device(adapter, &ev->addr.bdaddr); + device = btd_adapter_find_device(adapter, &ev->addr.bdaddr); if (!device) { warn("No device object for unpaired device %s", addr); return; diff --git a/src/adapter.h b/src/adapter.h index e9822438a..de5b07dc7 100644 --- a/src/adapter.h +++ b/src/adapter.h @@ -95,7 +95,7 @@ struct btd_device *btd_adapter_get_device(struct btd_adapter *adapter, uint8_t addr_type); sdp_list_t *btd_adapter_get_services(struct btd_adapter *adapter); -struct btd_device *adapter_find_device(struct btd_adapter *adapter, +struct btd_device *btd_adapter_find_device(struct btd_adapter *adapter, const bdaddr_t *dst); const char *adapter_get_path(struct btd_adapter *adapter); diff --git a/src/attrib-server.c b/src/attrib-server.c index 9231b5b3f..a6f1066ed 100644 --- a/src/attrib-server.c +++ b/src/attrib-server.c @@ -1137,7 +1137,7 @@ guint attrib_channel_attach(GAttrib *attrib) channel->server = server; - device = adapter_find_device(server->adapter, &channel->dst); + device = btd_adapter_find_device(server->adapter, &channel->dst); if (device == NULL) { error("Device object not found for attrib server"); g_free(channel); diff --git a/src/profile.c b/src/profile.c index 97cb1bc4e..3c0d27c5d 100644 --- a/src/profile.c +++ b/src/profile.c @@ -1047,7 +1047,7 @@ static struct ext_io *create_conn(struct ext_io *server, GIOChannel *io, GIOCondition cond; char addr[18]; - device = adapter_find_device(server->adapter, dst); + device = btd_adapter_find_device(server->adapter, dst); if (device == NULL) { ba2str(dst, addr); error("%s device %s not found", server->ext->name, addr); |