From 1776e1d99cf107f6080e676507fc117224391805 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Voc=C5=AF?= Date: Tue, 8 Jan 2008 16:09:41 +0000 Subject: [PATCH] use glite_jobid_const_t instead of const edg_wlc_JobId --- org.glite.lb.client/interface/consumer.h | 10 +++++----- org.glite.lb.client/src/ServerConnection.cpp | 2 +- org.glite.lb.client/src/consumer.c | 10 +++++----- org.glite.lb.client/src/logevent.c.T | 2 +- org.glite.lb.common/interface/query_rec.h | 2 +- org.glite.lb.common/interface/xml_conversions.h | 2 +- org.glite.lb.common/interface/xml_parse.h | 2 +- org.glite.lb.common/src/xml_conversions.c | 2 +- org.glite.lb.common/src/xml_parse.c.T | 2 +- org.glite.lb.server/interface/query.h | 2 +- org.glite.lb.server/src/il_lbproxy.c | 2 +- org.glite.lb.server/src/jobstat.c | 4 ++-- org.glite.lb.server/src/jobstat.h | 4 ++-- org.glite.lb.server/src/lock.c | 4 ++-- org.glite.lb.server/src/lock.h | 4 ++-- org.glite.lb.server/src/query.c | 2 +- org.glite.lb.server/src/srv_purge.c | 4 ++-- org.glite.lb.server/src/store.c.T | 20 ++++++++++---------- org.glite.lb.server/src/ws_query.c | 2 +- org.glite.lb.server/src/ws_typeref.h | 2 +- org.glite.lb.types/types.T | 4 ++-- 21 files changed, 44 insertions(+), 44 deletions(-) diff --git a/org.glite.lb.client/interface/consumer.h b/org.glite.lb.client/interface/consumer.h index 5b82013..3af3669 100644 --- a/org.glite.lb.client/interface/consumer.h +++ b/org.glite.lb.client/interface/consumer.h @@ -167,7 +167,7 @@ int edg_wll_QueryJobsExtProxy( int edg_wll_JobStatus( edg_wll_Context context, - const edg_wlc_JobId jobid, + glite_jobid_const_t jobid, int flags, edg_wll_JobStat *status ); @@ -184,7 +184,7 @@ int edg_wll_JobStatus( */ int edg_wll_JobStatusProxy( edg_wll_Context context, - const edg_wlc_JobId jobid, + glite_jobid_const_t jobid, int flags, edg_wll_JobStat *status ); @@ -199,7 +199,7 @@ int edg_wll_JobStatusProxy( int edg_wll_JobLog( edg_wll_Context context, - const edg_wlc_JobId jobId, + glite_jobid_const_t jobId, edg_wll_Event ** events ); @@ -211,7 +211,7 @@ int edg_wll_JobLog( */ int edg_wll_JobLogProxy( edg_wll_Context context, - const edg_wlc_JobId jobId, + glite_jobid_const_t jobId, edg_wll_Event ** events ); @@ -302,7 +302,7 @@ int edg_wll_QueryListenerProxy( int edg_wll_QuerySequenceCodeProxy( edg_wll_Context context, - edg_wlc_JobId jobId, + glite_jobid_const_t jobId, char ** code ); diff --git a/org.glite.lb.client/src/ServerConnection.cpp b/org.glite.lb.client/src/ServerConnection.cpp index 067db53..8108e52 100644 --- a/org.glite.lb.client/src/ServerConnection.cpp +++ b/org.glite.lb.client/src/ServerConnection.cpp @@ -393,7 +393,7 @@ QueryRecord::operator edg_wll_QueryRec() const break; case JOBID: - if(glite_jobid_dup(jobid_value.c_jobid(), &out.value.j)) { + if(glite_jobid_dup(jobid_value.c_jobid(), (glite_jobid_t*)&out.value.j)) { throw std::bad_alloc(); } break; diff --git a/org.glite.lb.client/src/consumer.c b/org.glite.lb.client/src/consumer.c index 1dcdbdd..e834012 100644 --- a/org.glite.lb.client/src/consumer.c +++ b/org.glite.lb.client/src/consumer.c @@ -276,7 +276,7 @@ int edg_wll_UserJobs( int edg_wll_JobLog( edg_wll_Context ctx, - edg_wlc_JobId job, + glite_jobid_const_t job, edg_wll_Event **eventsOut) { edg_wll_QueryRec j[2], e[2]; @@ -297,7 +297,7 @@ int edg_wll_JobLog( int edg_wll_JobStatus( edg_wll_Context ctx, - edg_wlc_JobId job, + glite_jobid_const_t job, int flags, edg_wll_JobStat *stat) { @@ -440,7 +440,7 @@ int set_server_name_and_port(edg_wll_Context ctx, const edg_wll_QueryRec **job_c return(error); } -int edg_wll_QuerySequenceCodeProxy(edg_wll_Context ctx, edg_wlc_JobId jobId, char **code) +int edg_wll_QuerySequenceCodeProxy(edg_wll_Context ctx, glite_jobid_const_t jobId, char **code) { int error = 0; char *response = NULL, @@ -549,7 +549,7 @@ int edg_wll_UserJobsProxy( int edg_wll_JobLogProxy( edg_wll_Context ctx, - edg_wlc_JobId job, + glite_jobid_const_t job, edg_wll_Event **eventsOut) { ctx->isProxy = 1; @@ -559,7 +559,7 @@ int edg_wll_JobLogProxy( int edg_wll_JobStatusProxy( edg_wll_Context ctx, - edg_wlc_JobId job, + glite_jobid_const_t job, int flags, edg_wll_JobStat *stat) { diff --git a/org.glite.lb.client/src/logevent.c.T b/org.glite.lb.client/src/logevent.c.T index bbb5e23..82fbcd6 100644 --- a/org.glite.lb.client/src/logevent.c.T +++ b/org.glite.lb.client/src/logevent.c.T @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) "char *", "EDG_WLL_ARGS_STRING", "int", "EDG_WLL_ARGS_INT", "double", "EDG_WLL_ARGS_DOUBLE", - "edg_wlc_JobId", "EDG_WLL_ARGS_JOBID", + "glite_jobid_t", "EDG_WLL_ARGS_JOBID", "edg_wll_NotifId", "EDG_WLL_ARGS_NOTIFID", "edg_wll_Source", "EDG_WLL_ARGS_SOURCE", "uint16_t", "EDG_WLL_ARGS_UINT16" diff --git a/org.glite.lb.common/interface/query_rec.h b/org.glite.lb.common/interface/query_rec.h index f8b50ac..84a069e 100644 --- a/org.glite.lb.common/interface/query_rec.h +++ b/org.glite.lb.common/interface/query_rec.h @@ -91,7 +91,7 @@ typedef struct _edg_wll_QueryRec { int i; /**< integer query attribute value */ char *c; /**< character query attribute value */ struct timeval t; /**< time query attribute value */ - edg_wlc_JobId j; /**< JobId query attribute value */ + glite_jobid_const_t j; /**< JobId query attribute value */ } value, value2; } edg_wll_QueryRec; diff --git a/org.glite.lb.common/interface/xml_conversions.h b/org.glite.lb.common/interface/xml_conversions.h index 8a62e8c..aa3c2a7 100644 --- a/org.glite.lb.common/interface/xml_conversions.h +++ b/org.glite.lb.common/interface/xml_conversions.h @@ -101,7 +101,7 @@ void edg_wll_add_int_to_XMLBody(char **body, const int toAdd, const char *tag, c void edg_wll_add_float_to_XMLBody(char **body, const float toAdd, const char *tag, const float null); void edg_wll_add_double_to_XMLBody(char **body, const double toAdd, const char *tag, const double null); void edg_wll_add_timeval_to_XMLBody(char **body, struct timeval toAdd, const char *tag, const struct timeval null); -void edg_wll_add_jobid_to_XMLBody(char **body, edg_wlc_JobId toAdd, const char *tag, const void *null); +void edg_wll_add_jobid_to_XMLBody(char **body, glite_jobid_const_t toAdd, const char *tag, const void *null); void edg_wll_add_notifid_to_XMLBody(char **body, edg_wll_NotifId toAdd, const char *tag, const void *null); void edg_wll_add_edg_wll_JobStatCode_to_XMLBody(char **body, edg_wll_JobStatCode toAdd, const char *tag, const edg_wll_JobStatCode null); void edg_wll_add_edg_wll_EventCode_to_XMLBody(char **body, edg_wll_EventCode toAdd, const char *tag, const edg_wll_EventCode null); diff --git a/org.glite.lb.common/interface/xml_parse.h b/org.glite.lb.common/interface/xml_parse.h index 38f7519..1f92acc 100644 --- a/org.glite.lb.common/interface/xml_parse.h +++ b/org.glite.lb.common/interface/xml_parse.h @@ -61,7 +61,7 @@ extern int edg_wll_IndexedAttrsRequestToXML(edg_wll_Context ctx, char **message) extern int edg_wll_NotifRequestToXML( edg_wll_Context ctx, const char *function, const edg_wll_NotifId notifId, const char *address, edg_wll_NotifChangeOp op, edg_wll_QueryRec const * const *conditions, char **message); -extern int edg_wll_QuerySequenceCodeToXML(edg_wll_Context ctx, edg_wlc_JobId jobId, char **message); +extern int edg_wll_QuerySequenceCodeToXML(edg_wll_Context ctx, glite_jobid_const_t jobId, char **message); #ifdef __cplusplus diff --git a/org.glite.lb.common/src/xml_conversions.c b/org.glite.lb.common/src/xml_conversions.c index 6279276..20006b3 100644 --- a/org.glite.lb.common/src/xml_conversions.c +++ b/org.glite.lb.common/src/xml_conversions.c @@ -195,7 +195,7 @@ void edg_wll_add_timeval_to_XMLBody(char **body, struct timeval toAdd, const cha /* edg_wll_add_jobid_to_XMLBody(&body, eventsOut[i].any.jobId, "jobId", NULL) */ -void edg_wll_add_jobid_to_XMLBody(char **body, edg_wlc_JobId toAdd, const char *tag, const void *null) +void edg_wll_add_jobid_to_XMLBody(char **body, glite_jobid_const_t toAdd, const char *tag, const void *null) { if (toAdd != (edg_wlc_JobId) null) { char *newBody, *pom; diff --git a/org.glite.lb.common/src/xml_parse.c.T b/org.glite.lb.common/src/xml_parse.c.T index c3783a0..ca9a256 100644 --- a/org.glite.lb.common/src/xml_parse.c.T +++ b/org.glite.lb.common/src/xml_parse.c.T @@ -2904,7 +2904,7 @@ int edg_wll_NotifRequestToXML( /* construct Message-Body of Request-Line for edg_wll_QuerySequeceCode function */ int edg_wll_QuerySequenceCodeToXML( edg_wll_Context ctx, - edg_wlc_JobId jobId, + glite_jobid_const_t jobId, char **message) { char *pomA=NULL, *pomC=NULL; diff --git a/org.glite.lb.server/interface/query.h b/org.glite.lb.server/interface/query.h index 4afaa4e..66a6d67 100644 --- a/org.glite.lb.server/interface/query.h +++ b/org.glite.lb.server/interface/query.h @@ -10,7 +10,7 @@ #include "glite/lb/query_rec.h" int convert_event_head(edg_wll_Context,char **,edg_wll_Event *); -int check_strict_jobid(edg_wll_Context, const edg_wlc_JobId); +int check_strict_jobid(edg_wll_Context, glite_jobid_const_t); int match_status(edg_wll_Context, const edg_wll_JobStat *stat,const edg_wll_QueryRec **conditions); #define NOTIF_ALL_JOBS "all_jobs" diff --git a/org.glite.lb.server/src/il_lbproxy.c b/org.glite.lb.server/src/il_lbproxy.c index cb61235..29ab93b 100644 --- a/org.glite.lb.server/src/il_lbproxy.c +++ b/org.glite.lb.server/src/il_lbproxy.c @@ -21,7 +21,7 @@ char *lbproxy_ilog_file_prefix = FILE_PREFIX; int edg_wll_EventSendProxy( edg_wll_Context ctx, - const edg_wlc_JobId jobid, + glite_jobid_const_t jobid, const char *event) { long filepos; diff --git a/org.glite.lb.server/src/jobstat.c b/org.glite.lb.server/src/jobstat.c index e274e96..a717fdc 100644 --- a/org.glite.lb.server/src/jobstat.c +++ b/org.glite.lb.server/src/jobstat.c @@ -68,7 +68,7 @@ static char* matched_substr(char *in, regmatch_t match) int edg_wll_JobStatus( edg_wll_Context ctx, - const edg_wlc_JobId job, + glite_jobid_const_t job, int flags, edg_wll_JobStat *stat) { @@ -316,7 +316,7 @@ dag_enomem: int edg_wll_intJobStatus( edg_wll_Context ctx, - const edg_wlc_JobId job, + glite_jobid_const_t job, int flags, intJobStat *intstat, int update_db) diff --git a/org.glite.lb.server/src/jobstat.h b/org.glite.lb.server/src/jobstat.h index f32f0f1..7ce8c07 100644 --- a/org.glite.lb.server/src/jobstat.h +++ b/org.glite.lb.server/src/jobstat.h @@ -91,13 +91,13 @@ typedef enum _subjobClassCodes { SUBJOB_CLASS_REST } subjobClassCodes; -int edg_wll_JobStatus(edg_wll_Context, const edg_wlc_JobId, int, edg_wll_JobStat *); +int edg_wll_JobStatus(edg_wll_Context, glite_jobid_const_t, int, edg_wll_JobStat *); void destroy_intJobStat(intJobStat *); void destroy_intJobStat_extension(intJobStat *p); -int edg_wll_intJobStatus( edg_wll_Context, const edg_wlc_JobId, int, intJobStat *, int); +int edg_wll_intJobStatus( edg_wll_Context, glite_jobid_const_t, int, intJobStat *, int); edg_wll_ErrorCode edg_wll_StoreIntState(edg_wll_Context, intJobStat *, int); edg_wll_ErrorCode edg_wll_StoreIntStateEmbryonic(edg_wll_Context, edg_wlc_JobId, char *icnames, char *values, glite_lbu_bufInsert *bi); edg_wll_ErrorCode edg_wll_LoadIntState(edg_wll_Context , edg_wlc_JobId , int, intJobStat **); diff --git a/org.glite.lb.server/src/lock.c b/org.glite.lb.server/src/lock.c index 2af114e..8765f3e 100644 --- a/org.glite.lb.server/src/lock.c +++ b/org.glite.lb.server/src/lock.c @@ -12,7 +12,7 @@ extern int debug; -int edg_wll_JobSemaphore(const edg_wll_Context ctx, const edg_wlc_JobId job) +int edg_wll_JobSemaphore(const edg_wll_Context ctx, glite_jobid_const_t job) { char *un = edg_wlc_JobIdGetUnique(job); int n,i; @@ -32,7 +32,7 @@ int edg_wll_JobSemaphore(const edg_wll_Context ctx, const edg_wlc_JobId job) return(n % ctx->semaphores); } -int edg_wll_LockUnlockJob(const edg_wll_Context ctx,const edg_wlc_JobId job,int lock) +int edg_wll_LockUnlockJob(const edg_wll_Context ctx,glite_jobid_const_t job,int lock) { struct sembuf s; int n; diff --git a/org.glite.lb.server/src/lock.h b/org.glite.lb.server/src/lock.h index 693485c..2649d9a 100644 --- a/org.glite.lb.server/src/lock.h +++ b/org.glite.lb.server/src/lock.h @@ -8,7 +8,7 @@ #define edg_wll_LockJob(ctx,job) edg_wll_LockUnlockJob((ctx),(job),-1) #define edg_wll_UnlockJob(ctx,job) edg_wll_LockUnlockJob((ctx),(job),1) -int edg_wll_LockUnlockJob(const edg_wll_Context,const edg_wlc_JobId,int); -int edg_wll_JobSemaphore(const edg_wll_Context ctx, const edg_wlc_JobId job); +int edg_wll_LockUnlockJob(const edg_wll_Context,glite_jobid_const_t,int); +int edg_wll_JobSemaphore(const edg_wll_Context ctx, glite_jobid_const_t job); #endif /* GLITE_LB_LOCK_H */ diff --git a/org.glite.lb.server/src/query.c b/org.glite.lb.server/src/query.c index d123efe..aabe4e6 100644 --- a/org.glite.lb.server/src/query.c +++ b/org.glite.lb.server/src/query.c @@ -1566,7 +1566,7 @@ static int cmp_string(const char *s1,edg_wll_QueryOp op,const char *s2) } -int check_strict_jobid(edg_wll_Context ctx, const edg_wlc_JobId job) +int check_strict_jobid(edg_wll_Context ctx, glite_jobid_const_t job) { char *job_host; unsigned int job_port; diff --git a/org.glite.lb.server/src/srv_purge.c b/org.glite.lb.server/src/srv_purge.c index 2478ad9..91c05ac 100644 --- a/org.glite.lb.server/src/srv_purge.c +++ b/org.glite.lb.server/src/srv_purge.c @@ -42,7 +42,7 @@ static const char* const resp_headers[] = { NULL }; -static int purge_one(edg_wll_Context ctx,const edg_wlc_JobId,int,int); +static int purge_one(edg_wll_Context ctx,glite_jobid_const_t,int,int); int unset_proxy_flag(edg_wll_Context ctx, edg_wlc_JobId job); static int unset_server_flag(edg_wll_Context ctx, edg_wlc_JobId job); @@ -418,7 +418,7 @@ static void unlock_and_check(edg_wll_Context ctx,edg_wlc_JobId job) } -int purge_one(edg_wll_Context ctx,const edg_wlc_JobId job,int dump, int purge) +int purge_one(edg_wll_Context ctx,glite_jobid_const_t job,int dump, int purge) { char *dbjob; char *stmt = NULL; diff --git a/org.glite.lb.server/src/store.c.T b/org.glite.lb.server/src/store.c.T index 2be77e3..fdddc18 100644 --- a/org.glite.lb.server/src/store.c.T +++ b/org.glite.lb.server/src/store.c.T @@ -33,11 +33,11 @@ #include "db_supp.h" static int store_user(edg_wll_Context,const char *,const char *); -static int store_job(edg_wll_Context,const edg_wlc_JobId,const char *, int, int); +static int store_job(edg_wll_Context,glite_jobid_const_t,const char *, int, int); #ifdef LB_BUF -static int store_job_block(edg_wll_Context, const edg_wlc_JobId, const char *, glite_lbu_bufInsert *, int, int); +static int store_job_block(edg_wll_Context, glite_jobid_const_t, const char *, glite_lbu_bufInsert *, int, int); #endif -static int store_job_grey(edg_wll_Context,const edg_wlc_JobId,time_t); +static int store_job_grey(edg_wll_Context,glite_jobid_const_t,time_t); static int store_flesh(edg_wll_Context,edg_wll_Event *,char *,int); static int store_seq(edg_wll_Context,edg_wll_Event *,int); static int check_dup(edg_wll_Context,edg_wll_Event *); @@ -251,7 +251,7 @@ static int store_user(edg_wll_Context ctx,const char *userid,const char *subj) return edg_wll_Error(ctx,NULL,NULL); } -static int store_job(edg_wll_Context ctx,const edg_wlc_JobId job,const char *userid, int proxy, int server) +static int store_job(edg_wll_Context ctx,glite_jobid_const_t job,const char *userid, int proxy, int server) { char *jobstr = edg_wlc_JobIdUnparse(job); char *jobid = edg_wlc_JobIdGetUnique(job); @@ -303,7 +303,7 @@ static int store_job(edg_wll_Context ctx,const edg_wlc_JobId job,const char *use } #ifdef LB_BUF -static int store_job_block(edg_wll_Context ctx,const edg_wlc_JobId job,const char *userid, glite_lbu_bufInsert *bi, int proxy, int server) +static int store_job_block(edg_wll_Context ctx,glite_jobid_const_t job,const char *userid, glite_lbu_bufInsert *bi, int proxy, int server) { char *jobstr = edg_wlc_JobIdUnparse(job); char *jobid = edg_wlc_JobIdGetUnique(job); @@ -328,7 +328,7 @@ static int store_job_block(edg_wll_Context ctx,const edg_wlc_JobId job,const cha } #endif -static int store_job_grey(edg_wll_Context ctx,const edg_wlc_JobId job,time_t etime) +static int store_job_grey(edg_wll_Context ctx,glite_jobid_const_t job,time_t etime) { char *jobstr = edg_wlc_JobIdUnparse(job); char *jobid = edg_wlc_JobIdGetUnique(job); @@ -401,7 +401,7 @@ int store_job_server_proxy(edg_wll_Context ctx, edg_wll_Event *event) userid = strdup(strmd5("unknown_to_proxy", NULL)); if (store_user(ctx,userid,"unknown_to_proxy")) goto err; - if (store_job(ctx,(const edg_wlc_JobId) event->any.jobId, + if (store_job(ctx,(glite_jobid_const_t) event->any.jobId, userid, 1, ctx->serverRunning)) goto err; } @@ -421,7 +421,7 @@ int store_job_server_proxy(edg_wll_Context ctx, edg_wll_Event *event) userid = strdup(strmd5(event->any.user, NULL)); if (store_user(ctx,userid,event->any.user)) goto err; - if (store_job(ctx,(const edg_wlc_JobId) event->any.jobId, + if (store_job(ctx,(glite_jobid_const_t) event->any.jobId, userid, 1, 0)) goto err; } } @@ -443,7 +443,7 @@ int store_job_server_proxy(edg_wll_Context ctx, edg_wll_Event *event) userid = strdup(strmd5(event->any.user, NULL)); if (store_user(ctx,userid,event->any.user)) goto err; - store_job(ctx,(const edg_wlc_JobId) event->any.jobId, + store_job(ctx,(glite_jobid_const_t) event->any.jobId, userid, 1, 0); edg_wll_ResetError(ctx); @@ -487,7 +487,7 @@ int store_job_server_proxy(edg_wll_Context ctx, edg_wll_Event *event) userid = strdup(strmd5(can_peername, NULL)); if (store_user(ctx,userid,can_peername)) goto err; - if (store_job(ctx,(const edg_wlc_JobId) event->any.jobId, + if (store_job(ctx,(glite_jobid_const_t) event->any.jobId, userid, 0, 1)) goto err; } } diff --git a/org.glite.lb.server/src/ws_query.c b/org.glite.lb.server/src/ws_query.c index d82d6f7..9d9b092 100644 --- a/org.glite.lb.server/src/ws_query.c +++ b/org.glite.lb.server/src/ws_query.c @@ -72,7 +72,7 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__JobStatus( if (debug) { char *cjobid = NULL, *cflags = NULL; - cjobid = edg_wlc_JobIdUnparse((const edg_wlc_JobId) j); + cjobid = edg_wlc_JobIdUnparse(j); cflags = edg_wll_stat_flags_to_string(flags); dprintf(("[%d] \n\t%s\n\t%s\n\n",getpid(),cflags,cjobid)); free(cjobid); diff --git a/org.glite.lb.server/src/ws_typeref.h b/org.glite.lb.server/src/ws_typeref.h index d5e9294..61d55f5 100644 --- a/org.glite.lb.server/src/ws_typeref.h +++ b/org.glite.lb.server/src/ws_typeref.h @@ -71,7 +71,7 @@ extern int edg_wll_JobsQueryResToSoap(struct soap *, extern int edg_wll_UserJobsResToSoap( struct soap *, - const edg_wlc_JobId *, + glite_jobid_const_t *, const edg_wll_JobStat *, struct _lbe__UserJobsResponse *); diff --git a/org.glite.lb.types/types.T b/org.glite.lb.types/types.T index 8e55def..7a5f651 100644 --- a/org.glite.lb.types/types.T +++ b/org.glite.lb.types/types.T @@ -7,7 +7,7 @@ taglist=>'"edg_wll_TagValue *"', stslist=>'"struct _edg_wll_JobStat *"', timeval=>'"struct timeval"', - jobid=>'"edg_wlc_JobId"', + jobid=>'"glite_jobid_t"', notifid=>'"edg_wll_NotifId"', logsrc=>'"edg_wll_Source"', port=>'"uint16_t"', @@ -19,7 +19,7 @@ 'C++'=>{ string=>'"std::string"', timeval=>'"struct timeval"', - jobid=>'"edg::workload::common::jobid::JobId"', + jobid=>'"glite::jobid::JobId"', bool=>'"int"', intlist=>'"std::vector"', strlist=>'"std::vector"', -- 1.8.2.3