do not use dc_internal.h in slave side

move _DC_state_name() to master side


git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@1032 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
drotos 2007-02-05 08:58:33 +00:00 committed by Adam Visegradi
parent 90c99142c7
commit 6590bdc9bc
5 changed files with 32 additions and 29 deletions

View File

@ -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;

View File

@ -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
}

View File

@ -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,

View File

@ -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)
{

View File

@ -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);