diff options
Diffstat (limited to 'instr-client.c')
-rw-r--r-- | instr-client.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/instr-client.c b/instr-client.c index 6685176..29a3fe0 100644 --- a/instr-client.c +++ b/instr-client.c @@ -8,9 +8,9 @@ #include <glib/gprintf.h> #include "response.h" +#include "globals.h" static int port = 3333; -#define BUFSIZE 1024 GMainContext *context=NULL; GMainLoop *mainLoop=NULL; @@ -54,9 +54,9 @@ static gboolean Matches(char *src, char* dst, gssize size) static gboolean stdinAvailable (GIOChannel *source, GIOCondition condition, gpointer data) { - char tmp[BUFSIZE]; - memset(tmp,0,BUFSIZE); - int size = read(0, tmp, BUFSIZE); + char tmp[STDBUFSIZE]; + memset(tmp,0,STDBUFSIZE); + int size = read(0, tmp, STDBUFSIZE); if(size<=0) { return TRUE; } @@ -133,14 +133,14 @@ stdinAvailable (GIOChannel *source, GIOCondition condition, gpointer data) //callback for server input static gboolean cbServerInput(gpointer data, gpointer additional) { - char buffer[BUFSIZE]; + char buffer[STDBUFSIZE]; gssize size=0; - memset(buffer,0,BUFSIZE); + memset(buffer,0,STDBUFSIZE); GPollableInputStream* inStream = (GPollableInputStream*)data; GError *error = NULL; - size=g_pollable_input_stream_read_nonblocking(inStream, buffer, BUFSIZE, NULL, &error); + size=g_pollable_input_stream_read_nonblocking(inStream, buffer, STDBUFSIZE, NULL, &error); if(size <=0) { terminate("Connection to server lost", -1); } |