summaryrefslogtreecommitdiff
path: root/libvxi11client/perlbits
diff options
context:
space:
mode:
Diffstat (limited to 'libvxi11client/perlbits')
-rw-r--r--libvxi11client/perlbits/perlglue.c3
-rwxr-xr-xlibvxi11client/perlbits/testscript.pl5
2 files changed, 7 insertions, 1 deletions
diff --git a/libvxi11client/perlbits/perlglue.c b/libvxi11client/perlbits/perlglue.c
index dec97c2..7807895 100644
--- a/libvxi11client/perlbits/perlglue.c
+++ b/libvxi11client/perlbits/perlglue.c
@@ -56,10 +56,13 @@ int glue_stop_interrupt_server() {
}
freelast();
g_async_queue_unref(interruptqueue);
+ interruptqueue = NULL;
return ret;
}
char* glue_wait_for_interrupt() {
+ if (interruptqueue)
+ return NULL;
GTimeVal timeout;
g_get_current_time(&timeout);
g_time_val_add(&timeout, 2500);
diff --git a/libvxi11client/perlbits/testscript.pl b/libvxi11client/perlbits/testscript.pl
index ae23e79..ac7dd3f 100755
--- a/libvxi11client/perlbits/testscript.pl
+++ b/libvxi11client/perlbits/testscript.pl
@@ -19,7 +19,10 @@ printf "status byte is " . $statusbyte . "\n";
$instr->vxi_create_intr_chan();
$instr->vxi_enable_srq("myhandle");
-vxi_wait_for_interrupt();
+
+for (my $i = 0; $i < 10000; $i++) {
+ vxi_wait_for_interrupt();
+}
$instr->vxi_disable_srq();
$instr->vxi_destroy_intr_chan();
$instr->vxi_abort();