From: Daniel KouĊ™il Date: Thu, 30 Mar 2006 11:24:15 +0000 (+0000) Subject: Removed dependecies on the jobid library from wms-utils X-Git-Tag: glite-security-proxyrenewal_R_1_3_0~1 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=5d8a6888a3ce721a4d9eeb49898deec75ce26145;p=jra1mw.git Removed dependecies on the jobid library from wms-utils --- diff --git a/org.glite.security.proxyrenewal/Makefile b/org.glite.security.proxyrenewal/Makefile index 1da2b5f..24252c7 100644 --- a/org.glite.security.proxyrenewal/Makefile +++ b/org.glite.security.proxyrenewal/Makefile @@ -66,8 +66,6 @@ GLOBUS_LIBS:=-L${globus_prefix}/lib \ MYPROXY_LIB_NOTHR :=-L${myproxy_prefix}/lib -lmyproxy_${nothrflavour} MYPROXY_LIB_THR:=-L${myproxy_prefix}/lib -lmyproxy_${thrflavour} -JOBIDLIB:=-L${glite_location}/lib -lglite_wmsutils_cjobid - offset=1 version_info:=-version-info ${shell \ perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } @@ -106,7 +104,7 @@ default: all compile all: ${LIB} ${THRLIB} ${LIB_CORE_NOTHR} ${DAEMON} ${CLIENT} ${LIB}: ${LIBOBJ} - ${LINK} ${version_info} -o $@ ${LIBLOBJ} -rpath ${glite_location}/lib ${JOBIDLIB} + ${LINK} ${version_info} -o $@ ${LIBLOBJ} -rpath ${glite_location}/lib ${THRLIB}: ${THRLIBOBJ} ${LINK} ${version_info} -o $@ ${THRLIBLOBJ} -rpath ${glite_location}/lib @@ -118,7 +116,7 @@ ${LIB_CORE_THR}: ${LIB_CORE_THR_OBJS} ${LINK} ${version_info} -o $@ ${LIB_CORE_THR_LOBJS} -rpath ${glite_location}/lib ${MYPROXY_LIB_THR} ${VOMS_LIB_THR} ${DAEMON}: ${DAEMONOBJ} ${LIB_CORE_NOTHR} - ${LINK} -o $@ ${DAEMONOBJ} ${JOBIDLIB} ${LIB_CORE_NOTHR} + ${LINK} -o $@ ${DAEMONOBJ} ${LIB_CORE_NOTHR} ${CLIENT}: ${CLIENTOBJ} ${LIB} ${LINK} -o $@ ${CLIENTOBJ} ${LIB} ${GLOBUS_LIBS} diff --git a/org.glite.security.proxyrenewal/interface/renewal.h b/org.glite.security.proxyrenewal/interface/renewal.h index a7569f2..cf61a41 100644 --- a/org.glite.security.proxyrenewal/interface/renewal.h +++ b/org.glite.security.proxyrenewal/interface/renewal.h @@ -76,6 +76,7 @@ edg_wlpr_RegisterProxy( * The same function as edg_wlpr_RegisterProxy() but information about the * myproxy server and jobid are passed as parameters instead of in JDL. */ +#ifdef RENEWAL_HAVE_JOBID int edg_wlpr_RegisterProxyExt( const char * filename, @@ -85,6 +86,7 @@ edg_wlpr_RegisterProxyExt( int flags, char ** repository_filename ); +#endif int glite_renewal_RegisterProxy( @@ -104,11 +106,13 @@ glite_renewal_RegisterProxy( * \retval nonzero on error. Human readable form of the error can be get via * edg_wlpr_GetErrorText(). */ +#ifdef RENEWAL_HAVE_JOBID int edg_wlpr_UnregisterProxy( edg_wlc_JobId jobid, const char * repository_filename ); +#endif int glite_renewal_UnregisterProxy( @@ -152,8 +156,10 @@ edg_wlpr_GetStatus(const char *repository_filename, char **info); * \retval nonzero on error. Human readable form of the error can be get via * edg_wlpr_GetErrorText(). */ +#ifdef RENEWAL_HAVE_JOBID int edg_wlpr_GetProxy(edg_wlc_JobId jobid, char **repository_filename); +#endif int glite_renewal_GetProxy( diff --git a/org.glite.security.proxyrenewal/src/api.c b/org.glite.security.proxyrenewal/src/api.c index c0a1230..850aebf 100644 --- a/org.glite.security.proxyrenewal/src/api.c +++ b/org.glite.security.proxyrenewal/src/api.c @@ -366,6 +366,7 @@ glite_renewal_RegisterProxy(const char *filename, const char * server, return ret; } +#ifdef RENEWAL_HAVE_JOBID int edg_wlpr_RegisterProxyExt(const char *filename, const char * server, unsigned int port, @@ -384,7 +385,9 @@ edg_wlpr_RegisterProxyExt(const char *filename, const char * server, free(ji); return ret; } +#endif /* RENEWAL_HAVE_JOBID */ +#if 0 int edg_wlpr_RegisterProxy(const char *filename, const char *jdl, int flags, char **repository_filename) @@ -412,6 +415,7 @@ edg_wlpr_RegisterProxy(const char *filename, const char *jdl, return (edg_wlpr_RegisterProxyExt(filename, server, port, NULL, flags, repository_filename)); } +#endif int glite_renewal_UnregisterProxy(const char *jobid, const char *repository_filename) @@ -442,6 +446,7 @@ glite_renewal_UnregisterProxy(const char *jobid, const char *repository_filename return ret; } +#ifdef RENEWAL_HAVE_JOBID int edg_wlpr_UnregisterProxy(edg_wlc_JobId jobid, const char *repository_filename) { @@ -455,6 +460,7 @@ edg_wlpr_UnregisterProxy(edg_wlc_JobId jobid, const char *repository_filename) free(ji); return ret; } +#endif /* RENEWAL_HAVE_JOBID */ int edg_wlpr_GetList(int *count, char **list) @@ -526,6 +532,7 @@ glite_renewal_GetProxy(const char *jobid, char **repository_filename) return ret; } +#ifdef RENEWAL_HAVE_JOBID int edg_wlpr_GetProxy(edg_wlc_JobId jobid, char **repository_filename) { @@ -540,3 +547,4 @@ edg_wlpr_GetProxy(edg_wlc_JobId jobid, char **repository_filename) free(ji); return ret; } +#endif /* RENEWAL_HAVE_JOBID */ diff --git a/org.glite.security.proxyrenewal/src/client.c b/org.glite.security.proxyrenewal/src/client.c index eb2d36b..87efd78 100644 --- a/org.glite.security.proxyrenewal/src/client.c +++ b/org.glite.security.proxyrenewal/src/client.c @@ -41,7 +41,6 @@ main(int argc, char *argv[]) int port = 0; char *proxyfile = NULL; char *jobid_str = NULL; - edg_wlc_JobId jobid = NULL; char *repository_filename = NULL; int ret; int arg; @@ -69,16 +68,11 @@ main(int argc, char *argv[]) if (optind >= argc) usage(1); - if (jobid_str && edg_wlc_JobIdParse(jobid_str, &jobid)) { - fprintf(stderr, "Cannot parse jobid\n"); - exit(1); - } - if (strcmp(argv[optind], "start") == 0) { - if (proxyfile == NULL || server == NULL || jobid == NULL) + if (proxyfile == NULL || server == NULL || jobid_str == NULL) usage(1); - ret = edg_wlpr_RegisterProxyExt(proxyfile, server, port, jobid, 0, - &repository_filename); + ret = glite_renewal_RegisterProxy(proxyfile, server, port, jobid_str, 0, + &repository_filename); if (ret) { fprintf(stderr, "Registering proxy failed: %s\n", edg_wlpr_GetErrorText(ret)); @@ -89,9 +83,9 @@ main(int argc, char *argv[]) exit(0); } else if (strcmp(argv[optind], "stop") == 0) { - if (jobid == NULL) + if (jobid_str == NULL) usage(1); - ret = edg_wlpr_UnregisterProxy(jobid, proxyfile); + ret = glite_renewal_UnregisterProxy(jobid_str, proxyfile); if (ret) { fprintf(stderr, "Unregistering proxy failed: %s\n", edg_wlpr_GetErrorText(ret)); @@ -99,9 +93,9 @@ main(int argc, char *argv[]) } } else if (strcmp(argv[optind], "get") == 0) { - if (jobid == NULL) + if (jobid_str == NULL) usage(1); - ret = edg_wlpr_GetProxy(jobid, &proxyfile); + ret = glite_renewal_GetProxy(jobid_str, &proxyfile); if (ret) { fprintf(stderr, "GET request failed: %s\n", edg_wlpr_GetErrorText(ret));