From: Aleš Křenek Date: Thu, 8 Sep 2005 17:03:15 +0000 (+0000) Subject: - add origin to attributes coming from files X-Git-Tag: gridsite-core_R_1_1_11~18 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=7efb58d416d001927f4db8f11af8542c86e1c055;p=jra1mw.git - add origin to attributes coming from files - handle also empty file names (class is enough) --- diff --git a/org.glite.jp.primary/src/attrs.c b/org.glite.jp.primary/src/attrs.c index e0277ec..63e5ed1 100644 --- a/org.glite.jp.primary/src/attrs.c +++ b/org.glite.jp.primary/src/attrs.c @@ -116,7 +116,7 @@ glite_jpps_get_attrs(glite_jp_context_t ctx,const char *job,char const *const *a if (nnames > 0) { files = realloc(files,nfiles+nnames+1 * sizeof *files); - for (j=0; names[j]; j++) { + for (j=0; jops.attr(p->fpctx,ph,other[j],&myattr)) { + int k; + for (k=0; myattr[k].name; k++) { + myattr[k].origin = GLITE_JP_ATTR_ORIG_FILE; + trio_asprintf(&myattr[k].origin_detail,"%s %s", + known_classes[ci].uri, + files[i].name ? files[i].name : ""); + } nout = merge_attrvals(&out,nout,myattr); free(myattr); } + } p->ops.close(p->fpctx,ph); }