summaryrefslogtreecommitdiff
path: root/sysutils/netbt-hcidump
diff options
context:
space:
mode:
authorplunky <plunky>2011-03-20 19:56:48 +0000
committerplunky <plunky>2011-03-20 19:56:48 +0000
commit1cc3a49d99f4ca215d08f51710d8a92e7ebd6840 (patch)
tree240cd2362caf2f60ee4f6027e3987d520ac93fce /sysutils/netbt-hcidump
parent9d0cd272da5d7219b9fd2f3380cda25b1a3fe9bf (diff)
downloadpkgsrc-1cc3a49d99f4ca215d08f51710d8a92e7ebd6840.tar.gz
HCI direction message is an int, but you can't memcpy that to a uint8_t
and hope that it will work on big endian machines
Diffstat (limited to 'sysutils/netbt-hcidump')
-rw-r--r--sysutils/netbt-hcidump/distinfo4
-rw-r--r--sysutils/netbt-hcidump/patches/patch-ao26
2 files changed, 20 insertions, 10 deletions
diff --git a/sysutils/netbt-hcidump/distinfo b/sysutils/netbt-hcidump/distinfo
index fb6c6fe9f27..e26facb1e57 100644
--- a/sysutils/netbt-hcidump/distinfo
+++ b/sysutils/netbt-hcidump/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2011/01/30 20:41:29 plunky Exp $
+$NetBSD: distinfo,v 1.3 2011/03/20 19:56:48 plunky Exp $
SHA1 (bluez-4.87.tar.gz) = a7b0f04d3005e130a193afd457e4fe5450ea9aa0
RMD160 (bluez-4.87.tar.gz) = 1caa1068d99dc37f1fe48cfc3c83dd756ff03c14
@@ -19,4 +19,4 @@ SHA1 (patch-ak) = 0d7d144bb67cd5ebf8e3c74fbb0fbdcce87bc4ac
SHA1 (patch-al) = cdef6a512fc1fa4e64c59ae43ce07506103061d4
SHA1 (patch-am) = 0f3d33c1f06edabed5fef4500109a83eff599219
SHA1 (patch-an) = 35d9fd1b0d82addf0688e2997fdf589fbc89d921
-SHA1 (patch-ao) = 742edc8200deff8baeee34513e8353ee1ef2d9a1
+SHA1 (patch-ao) = f726655e31fef49fd3826853442957e770545413
diff --git a/sysutils/netbt-hcidump/patches/patch-ao b/sysutils/netbt-hcidump/patches/patch-ao
index c0d71db4578..444feb1dd10 100644
--- a/sysutils/netbt-hcidump/patches/patch-ao
+++ b/sysutils/netbt-hcidump/patches/patch-ao
@@ -1,4 +1,4 @@
-$NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
+$NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $
--- src/hcidump.c.orig 2011-01-27 04:11:41.000000000 +0000
+++ src/hcidump.c
@@ -31,7 +31,17 @@ $NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
printf("snap_len: %d filter: 0x%lx\n", snap_len, parser.filter);
-@@ -544,10 +548,13 @@ static int open_file(char *file, int mod
+@@ -299,7 +303,8 @@ static int process_frames(int dev, int s
+ while (cmsg) {
+ switch (cmsg->cmsg_type) {
+ case HCI_CMSG_DIR:
+- memcpy(&frm.in, CMSG_DATA(cmsg), sizeof(int));
++ memcpy(&i, CMSG_DATA(cmsg), sizeof(int));
++ frm.in = (uint8_t)i;
+ break;
+ case HCI_CMSG_TSTAMP:
+ memcpy(&frm.ts, CMSG_DATA(cmsg),
+@@ -544,10 +549,13 @@ static int open_file(char *file, int mod
return fd;
}
@@ -47,7 +57,7 @@ $NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
struct hci_dev_info di;
int sk, dd, opt;
-@@ -573,6 +580,7 @@ static int open_socket(int dev, unsigned
+@@ -573,6 +581,7 @@ static int open_socket(int dev, unsigned
hci_close_dev(dd);
}
@@ -55,7 +65,7 @@ $NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
/* Create HCI socket */
sk = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
-@@ -588,12 +596,13 @@ static int open_socket(int dev, unsigned
+@@ -588,12 +597,13 @@ static int open_socket(int dev, unsigned
}
opt = 1;
@@ -70,7 +80,7 @@ $NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
hci_filter_clear(&flt);
hci_filter_all_ptypes(&flt);
hci_filter_all_events(&flt);
-@@ -601,13 +610,34 @@ static int open_socket(int dev, unsigned
+@@ -601,13 +611,34 @@ static int open_socket(int dev, unsigned
perror("Can't set filter");
return -1;
}
@@ -106,7 +116,7 @@ $NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
dev, strerror(errno), errno);
return -1;
}
-@@ -784,7 +814,7 @@ static int wait_connection(char *addr, c
+@@ -784,7 +815,7 @@ static int wait_connection(char *addr, c
return -1;
}
@@ -115,7 +125,7 @@ $NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
{
while (1) {
int dd, sk;
-@@ -914,7 +944,7 @@ int main(int argc, char *argv[])
+@@ -914,7 +945,7 @@ int main(int argc, char *argv[])
{
unsigned long flags = 0;
unsigned long filter = 0;
@@ -124,7 +134,7 @@ $NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
int defpsm = 0;
int defcompid = DEFAULT_COMPID;
int opt, pppdump_fd = -1, audio_fd = -1;
-@@ -923,7 +953,7 @@ int main(int argc, char *argv[])
+@@ -923,7 +954,7 @@ int main(int argc, char *argv[])
switch(opt) {
case 'i':
if (strcasecmp(optarg, "none") && strcasecmp(optarg, "system"))