From: Aarti Kumar <akmr2000@yahoo.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] L2CAP: ECONNRESET is set for every l2cap disconnect.
Date: Wed, 28 Mar 2007 08:05:19 -0700 (PDT) [thread overview]
Message-ID: <20070328150519.21340.qmail@web52303.mail.re2.yahoo.com> (raw)
In-Reply-To: <1175088059.5815.139.camel@violet>
I am sure if this issue has been discussed before or
not.
Is it necessary to the set the struct sock->err value
to ECONNRESET when l2cap disconnect request is
received from remote device ?
l2cap_disconnect_req function sets the error value in
sock structure by calling l2cap_chan_del(sk,
ECONNRESET) every time l2cap connection is
disconnected.
This might lead to some loss of data at receiver side
in case of fast sender and slow receiver.
The sender will send l2cap packets and disconnects.
The receiver side will read the packets, but once
l2cap disconnect is received, even though there is
data in sk_buff, the bt_sock_recvmsg will return 0 as
skb_recv_datagram will return NULL.
Can we set the value to ECONNRESET only in case of
error condition and for the normal disconnect set it
to 0 by calling l2cap_chan_del(sk,0) from
l2cap_disconnect_req ?
So if error field is not set in sock structure,
bt_sock_recvmsg will return data bytes till sk_buff is
empty and which case 0 will be returned. This will
prevent any data loss.
Also if the user wants to know when socket
disconnected, POLLHUP will be set for sock fd so after
disconnect happens and there is data to be read both
POLLHUP and POLLIN will set.
If we set sock err field then user will not be able to
retrieve data from sk_buff, even if POLLLIN is set.
I am using 2.6 kernel.
Thanks,
Aarti.
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
____________________________________________________________________________________
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2007-03-28 15:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-28 9:16 [Bluez-devel] hcid returning "Device or resource busy"? Bastien Nocera
2007-03-28 9:28 ` Marcel Holtmann
2007-03-28 9:56 ` Bastien Nocera
2007-03-28 10:06 ` Mayank BATRA
2007-03-28 10:18 ` Marcel Holtmann
2007-03-28 10:29 ` Mayank BATRA
2007-03-28 10:42 ` Marcel Holtmann
2007-03-28 12:34 ` Bastien Nocera
2007-03-28 12:47 ` Marcel Holtmann
2007-03-28 13:07 ` Bastien Nocera
2007-03-28 13:20 ` Marcel Holtmann
2007-03-28 15:05 ` Aarti Kumar [this message]
2007-03-29 12:18 ` Bastien Nocera
2007-03-29 12:20 ` Marcel Holtmann
2007-03-29 13:24 ` Bastien Nocera
2007-03-29 16:16 ` Marcel Holtmann
2007-03-29 5:58 ` Mayank BATRA
2007-03-31 13:56 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2007-03-28 15:27 [Bluez-devel] L2CAP: ECONNRESET is set for every l2cap disconnect Aarti Kumar
2007-03-31 13:55 ` 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=20070328150519.21340.qmail@web52303.mail.re2.yahoo.com \
--to=akmr2000@yahoo.com \
--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