forked from epics_driver_modules/motorBase
Changes to return actual value of valueRtrn in case of error
This commit is contained in:
@@ -208,6 +208,7 @@ void SendAndReceive (int SocketIndex, char buffer[], char valueRtrn[], int retur
|
||||
if (status == asynTimeout) {
|
||||
asynPrint(psock->pasynUser, ASYN_TRACEIO_DRIVER,
|
||||
"SendAndReceive, timeout on read\n");
|
||||
strcpy(valueRtrn, "0");
|
||||
break;
|
||||
} else {
|
||||
asynPrint(psock->pasynUser, ASYN_TRACEIO_DRIVER,
|
||||
@@ -221,7 +222,7 @@ void SendAndReceive (int SocketIndex, char buffer[], char valueRtrn[], int retur
|
||||
break;
|
||||
}
|
||||
}
|
||||
strcpy(valueRtrn, "0");
|
||||
if (retries == MAX_RETRIES) strcpy(valueRtrn, "0");
|
||||
}
|
||||
epicsMutexUnlock(psock->mutexId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user