Added uploading of server parameters srv_xxx in order to allow SICS to control various server features and access/release its control and configuration features.
r2362 | mle | 2008-02-19 14:19:26 +1100 (Tue, 19 Feb 2008) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
0f2cde7ed9
commit
1cd243f1f4
@@ -35,6 +35,8 @@ static char statusdaq[] = {"/admin/textstatus.egi"};
|
||||
static char gethm[] = {"/admin/readhmdata.egi"};
|
||||
static char configure[] = {"/admin/configure.egi"};
|
||||
static char preset[] = {"/admin/presethm.egi"};
|
||||
static char dynamicsrvmodify[] = {"/admin/selectdynamicsrvmodify.egi?dynamicSRVmodifyparamname=%s&dynamicSRVmodifyparamvalue=%s"};
|
||||
static char dynamicfatmodify[] = {"/admin/selectdynamicfatmodify.egi?dynamicFATmodifyparamname=%s&dynamicFATmodifyparamvalue=%s"};
|
||||
/*====================================================================
|
||||
error codes
|
||||
======================================================================*/
|
||||
@@ -293,18 +295,19 @@ static int AnstoHttpConfigure(pHistDriver self, SConnection *pCon,
|
||||
pItem=StringDictGetNext(pOpt,pValue,256);
|
||||
if (pItem)
|
||||
{
|
||||
// Make special http request to set the SRV or FAT parameter
|
||||
char modify_http_request[1024]="";
|
||||
if (strncasecmp(pItem,"SRV_",4)==0)
|
||||
sprintf(modify_http_request,dynamicsrvmodify,pItem+4,pValue);
|
||||
if (strncasecmp(pItem,"FAT_",4)==0)
|
||||
sprintf(modify_http_request,dynamicfatmodify,pItem+4,pValue);
|
||||
// Try committing the setting to the histogram server
|
||||
if (*modify_http_request)
|
||||
{
|
||||
// Try committing the setting to the histogram server
|
||||
// Make special http request to set the FAT parameter
|
||||
char modify_FAT_http_request[1024];
|
||||
sprintf(modify_FAT_http_request,
|
||||
"/admin/selectdynamicfatmodify.egi?dynamicFATmodifyparamname=%s&dynamicFATmodifyparamvalue=%s",
|
||||
pItem+4,pValue);
|
||||
// Send the request. When one doesn't work, drop out of the loop.
|
||||
int status = anstoHttpGet(pPriv,modify_FAT_http_request);
|
||||
if(status != 1)
|
||||
return 0;
|
||||
// Send the request. When one doesn't work, drop out of the loop.
|
||||
int status = anstoHttpGet(pPriv,modify_http_request);
|
||||
if(status != 1)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} while(pItem);
|
||||
|
||||
Reference in New Issue
Block a user