[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [bluetooth-dev] hci_inquiry(...)



Hi,

No, I mean:

inq_res = (inquiry_results*) kmalloc(sizeof(inquiry_results) + (num_resp * 6), GFP_ATOMIC);

Then I store all results from an inquiry like this:

nbr_of_units = X
bd1_1 bd1_2 bd1_3 bd1_4 bd1_5 bd1_6 
bd2_1 bd2_2 bd2_3 bd2_4 bd2_5 bd2_6 
...
bdX_1 bdX_2 bdX_3 bdX_4 bdX_5 bdX_6 

Best Regards

Mats Fridén

Axis Communications



>-----Original Message-----
>From: Oliver Kasten [mailto:kasten@xxxxxxx.ch]
>Sent: Monday, February 05, 2001 4:32 PM
>To: bluetooth-dev@xxxxxxx.com
>Subject: [bluetooth-dev] hci_inquiry(...)
>
>
>in hci_inquiry(...) in hci.c:
>
>results to inquiries are stored in the inq_res. the size allocated for
>the (the at) most num_resp results calculates to
>
>inq_res = (inquiry_results*) kmalloc( sizeof(inquiry_results)
>                                      + 6 * num_resp, GFP_ATOMIC );
>
>i suppose you mean:
>
>  sizeof(inquiry_results) * num_resp + 6
>
>or:
>
>  (sizeof(inquiry_results) + 6 ) * num_resp
>
>which one? what´s the +6 for?
>
>cheers,
>olli*
>
>-- 
>Oliver Kasten                                phone: +41/ 1/ 63-2 06 63
>ETH-Zurich                                     fax: +41/ 1/ 63-2 16 59
>Haldeneggsteig 4, IFW D48.1                  email: kasten@xxxxxxx.ch
>CH-8092 Zuerich, Switzerland           http://www.inf.ethz.ch/~kasten/
>-
>To unsubscribe from this list: send the line "unsubscribe 
>bluetooth-dev" in
>the body of a message to majordomo@xxxxxxx.com
>
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com