use glite_jobid_const_t instead of const edg_wlc_JobId
authorMichal Voců <michal@ruk.cuni.cz>
Tue, 8 Jan 2008 16:09:41 +0000 (16:09 +0000)
committerMichal Voců <michal@ruk.cuni.cz>
Tue, 8 Jan 2008 16:09:41 +0000 (16:09 +0000)
21 files changed:
org.glite.lb.client/interface/consumer.h
org.glite.lb.client/src/ServerConnection.cpp
org.glite.lb.client/src/consumer.c
org.glite.lb.client/src/logevent.c.T
org.glite.lb.common/interface/query_rec.h
org.glite.lb.common/interface/xml_conversions.h
org.glite.lb.common/interface/xml_parse.h
org.glite.lb.common/src/xml_conversions.c
org.glite.lb.common/src/xml_parse.c.T
org.glite.lb.server/interface/query.h
org.glite.lb.server/src/il_lbproxy.c
org.glite.lb.server/src/jobstat.c
org.glite.lb.server/src/jobstat.h
org.glite.lb.server/src/lock.c
org.glite.lb.server/src/lock.h
org.glite.lb.server/src/query.c
org.glite.lb.server/src/srv_purge.c
org.glite.lb.server/src/store.c.T
org.glite.lb.server/src/ws_query.c
org.glite.lb.server/src/ws_typeref.h
org.glite.lb.types/types.T

index 5b82013..3af3669 100644 (file)
@@ -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
 );
                
index 067db53..8108e52 100644 (file)
@@ -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;
index 1dcdbdd..e834012 100644 (file)
@@ -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)
 {
index bbb5e23..82fbcd6 100644 (file)
@@ -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"
index f8b50ac..84a069e 100644 (file)
@@ -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;
 
index 8a62e8c..aa3c2a7 100644 (file)
@@ -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);
index 38f7519..1f92acc 100644 (file)
@@ -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
index 6279276..20006b3 100644 (file)
@@ -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;
index c3783a0..ca9a256 100644 (file)
@@ -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;
index 4afaa4e..66a6d67 100644 (file)
@@ -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"
index cb61235..29ab93b 100644 (file)
@@ -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;
index e274e96..a717fdc 100644 (file)
@@ -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)
index f32f0f1..7ce8c07 100644 (file)
@@ -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 **);
index 2af114e..8765f3e 100644 (file)
@@ -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;
index 693485c..2649d9a 100644 (file)
@@ -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 */
index d123efe..aabe4e6 100644 (file)
@@ -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;
index 2478ad9..91c05ac 100644 (file)
@@ -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;
index 2be77e3..fdddc18 100644 (file)
 #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;
                        }
                }
index d82d6f7..9d9b092 100644 (file)
@@ -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<flags>%s</flags>\n\t<jobId>%s</jobId>\n\n",getpid(),cflags,cjobid));
                free(cjobid);
index d5e9294..61d55f5 100644 (file)
@@ -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 *);
 
index 8e55def..7a5f651 100644 (file)
@@ -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<int>"',
                 strlist=>'"std::vector<std::string>"',