Bluez 4.61 broke compilation of hcidump.
The first patch fixes this for bluez 4.61, the second patch implements an
(admittedly ugly) hack to also allow to compile hcidump with older bluez
versions.
Hi Marcel,
On Wed, 17 Feb 2010 13:49:40 +0100
Stefan Seyfried <[email protected]> wrote:
> Bluez 4.61 broke compilation of hcidump.
> The first patch fixes this for bluez 4.61, the second patch implements an
> (admittedly ugly) hack to also allow to compile hcidump with older bluez
> versions.
Is there anything grossly wrong with these patches (apart from the
admitted ugliness ;) so they get ignored or do I have an email problem
with git-send-email on my side?
Thanks,
seife
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
From: Stefan Seyfried <[email protected]>
---
parser/hci.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/parser/hci.c b/parser/hci.c
index e4fc473..33c3640 100644
--- a/parser/hci.c
+++ b/parser/hci.c
@@ -41,6 +41,12 @@
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
+/* ugly hack, as hci.h changed incompatibly with bluez 4.61 */
+#ifndef OCF_READ_INQ_RESPONSE_TX_POWER_LEVEL
+#define OCF_READ_INQ_RESPONSE_TX_POWER_LEVEL OCF_READ_INQUIRY_TRANSMIT_POWER_LEVEL
+#define read_inq_response_tx_power_level_rp read_inquiry_transmit_power_level_rp
+#endif
+
#include "parser.h"
static uint16_t manufacturer = DEFAULT_COMPID;
--
1.6.6.1
From: Stefan Seyfried <[email protected]>
---
parser/hci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/parser/hci.c b/parser/hci.c
index f1507fc..e4fc473 100644
--- a/parser/hci.c
+++ b/parser/hci.c
@@ -1973,7 +1973,7 @@ static inline void read_ext_inquiry_response_dump(int level, struct frame *frm)
static inline void read_inquiry_transmit_power_level_dump(int level, struct frame *frm)
{
- read_inquiry_transmit_power_level_rp *rp = frm->ptr;
+ read_inq_response_tx_power_level_rp *rp = frm->ptr;
p_indent(level, frm);
printf("status 0x%2.2x level %d\n", rp->status, rp->level);
@@ -2325,7 +2325,7 @@ static inline void cmd_complete_dump(int level, struct frame *frm)
case OCF_READ_EXT_INQUIRY_RESPONSE:
read_ext_inquiry_response_dump(level, frm);
return;
- case OCF_READ_INQUIRY_TRANSMIT_POWER_LEVEL:
+ case OCF_READ_INQ_RESPONSE_TX_POWER_LEVEL:
read_inquiry_transmit_power_level_dump(level, frm);
return;
case OCF_READ_DEFAULT_ERROR_DATA_REPORTING:
--
1.6.6.1