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>
This commit is contained in:
Philip Withnall 2020-12-03 14:18:45 +00:00
parent 24b5d86d4a
commit eba2e7f056

View File

@ -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);