diff options
author | daniel <danieruru@gmail.com> | 2013-01-13 13:25:38 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-01-13 13:25:38 +0900 |
commit | 7f2e52e8dbcda238268dd7339ba8c3dce908e252 (patch) | |
tree | 56f94b4bd9682a33d790dc7a3a234471e4da4eca /vxi11_server.c | |
parent | 52cc0f0f558190e310c898ec7e616ed2b8306f02 (diff) |
fire the interrupt from the right place
Diffstat (limited to 'vxi11_server.c')
-rw-r--r-- | vxi11_server.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/vxi11_server.c b/vxi11_server.c index 520cb03..1a2a175 100644 --- a/vxi11_server.c +++ b/vxi11_server.c @@ -1,3 +1,4 @@ +#include "vxi11_server.h" #include "vxi11.h" #include "globals.h" #include "gpib.h" @@ -323,11 +324,13 @@ device_unlock_1_svc(Device_Link *argp, struct svc_req *rqstp) { return &result; } -void fireinterrupt() { - Device_SrqParms params; - params.handle.handle_val = inthandler; - params.handle.handle_len = strlen(inthandler); - device_intr_srq_1(¶ms, intclient); +void vxi11_fireinterrupt() { + if (intclient != NULL) { + Device_SrqParms params; + params.handle.handle_val = inthandler; + params.handle.handle_len = strlen(inthandler); + device_intr_srq_1(¶ms, intclient); + } } Device_Error * @@ -350,7 +353,6 @@ device_enable_srq_1_svc(Device_EnableSrqParms *argp, struct svc_req *rqstp) { #ifdef DEBUG printf("Interrupt handle set to %s\n", inthandler); #endif - fireinterrupt(); } } result.error = 0; |