From: Marcel Holtmann <marcel@holtmann.org>
To: Volker Christian <Volker.Christian@fh-hagenberg.at>
Cc: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Bug in hcid prevents naming of devices by means of the bluetooth-address of a device
Date: Thu, 19 Apr 2007 01:41:30 +0200 [thread overview]
Message-ID: <1176939690.6741.32.camel@aeonflux.holtmann.net> (raw)
In-Reply-To: <200704162326.45143.Volker.Christian@fh-hagenberg.at>
Hi Volker,
> > > the man-page of hcid.conf describes how to configure more than one
> > > bluetooth devices installed on one machine.
> > > It says:
> > > ----------------------
> > > nn:nn:nn:nn:nn:nn
> > >
> > > Parameters specified within this section will be
> > > applied to the device with this device bluetooth
> > > address. All other parameters are applied from the
> > > default section.
> > > ----------------------
> > > This is broken in the current (3.9) and previous version of the
> > > bluez-utils. The current debian-package is also affected.
> > >
> > > Following patch to main.c of the hcid fixis this problem:
> > >
> > > --- main.c-orig 2007-04-16 20:23:41.000000000 +0200
> > > +++ main.c 2007-04-16 20:22:30.000000000 +0200
> > > @@ -124,7 +124,7 @@
> > > struct hci_dev_info di;
> > >
> > > /* First try to get BD_ADDR based settings ... */
> > > - if (!hci_devinfo(hdev, &di) < 0) {
> > > + if (!(hci_devinfo(hdev, &di) < 0)) {
> > > char addr[18];
> > > ba2str(&di.bdaddr, addr);
> > > device_opts = find_device_opts(addr);
> >
> > does "if (hci_devinfo(hdev, &di) == 0) {" also work for you?
> Yes, it also works, and it has to work. As i remember correctly, the return
> value of hci_devinfo is the return value of an ioctl-call which succeeds
> (return value 0). So hci_devinfo(...) == 0 does the job also.
this code is readable, the other version was twisting my mind. Patch is
in the CVS now.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2007-04-18 23:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-16 18:36 [Bluez-devel] Bug in hcid prevents naming of devices by means of the bluetooth-address of a device Volker Christian
2007-04-16 20:54 ` Marcel Holtmann
2007-04-16 21:26 ` Volker Christian
2007-04-18 23:41 ` Marcel Holtmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1176939690.6741.32.camel@aeonflux.holtmann.net \
--to=marcel@holtmann.org \
--cc=Volker.Christian@fh-hagenberg.at \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox