public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Rodolpho Atoji <rodolpho.atoji@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: SDP_RETRY_IF_BUSY and timeout of service search process
Date: Thu, 25 Jun 2009 12:15:57 -0300	[thread overview]
Message-ID: <40b986310906250815n79358f70ic786d05b06030f86@mail.gmail.com> (raw)
In-Reply-To: <1245901566.15367.151.camel@violet>

Hi Marcel,

>> I'm using bluez-3.32 and I would like to know the timeout
>> for the service search process, with or without using
>> SDP_RETRY_IF_BUSY.
>
> I can stop you right here. Our current release is 4.42 and the 3.x
> series is fully in maintenance mode.

Ok!

I'll be moving to 4.42, so I'll update my post based on the 4.42
sources, which are almost the same regarding to the
service search routines:

====== Updated post ======

I'm using bluez-4.42 and I would like to know the timeout
for the service search process, with or without using
SDP_RETRY_IF_BUSY.

Reading the code, it's possible to see that the function
sdp_send_req_w4_resp() is used by all the search functions.

So, without using SDP_RETRY_IF_BUSY the timeout
should be the sum of timeouts of sdp_send_req() and
sdp_read_rsp().

The timeout of sdp_send_req() is the timeout of send(),
which is SO_SNDTIMEO. The timeout of sdp_read_rsp()
is SDP_RESPONSE_TIMEOUT, so the timeout of
the service search process without retries should be
SO_SNDTIMEO + SDP_RESPONSE_TIMEOUT, am I
right?

Regarding to the "busy" state of the device, what is
it, exactly?

As shown on (sdp.c:4526):

do {
...
} while (errno == EBUSY && (flags & SDP_RETRY_IF_BUSY));

When SDP_RETRY_IF_BUSY is used, the timeout of
service search process can be indefinitely extended
above the timeout calculated?

Thanks and best regards,

Rodolpho

  reply	other threads:[~2009-06-25 15:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24 22:49 SDP_RETRY_IF_BUSY and timeout of service search process Rodolpho Atoji
2009-06-25  3:46 ` Marcel Holtmann
2009-06-25 15:15   ` Rodolpho Atoji [this message]
2009-06-25 15:17     ` Marcel Holtmann
2009-06-25 15:23       ` Rodolpho Atoji
2009-06-26  7:04         ` Marcel Holtmann

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=40b986310906250815n79358f70ic786d05b06030f86@mail.gmail.com \
    --to=rodolpho.atoji@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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