diff --git a/site_ansto/anstohttp.c b/site_ansto/anstohttp.c index 29db9651..59aa22f4 100644 --- a/site_ansto/anstohttp.c +++ b/site_ansto/anstohttp.c @@ -127,7 +127,9 @@ static int anstoHttpGet(pAnstoHttp self, char *request){ httpStatus = ghttp_process(self->syncRequest); if(httpStatus != ghttp_done){ ghttp_close(self->syncRequest); - anstoHttpGetPrepare(self,request); + if (!anstoHttpGetPrepare(self,request)) + return 0; // MJL return here if failed + ghttp_prepare(self->syncRequest); // MJL be sure to call ghttp_prepare before each ghttp_process httpStatus = ghttp_process(self->syncRequest); } if(httpStatus != ghttp_done){ @@ -321,7 +323,7 @@ static int readStatus(pHistDriver pDriv){ return 1; } /*---------------------------------------------------------------------*/ -// The status code mow allows pCon==NULL to be passed in. +// The status code now allows pCon==NULL to be passed in. // This allows the status to be checked from all the start, stop, pause // and continue callbacks, so we can wait for the server to actually // change to the correct operating state before continuing.