diff --git a/dcapi/condor/condor_master.c b/dcapi/condor/condor_master.c index b0b7778638..61c2ee528d 100644 --- a/dcapi/condor/condor_master.c +++ b/dcapi/condor/condor_master.c @@ -27,6 +27,34 @@ #include "condor_event.h" +/* some utils */ + +static struct { + DC_WUState state; + char *name; +} +_DC_state_names[]= { + { DC_WU_READY, "READY" }, + { DC_WU_RUNNING, "RUNNING" }, + { DC_WU_FINISHED, "FINISHED" }, + { DC_WU_SUSPENDED, "SUSPENDED" }, + { DC_WU_ABORTED, "ABORTED" }, + { DC_WU_UNKNOWN, "UNKNOWN" }, + { 0, NULL } +}; + + +char * +_DC_state_name(DC_WUState state) +{ + int i; + for (i= 0; _DC_state_names[i].name; i++) + if (_DC_state_names[i].state == state) + return(_DC_state_names[i].name); + return("(unknown)"); +} + + /********************************************************************* INIT */ static GHashTable *_DC_wu_table= NULL; diff --git a/dcapi/condor/condor_master.h b/dcapi/condor/condor_master.h index 5f310bf9e2..0e2ff69743 100644 --- a/dcapi/condor/condor_master.h +++ b/dcapi/condor/condor_master.h @@ -22,6 +22,8 @@ extern char *_DC_config_file; extern char *_DC_acfg(enum _DC_e_param what); +extern char *_DC_state_name(DC_WUState state); + #ifdef __cplusplus } diff --git a/dcapi/condor/condor_slave.c b/dcapi/condor/condor_slave.c index a8ce1332dc..48d828e591 100644 --- a/dcapi/condor/condor_slave.c +++ b/dcapi/condor/condor_slave.c @@ -16,7 +16,6 @@ #include "dc_common.h" #include "dc_client.h" -#include "dc_internal.h" #include "condor_common.h" #include "condor_slave.h" @@ -44,6 +43,7 @@ _DC_cfg(enum _DC_e_param what) int DC_initClient(void) { char *message; + extern int _DC_parseCfg(const char *cfgfile); int ret= _DC_parseCfg(CLIENT_CONFIG_NAME); if (ret) @@ -166,6 +166,7 @@ int DC_sendResult(const char *logicalFileName, { char *fn; int ret; + extern int _DC_copyFile(const char *src, const char *dst); DC_log(LOG_DEBUG, "DC_sendResult(%s,%s,%d)", logicalFileName, diff --git a/dcapi/condor/condor_utils.c b/dcapi/condor/condor_utils.c index fec5cb2f3f..0d286a3e6c 100644 --- a/dcapi/condor/condor_utils.c +++ b/dcapi/condor/condor_utils.c @@ -390,32 +390,6 @@ _DC_read_message(char *box, char *name, int del_msg) } -static struct { - DC_WUState state; - char *name; -} -_DC_state_names[]= { - { DC_WU_READY, "READY" }, - { DC_WU_RUNNING, "RUNNING" }, - { DC_WU_FINISHED, "FINISHED" }, - { DC_WU_SUSPENDED, "SUSPENDED" }, - { DC_WU_ABORTED, "ABORTED" }, - { DC_WU_UNKNOWN, "UNKNOWN" }, - { 0, NULL } -}; - -/* move it from here to master specific utils! */ -char * -_DC_state_name(DC_WUState state) -{ - int i; - for (i= 0; _DC_state_names[i].name; i++) - if (_DC_state_names[i].state == state) - return(_DC_state_names[i].name); - return("(unknown)"); -} - - char * _DC_quote_string(char *str) { diff --git a/dcapi/condor/condor_utils.h b/dcapi/condor/condor_utils.h index ef520d4e73..b6476c6c99 100644 --- a/dcapi/condor/condor_utils.h +++ b/dcapi/condor/condor_utils.h @@ -37,8 +37,6 @@ extern int _DC_nuof_messages(char *box, char *name); extern char *_DC_message_name(char *box, char *name); extern char *_DC_read_message(char *box, char *name, int del_msg); -/* remove it from here, it is a master only utility! */ -extern char *_DC_state_name(DC_WUState state); extern char *_DC_quote_string(char *str); extern char *_DC_unquote_string(char *str);