Skip to contentSkip to conversation

Fix emitting TransferCompleted twice

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages Sep 28, 2010 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Fix emitting TransferCompleted twice

From: Luiz Augusto von Dentz <[email protected]>

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(-)
src/manager.c +2 -1
index 78a329c..80140b6 100644
@@ -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)
Signature · 1 line
1.7.1
#1 lore raw

Hi Luiz,

Quoted 9 lines · Luiz Augusto von Dentz

From: Luiz Augusto von Dentz <[email protected]>

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(-)

Thanks. The patch has been pushed upstream.

Johan