diff options
-rw-r--r-- | vxi11_server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vxi11_server.c b/vxi11_server.c index 801e5cf..0a243b7 100644 --- a/vxi11_server.c +++ b/vxi11_server.c @@ -112,6 +112,7 @@ device_abort_1_svc(Device_Link *argp, struct svc_req *rqstp) { Create_LinkResp * create_link_1_svc(Create_LinkParms *argp, struct svc_req *rqstp) { static Create_LinkResp result; + memset(&result, 0, sizeof(result)); #ifdef DEBUG printf("create_link_1_svc()\n"); #endif @@ -221,6 +222,7 @@ device_read_1_svc(Device_ReadParms *argp, struct svc_req *rqstp) { Device_ReadStbResp * device_readstb_1_svc(Device_GenericParms *argp, struct svc_req *rqstp) { static Device_ReadStbResp result; + memset(&result, 0, sizeof(result)); #ifdef DEBUG printf("device_readstb_1_svc()\n"); #endif @@ -228,10 +230,9 @@ device_readstb_1_svc(Device_GenericParms *argp, struct svc_req *rqstp) { result.error = ERR_INVALIDLINKINDENTIFIER; else if (isLocked() && !haveLock(argp->lid) && !waitForLock(argp->flags, argp->lock_timeout)) result.error = ERR_DEVICELOCKEDBYANOTHERLINK; - else { - result.error = 0; + else result.stb = GPIB_and_VXI_get_STB(); - } + return &result; } |