From: lkslawek@gmail.com
To: linux-bluetooth@vger.kernel.org
Cc: Slawomir Bochenski <lkslawek@gmail.com>
Subject: [PATCH] Fix plugin close & disconnect functions call order
Date: Thu, 13 Jan 2011 11:52:04 +0100 [thread overview]
Message-ID: <1294915924-17068-1-git-send-email-lkslawek@gmail.com> (raw)
From: Slawomir Bochenski <lkslawek@gmail.com>
Normally during an OBEX session, calling sequence
service->connect - [driver->open - driver->close]* - service->disconnect
is kept. The only exception to this when the connection is reset
(when no ABORT was sent) during transfer. Then the sequence is:
service->connect - [driver->open - driver->close]* - driver->open -
service->disconnect - driver->close
This patch fixes it, so memory managament of session/transfer data in
service plugin can be easier.
---
src/obex.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/obex.c b/src/obex.c
index 65f17fc..67684fa 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -1231,6 +1231,8 @@ static void obex_handle_destroy(void *user_data)
os = OBEX_GetUserData(obex);
+ os_reset_session(os);
+
if (os->service && os->service->disconnect)
os->service->disconnect(os, os->service_data);
--
1.7.1
next reply other threads:[~2011-01-13 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 10:52 lkslawek [this message]
2011-01-13 17:15 ` [PATCH] Fix plugin close & disconnect functions call order Luiz Augusto von Dentz
2011-01-14 7:13 ` Slawomir Bochenski
2011-01-14 7:59 ` Luiz Augusto von Dentz
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=1294915924-17068-1-git-send-email-lkslawek@gmail.com \
--to=lkslawek@gmail.com \
--cc=linux-bluetooth@vger.kernel.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