mirror of https://github.com/BOINC/boinc.git
initial checkin
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@1019 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
b55413dd23
commit
6a2d024c25
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* local/local_common.c
|
||||
*
|
||||
* DC-API functions common for master and slave side
|
||||
*
|
||||
* (c) Daniel Drotos, 2006
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Date$ */
|
||||
/* $Revision$ */
|
||||
|
||||
|
||||
#include "local_common.h"
|
||||
|
||||
|
||||
struct _DC_s_param _DC_params[cfg_nuof];
|
||||
|
||||
|
||||
void
|
||||
_DC_init_common(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i= 0; i < cfg_nuof; i++)
|
||||
{
|
||||
_DC_params[i].name= 0;
|
||||
_DC_params[i].def= 0;
|
||||
_DC_params[i].lvalue= 0;
|
||||
_DC_params[i].gvalue= 0;
|
||||
}
|
||||
_DC_params[cfg_client_message_box].name= "ClientMessageBox";
|
||||
_DC_params[cfg_client_message_box].def= "_dcapi_client_messages";
|
||||
|
||||
_DC_params[cfg_master_message_box].name= "MasterMessageBox";
|
||||
_DC_params[cfg_master_message_box].def= "_dcapi_master_messages";
|
||||
|
||||
_DC_params[cfg_subresults_box].name= "SubresultBox";
|
||||
_DC_params[cfg_subresults_box].def= "_dcapi_client_subresults";
|
||||
|
||||
_DC_params[cfg_management_box].name= "SystemMessageBox";
|
||||
_DC_params[cfg_management_box].def= "_dcapi_system_messages";
|
||||
|
||||
_DC_params[cfg_architectures].name= "Architectures";
|
||||
_DC_params[cfg_architectures].def= "Client_%s_%s";/* client_name, architecture */
|
||||
|
||||
_DC_params[cfg_submit_file].name= "SubmitFile";
|
||||
_DC_params[cfg_submit_file].def= "_dcapi_condor_submit.txt";
|
||||
|
||||
_DC_params[cfg_executable].name= "Executable";
|
||||
_DC_params[cfg_executable].def= 0/*NULL*/;
|
||||
|
||||
_DC_params[cfg_leave_files].name= "LeaveFiles";
|
||||
_DC_params[cfg_leave_files].def= "0";
|
||||
|
||||
_DC_params[cfg_condor_log].name= "CondorLog";
|
||||
_DC_params[cfg_condor_log].def= "_dcapi_internal_log.txt";
|
||||
|
||||
_DC_params[cfg_checkpoint_file].name= "CheckpointFile";
|
||||
_DC_params[cfg_checkpoint_file].def= "_dcapi_checkpoint";
|
||||
|
||||
_DC_params[cfg_output_cache].name= "SavedOutputs";
|
||||
_DC_params[cfg_output_cache].def= "_dcapi_saved_output";
|
||||
|
||||
_DC_params[cfg_condor_submit_template].name= "CondorSubmitTemplate";
|
||||
_DC_params[cfg_condor_submit_template].def= 0;
|
||||
}
|
||||
|
||||
|
||||
/* End of local/local_common.c */
|
||||
|
||||
/* Local variables: */
|
||||
/* c-file-style: "linux" */
|
||||
/* End: */
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* local/local_wu.c
|
||||
*
|
||||
* DC-API functions of master side
|
||||
*
|
||||
* (c) Daniel Drotos, 2007
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Date$ */
|
||||
/* $Revision$ */
|
||||
|
||||
#include "local_master.h"
|
||||
|
||||
|
||||
/* Get a configuration parameter */
|
||||
char *
|
||||
_DC_wu_cfg(DC_Workunit *wu,
|
||||
enum _DC_e_param what)
|
||||
{
|
||||
/*if (!_DC_wu_check(wu))
|
||||
return(NULL);*/
|
||||
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->client_name,
|
||||
_DC_params[what].name,
|
||||
/*TRUE*/1);
|
||||
if (_DC_params[what].gvalue)
|
||||
return(_DC_params[what].gvalue);
|
||||
return(_DC_params[what].def);
|
||||
}
|
||||
|
||||
|
||||
/* End of local/local_wu.c */
|
||||
|
||||
/* Local variables: */
|
||||
/* c-file-style: "linux" */
|
||||
/* End: */
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* local/local_wu.h
|
||||
*
|
||||
* DC-API functions of master side
|
||||
*
|
||||
* (c) Daniel Drotos, 2007
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Date$ */
|
||||
/* $Revision$ */
|
||||
|
||||
#ifndef __DC_API_LOCAL_WU_H
|
||||
#define __DC_API_LOCAL_WU_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Get a configuration parameter */
|
||||
char *_DC_wu_cfg(DC_Workunit *wu, enum _DC_e_param what);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* End of local/local_wu.h */
|
||||
|
||||
/* Local variables: */
|
||||
/* c-file-style: "linux" */
|
||||
/* End: */
|
Loading…
Reference in New Issue