[glib: 2/3] gtestdbus: Retry writes if they fail
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/3] gtestdbus: Retry writes if they fail
- Date: Thu, 3 Dec 2020 15:35:38 +0000 (UTC)
commit eba2e7f0564beb04595fcf7581f761558f877661
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Dec 3 14:18:45 2020 +0000
gtestdbus: Retry writes if they fail
It’s unlikely, but shuts up a Coverity warning.
Coverity CID: #1232156
Signed-off-by: Philip Withnall <pwithnall endlessos org>
gio/gtestdbus.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c
index 96da52c68..9cfaadbf0 100644
--- a/gio/gtestdbus.c
+++ b/gio/gtestdbus.c
@@ -282,10 +282,13 @@ watcher_send_command (const gchar *command)
{
GIOChannel *channel;
GError *error = NULL;
+ GIOStatus status;
channel = watcher_init ();
- g_io_channel_write_chars (channel, command, -1, NULL, &error);
+ do
+ status = g_io_channel_write_chars (channel, command, -1, NULL, &error);
+ while (status == G_IO_STATUS_AGAIN);
g_assert_no_error (error);
g_io_channel_flush (channel, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]