diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-12-07 15:06:15 -0500 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-12-07 15:06:15 -0500 |
commit | ec3a5e6b3b28184ea7075c6de9d3e95ae37a7c4c (patch) | |
tree | 55c7e9e7cc2ba5bbbd98bd03c6c6e7eecb75ac19 /instr-daemon.c | |
parent | 8c63fc997dbfa0e6268537482df97d0fa744010a (diff) |
keep track of shell and VXI connections separately
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); } } |