From cc81ed5ed18464d6e632c79a1ccc9a2a8eea45b4 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Tue, 14 Aug 2012 10:32:21 -0400 Subject: astyle formatting run --- instr-client.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'instr-client.c') diff --git a/instr-client.c b/instr-client.c index a091d4e..c894bee 100644 --- a/instr-client.c +++ b/instr-client.c @@ -72,12 +72,13 @@ stdinAvailable (GIOChannel *source, GIOCondition condition, gpointer data) if (g_pollable_output_stream_is_writable(out) == FALSE) { g_print("stream is not writable\n"); } - + GError* error = NULL; - + written = g_pollable_output_stream_write_nonblocking(out, tmp, size, NULL, &error); - if(error != NULL && error->message) + if(error != NULL && error->message) { g_print("Got error: %s\n", error->message); + } if (written != size || written <= 0) { g_print("Could not write. blocking. Written: %d\n", written); @@ -96,7 +97,7 @@ static gboolean cbServerInput(gpointer data, gpointer additional) GPollableInputStream* inStream = (GPollableInputStream*)data; GError *error = NULL; - + size=g_pollable_input_stream_read_nonblocking(inStream, buffer, BUFSIZE, NULL, &error); if(size <=0) { terminate("Connection to server lost", -1); @@ -118,7 +119,7 @@ int main(int argc, char** argv) GError* error = NULL; GIOChannel* stdinChannel = NULL; client = g_socket_client_new(); - + /* connect to the host */ connection = g_socket_client_connect_to_host (client, (gchar*)"localhost", -- cgit