Cleaned up ANSTO code to merge with sinqdev.sics
This is our new RELEASE-4_0 branch which was taken from ansto/93d9a7c Conflicts: .gitignore SICSmain.c asynnet.c confvirtualmot.c counter.c devexec.c drive.c event.h exebuf.c exeman.c histmem.c interface.h motor.c motorlist.c motorsec.c multicounter.c napi.c napi.h napi4.c network.c nwatch.c nxscript.c nxxml.c nxxml.h ofac.c reflist.c scan.c sicshipadaba.c sicsobj.c site_ansto/docs/Copyright.txt site_ansto/instrument/lyrebird/config/tasmad/sicscommon/nxsupport.tcl site_ansto/instrument/lyrebird/config/tasmad/taspub_sics/tasscript.tcl statusfile.c tasdrive.c tasub.c tasub.h tasublib.c tasublib.h
This commit is contained in:
15
testprot.c
15
testprot.c
@@ -103,11 +103,26 @@ static void findResponse(Ascon *a)
|
||||
dict = (pStringDict)a->private;
|
||||
status = StringDictGet(dict,GetCharArray(a->wrBuffer),response, sizeof(response));
|
||||
if(status != 1){
|
||||
if(StringDictGet(dict,"echofail",response,sizeof(response)) == 1) {
|
||||
DynStringConcat(a->rdBuffer,GetCharArray(a->wrBuffer));
|
||||
return;
|
||||
} else {
|
||||
a->state = AsconFailed;
|
||||
DynStringConcat(a->errmsg,"ERROR: no response found in dictionary for ");
|
||||
DynStringConcat(a->errmsg,GetCharArray(a->wrBuffer));
|
||||
return;
|
||||
}
|
||||
}
|
||||
/**
|
||||
Tclescape is an escape string/character which identifies a response as a tcl invocation.
|
||||
Thus the algorithm runs:
|
||||
* Find out if there is a Tcl escape
|
||||
* If so:
|
||||
* Is the tslcescape in the response
|
||||
* If so:
|
||||
* Invoke the Tcl function for the response
|
||||
In all other cases the response is passed on unmodified.
|
||||
**/
|
||||
status = StringDictGet(dict,"tclescape",tclEscape,sizeof(tclEscape));
|
||||
if(status == 1){
|
||||
test = strstr(response, tclEscape);
|
||||
|
||||
Reference in New Issue
Block a user