From ec3a5e6b3b28184ea7075c6de9d3e95ae37a7c4c Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Fri, 7 Dec 2012 15:06:15 -0500 Subject: keep track of shell and VXI connections separately --- instr-daemon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'instr-daemon.c') diff --git a/instr-daemon.c b/instr-daemon.c index 4924961..727b19d 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -102,11 +102,11 @@ incomingConnection (GSocketService *service, GSocketListener *listener, gpointer user_data) { - if(globals.Remote.connections +1 > maxConn) { + if(globals.Remote.terminal_connections +1 > maxConn) { g_print_debug("Connection closed. Max reached\n"); return TRUE; } - globals.Remote.connections++; + globals.Remote.terminal_connections++; g_print_debug("Incoming connection\n"); return FALSE; } @@ -127,7 +127,7 @@ handler (GThreadedSocketService *service, out = g_io_stream_get_output_stream (G_IO_STREAM (connection)); in = g_io_stream_get_input_stream (G_IO_STREAM (connection)); - g_print_debug("Handling %d connections\n", globals.Remote.connections); + g_print_debug("Handling %d connections\n", globals.Remote.terminal_connections); //register ourselves in the peers vector, use the index obtained in the stdinQueue //should not get -1 @@ -183,7 +183,7 @@ handler (GThreadedSocketService *service, } g_print_debug("Thread end\n"); - globals.Remote.connections--; //keep track of connections + globals.Remote.terminal_connections--; //keep track of connections g_async_queue_unref(queue); //unreference the queue pullIndex(g_thread_self()); //unregister from the peers vector return TRUE; @@ -416,7 +416,7 @@ static gboolean periodic_poll (void) if (GPIB_check_for_messages(globals.Registers.gpib_input_buffer)) { if (GPIB_handle_new_input(globals.Registers.gpib_input_buffer)) { - Parser_main(globals.Registers.gpib_input_buffer, 0, GPIB_start_query_response, NULL); + Parser_main(globals.Registers.gpib_input_buffer, 0, GPIB_and_VXI_start_query_response, NULL); } } -- cgit