aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-09-29 10:16:32 -0700
committerGuy Harris <guy@alum.mit.edu>2013-09-29 10:16:32 -0700
commit50594b37d959f84701b12876af95828e20f3d82a (patch)
tree37f69eee135e854c9b44124611c71b1b55beeccd
parentdefac7c4d570317987dc20b07aec3434cb179bbd (diff)
parent04e066db32b455e1ba9e6297d8447425e1dea388 (diff)
Merge pull request #322 from oxplot/bt-fix
Fix bt_findalldevs() to correctly add devices to the devices list.
-rw-r--r--pcap-bt-linux.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pcap-bt-linux.c b/pcap-bt-linux.c
index d84e3c7a..6435bcfc 100644
--- a/pcap-bt-linux.c
+++ b/pcap-bt-linux.c
@@ -80,7 +80,6 @@ struct pcap_bt {
int
bt_findalldevs(pcap_if_t **alldevsp, char *err_str)
{
- pcap_if_t *found_dev = *alldevsp;
struct hci_dev_list_req *dev_list;
struct hci_dev_req *dev_req;
int i, sock;
@@ -124,7 +123,7 @@ bt_findalldevs(pcap_if_t **alldevsp, char *err_str)
snprintf(dev_name, 20, BT_IFACE"%d", dev_req->dev_id);
snprintf(dev_descr, 30, "Bluetooth adapter number %d", i);
- if (pcap_add_if(&found_dev, dev_name, 0,
+ if (pcap_add_if(alldevsp, dev_name, 0,
dev_descr, err_str) < 0)
{
ret = -1;