summaryrefslogtreecommitdiff
path: root/instr-daemon.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-12-07 11:39:09 -0500
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-12-07 11:39:09 -0500
commit401025aebc02eca587474e094fa50b2939f8a147 (patch)
tree08004457bc209b4bca1ed56b8bcc39560566d54b /instr-daemon.c
parentcf492a7c67e82818e805a67aa5e1b91ec8a595b1 (diff)
modify gpib response sending so it does not hang if read never received
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index 255b294..4924961 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -413,14 +413,19 @@ static gboolean periodic_poll (void)
globals.VxiLocks.command_in_progress = TRUE;
GPIB_check_for_device_clear_signal();
+
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_send_query_response, NULL);
+ Parser_main(globals.Registers.gpib_input_buffer, 0, GPIB_start_query_response, NULL);
}
}
+
+ // send response if appropriate
+ GPIB_finish_query_response();
+
GPIB_check_for_device_clear_signal();
- // tell VXI servers that the 4882 subsystem is avilable again
+ // tell VXI servers that the 4882 subsystem is available again
globals.VxiLocks.command_in_progress = FALSE;
}