From 45bcd52046fb689f2117049b27fac8cc7b2c4c73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Fri, 12 May 2006 09:55:23 +0000 Subject: [PATCH] - proper inicialization - require user proxy --- org.glite.jp.client/examples/jpps_upload_files.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/org.glite.jp.client/examples/jpps_upload_files.c b/org.glite.jp.client/examples/jpps_upload_files.c index 3e5da0b..f33b656 100644 --- a/org.glite.jp.client/examples/jpps_upload_files.c +++ b/org.glite.jp.client/examples/jpps_upload_files.c @@ -23,8 +23,8 @@ int main(int argc, char **argv) { glite_jpcl_context_t ctx; char **files, - *jobid, - *proxy, + *jobid = NULL, + *proxy = NULL, *lbmd = NULL, *jpps = NULL; int i, j; @@ -46,6 +46,11 @@ int main(int argc, char **argv) if ( i >= argc ) { usage(); return 1; } + if ( !proxy && !(proxy = getenv("X509_USER_PROXY")) ) { + perror("-p or X509_USER_PROXY must be set!\n"); + return 1; + } + if ( !(files = calloc(argc-i+1, sizeof(*files))) ) { perror("calloc()"); return 1; -- 1.8.2.3