mirror of https://github.com/BOINC/boinc.git
cache values of config params
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@1004 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
2f72882a82
commit
08cf3222a8
|
@ -152,16 +152,22 @@ char *
|
|||
_DC_wu_cfg(DC_Workunit *wu,
|
||||
enum _DC_e_param what)
|
||||
{
|
||||
char *v;
|
||||
|
||||
if (!_DC_wu_check(wu))
|
||||
return(NULL);
|
||||
v= DC_getClientCfgStr(wu->data.client_name,
|
||||
_DC_params[what].name,
|
||||
/*TRUE*/1);
|
||||
if (v &&
|
||||
*v)
|
||||
return(v);
|
||||
if (what >= cfg_nuof)
|
||||
return(NULL);
|
||||
if (!_DC_params[what].name)
|
||||
return(NULL);
|
||||
|
||||
if (_DC_params[what].gvalue)
|
||||
return(_DC_params[what].gvalue);
|
||||
|
||||
_DC_params[what].gvalue=
|
||||
DC_getClientCfgStr(wu->data.client_name,
|
||||
_DC_params[what].name,
|
||||
/*TRUE*/1);
|
||||
if (_DC_params[what].gvalue)
|
||||
return(_DC_params[what].gvalue);
|
||||
return(_DC_params[what].def);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue