From: Johan Hedberg <johan.hedberg@gmail.com>
To: Syam Sidhardhan <s.syam@samsung.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 2/2] l2test: Add support to test auto select PSM
Date: Fri, 16 Nov 2012 10:05:28 +0200 [thread overview]
Message-ID: <20121116080528.GA9653@x220> (raw)
In-Reply-To: <1352449889-5149-2-git-send-email-s.syam@samsung.com>
Hi Syam,
On Fri, Nov 09, 2012, Syam Sidhardhan wrote:
> This patch enable us to test the auto select PSM by passing
> PSM value as 0.
>
> Ex: l2test -d -P 0
> l2test[2585]: Waiting for connection on psm 4099 ...
> ---
> test/l2test.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/test/l2test.c b/test/l2test.c
> index 7645681..72ad4ba 100644
> --- a/test/l2test.c
> +++ b/test/l2test.c
> @@ -87,7 +87,7 @@ static long buffer_size = 2048;
>
> /* Default addr and psm and cid */
> static bdaddr_t bdaddr;
> -static unsigned short psm = 0x1011;
> +static unsigned short psm = 0;
> static unsigned short cid = 0;
>
> /* Default number of frames to send (-1 = infinite) */
> @@ -375,8 +375,6 @@ static int do_connect(char *svr)
> addr.l2_cid = htobs(cid);
> else if (psm)
> addr.l2_psm = htobs(psm);
> - else
> - goto error;
>
> if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0 ) {
> syslog(LOG_ERR, "Can't connect: %s (%d)",
At least the second chunk is for the initiating (client) part, not the
server (which the commit message implies you're dealing with). There's
no "auto select" for the client.
Johan
next prev parent reply other threads:[~2012-11-16 8:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 8:31 [PATCH BlueZ 1/2] build: Require D-Bus 1.5 or later Syam Sidhardhan
2012-11-09 8:31 ` [PATCH BlueZ 2/2] l2test: Add support to test auto select PSM Syam Sidhardhan
2012-11-16 8:05 ` Johan Hedberg [this message]
2012-11-19 14:09 ` Syam Sidhardhan
2012-11-09 10:44 ` [PATCH BlueZ 1/2] build: Require D-Bus 1.5 or later Marcel Holtmann
[not found] ` <CAFBvHif+xS12ywGEUdpycTtU--TVZSTgAb4mJuN_O5NKJSz36w@mail.gmail.com>
2012-11-14 13:03 ` Syam Sidhardhan
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=20121116080528.GA9653@x220 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=s.syam@samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).