* [Bluez-users] Bluez source code doubt
@ 2007-04-23 16:49 Bluezapper
2007-04-23 18:33 ` Loreno Oliveira
0 siblings, 1 reply; 2+ messages in thread
From: Bluezapper @ 2007-04-23 16:49 UTC (permalink / raw)
To: Bluez Users
[-- Attachment #1.1: Type: text/plain, Size: 681 bytes --]
Hi,
I am sorry if this question is silly. I am new to Bluez and C socket programming. I was going through the bluez source code but did not understand the following statements from hcitool.c:
if (hci_read_remote_version(dd, handle, &version, 20000) == 0)
if (hci_read_remote_name(dd, &bdaddr, sizeof(name), name, 25000)== 0)
What are the numbers "25000" or "20000" in these statements and I see that they are different for different statments sometimes compared to less than zero or equal to zero ??
thanks in advance for your replies,
Marco.
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
[-- Attachment #1.2: Type: text/html, Size: 884 bytes --]
[-- Attachment #2: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
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/
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Bluez-users] Bluez source code doubt
2007-04-23 16:49 [Bluez-users] Bluez source code doubt Bluezapper
@ 2007-04-23 18:33 ` Loreno Oliveira
0 siblings, 0 replies; 2+ messages in thread
From: Loreno Oliveira @ 2007-04-23 18:33 UTC (permalink / raw)
To: BlueZ users
[-- Attachment #1.1: Type: text/plain, Size: 1909 bytes --]
This is definitely not a silly question.
As far as I know, these magic numbers values refer to the timeout value for
each operation. However, I also do not understand how to choose a value for
each function call. Generally, when I need to change some code, I just copy
and past the code block and maitain the magic numbers. I just have faith
they will keep working fine in my code :-)
It would be nice to hear some words about choosing these timeouts values (
unless this is a really silly question ).
Regards,
Loreno
On 4/23/07, Bluezapper <enigma_enu@yahoo.com> wrote:
>
> Hi,
>
> I am sorry if this question is silly. I am new to Bluez and C socket
> programming. I was going through the bluez source code but did not
> understand the following statements from hcitool.c:
>
> if (hci_read_remote_version(dd, handle, &version, 20000) == 0)
>
> if (hci_read_remote_name(dd, &bdaddr, sizeof(name), name, 25000)== 0)
>
>
> What are the numbers "25000" or "20000" in these statements and I see that
> they are different for different statments sometimes compared to less than
> zero or equal to zero ??
>
>
> thanks in advance for your replies,
>
> Marco.
>
> ------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
>
>
> -------------------------------------------------------------------------
> 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-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>
[-- Attachment #1.2: Type: text/html, Size: 2763 bytes --]
[-- Attachment #2: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
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/
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-23 18:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 16:49 [Bluez-users] Bluez source code doubt Bluezapper
2007-04-23 18:33 ` Loreno Oliveira
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox