Re: [Bluez-devel] Sony PS3 sixaxis & bluez

Frédéric Blain
2007-11-26T21:04:28Z

Bastien Nocera wrote:
> Frederic, could you check it works for you?
>
Everything's fine with sixpair2.

Just need to adjust the trusts file.
This could be easily done by adding something like :

bdaddr_t hostaddr;
str2ba(option_master, &hostaddr);
write_trust(&hostaddr, device, GLOBAL_TRUST, TRUE);

instead of "//FIXME finally, set device as trusted" in handle_device()
(sixpair2.c:316)
However, write_trust() is defined in hcid/hcid.h and implemented in
hcid/storage.c.
Since both hcid/storage.c and input/storage.c implement the function
read_device_name(),
with a different prototype, it can not compile :

../hcid/hcid.h:193: error: conflicting types for 'read_device_name'
storage.h:36: error: previous declaration of 'read_device_name' was here

/tmp/ccE5MOV3.o: In function `read_device_name':
storage.c:(.opd+0x138): multiple definition of `read_device_name'

It could be good to move write_trust() and GLOBAL_TRUST (hcid/hcid.h) in
the common directory / lib.

Whatever, thanks a lot for your work,

--
creber