summaryrefslogtreecommitdiff
path: root/instr-client.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-14 10:32:21 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-14 10:32:21 -0400
commitcc81ed5ed18464d6e632c79a1ccc9a2a8eea45b4 (patch)
treef6c1168e533fe28859269c111864ce82f88a8300 /instr-client.c
parent1d122d034def5e9f7e0a76159866de0f36ab56f7 (diff)
astyle formatting run
Diffstat (limited to 'instr-client.c')
-rw-r--r--instr-client.c11
1 files changed, 6 insertions, 5 deletions
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",