diff --git a/site_ansto/anstohttp.c b/site_ansto/anstohttp.c index d7e5ea36..016baf30 100644 --- a/site_ansto/anstohttp.c +++ b/site_ansto/anstohttp.c @@ -544,6 +544,8 @@ static int AnstoHttpStart(pHistDriver self, SConnection *pCon){ static int AnstoHttpHalt(pHistDriver self){ // hmm, why isn't there a pCon like all the other ones...? pAnstoHttp pPriv = NULL; int status; + char checkstatus[20]="false"; + int i; pPriv = (pAnstoHttp)self->pPriv; assert(pPriv != NULL); @@ -553,7 +555,12 @@ static int AnstoHttpHalt(pHistDriver self){ // hmm, why isn't there a pCon like return HWFault; } - AnstoHttpStatusWithRetries(self,ANSTO_HS_STATUS_STOPPED,NULL); // no pCon available :( + //TODO check statuscheck flag + + StringDictGet(self->pOption,"statuscheck",checkstatus,20); + if (strcmp(checkstatus,"true") == 0) { + AnstoHttpStatusWithRetries(self,ANSTO_HS_STATUS_STOPPED,NULL); // no pCon available :( + } return OKOK; } @@ -810,6 +817,7 @@ pHistDriver CreateAnstoHttpDriver(pStringDict pOption){ /* add our options */ StringDictAddPair(pOption,"hmaddress","http://localhost:8080"); StringDictAddPair(pOption,"hmconfigurescript","anstohm_full.xml"); + StringDictAddPair(pOption,"statuscheck","false"); /* initialise our private data structure */ pInternal = (pAnstoHttp)malloc(sizeof(anstoHttp));