public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin Röhricht" <ml@felicis.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] information responses in l2cap.c
Date: Mon, 20 Mar 2006 18:59:22 +0100	[thread overview]
Message-ID: <1142877563.18472.10.camel@localhost.localdomain> (raw)
In-Reply-To: <1142865034.19109.18.camel@localhost.localdomain>

I may have found a solution for it.

Am Montag, den 20.03.2006, 15:30 +0100 schrieb Martin R=F6hricht:
> /* build configuration request */
> l2cap_pi(sk)->conf_state |=3D L2CAP_CONF_REQ_SENT;
> l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
> 			l2cap_build_conf_req(sk, req), req);

(Damn, I posted the wrong lines in my preceeding mail, but it looks
almost the same. Instead of building a configuration request, I have
code to build an information request)
Within the send_cmd function call, I use l2cap_get_ident(conn) which
increases the ident counter by one for each call. I did mistakenly
assume that it just returns the ID for a given connection. Instead I use
now cmd->ident like this:

l2cap_send_cmd(conn, cmd->ident, L2CAP_INFO_REQ,
			l2cap_build_info_req(sk, &info), &info);

> if (!(sk =3D l2cap_get_chan_by_ident(&conn->chan_list, cmd->ident))) {
> 	printk("---> no socket!\n");
> 	return 0;
> }

These lines work now, as a socket can be found.

I'm not 100% sure yet whether this works as expected or not, but I have
a better feeling.
If somebody has some more information about socket and ID handling in
this case, feel free to let me know.

Martin



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      reply	other threads:[~2006-03-20 17:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-20 14:30 [Bluez-devel] information responses in l2cap.c Martin Röhricht
2006-03-20 17:59 ` Martin Röhricht [this message]

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=1142877563.18472.10.camel@localhost.localdomain \
    --to=ml@felicis.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /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