Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] Fix emitting TransferCompleted twice
Date: Tue, 28 Sep 2010 16:19:22 +0300	[thread overview]
Message-ID: <1285679962-10367-1-git-send-email-luiz.dentz@gmail.com> (raw)

From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>

This is caused by REQDONE and latter disconnect generating duplicate
signals in case of opp.

To fix this now we check if the object is valid before proceeding.
---
 src/manager.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/manager.c b/src/manager.c
index 78a329c..80140b6 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -648,7 +648,8 @@ void manager_emit_transfer_progress(struct obex_session *os)
 
 void manager_emit_transfer_completed(struct obex_session *os)
 {
-	emit_transfer_completed(os->cid, !os->aborted);
+	if (os->object)
+		emit_transfer_completed(os->cid, !os->aborted);
 }
 
 DBusConnection *obex_dbus_get_connection(void)
-- 
1.7.1


             reply	other threads:[~2010-09-28 13:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28 13:19 Luiz Augusto von Dentz [this message]
2010-09-28 13:41 ` [PATCH] Fix emitting TransferCompleted twice Johan Hedberg

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=1285679962-10367-1-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@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