[PATCH BlueZ v1 1/2] sco-tester: Fix closing the socket

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

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

When writting data the socket shall not be closed until all the data
could be transmitted or the test times out.
---
 tools/sco-tester.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/sco-tester.c b/tools/sco-tester.c
index e6888348bfab..b88631d89034 100644
--- a/tools/sco-tester.c
+++ b/tools/sco-tester.c
@@ -821,6 +821,9 @@ static gboolean sco_connect_cb(GIOChannel *io, GIOCondition cond,
 					errno);
 			err = -errno;
 		}
+
+		/* Don't close the socket until all data is sent */
+		g_io_channel_set_close_on_unref(io, FALSE);
 	}
 
 	if (scodata->shutdown) {
-- 
2.48.1





[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