[PATCH] shared: Fix not marking writer as active in mgmt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux