* [PATCH] shared: Fix not marking writer as active in mgmt
@ 2014-02-22 18:40 Szymon Janc
0 siblings, 0 replies; only message in thread
From: Szymon Janc @ 2014-02-22 18:40 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
---
src/shared/mgmt.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/shared/mgmt.c b/src/shared/mgmt.c
index ae90b89..bfc7258 100644
--- a/src/shared/mgmt.c
+++ b/src/shared/mgmt.c
@@ -209,8 +209,11 @@ static void wakeup_writer(struct mgmt *mgmt)
if (mgmt->writer_active)
return;
- io_set_write_handler(mgmt->io, can_write_data, mgmt,
- write_watch_destroy);
+ if (!io_set_write_handler(mgmt->io, can_write_data, mgmt,
+ write_watch_destroy))
+ return;
+
+ mgmt->writer_active = true;
}
struct opcode_index {
--
1.9.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-22 18:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22 18:40 [PATCH] shared: Fix not marking writer as active in mgmt Szymon Janc
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.