file_be = file_p = NULL;
+ attr[0].name = in->tag->name;
+ attr[0].value = in->tag->value;
+ attr[0].origin = GLITE_JP_ATTR_ORIG_USER;
+ attr[0].timestamp = time(NULL);
+ attr[0].origin_detail = NULL; /* XXX */
+ attr[1].name = NULL;
+
/* XXX: we assume just one plugin and also that TAGS plugin handles
* just one uri/class */
/* XXX: assuming tag plugin handles just one type */
if (pd[0]->ops.open(pd[0]->fpctx,file_be,GLITE_JP_FILETYPE_TAGS,&file_p)
- || pd[0]->ops.generic(pd[0]->fpctx,file_p,GLITE_JP_FPLUG_TAGS_APPEND,in->tag->name,in->tag->value))
+ || pd[0]->ops.generic(pd[0]->fpctx,file_p,GLITE_JP_FPLUG_TAGS_APPEND,attr))
{
err2fault(ctx,soap);
if (file_p) pd[0]->ops.close(pd[0]->fpctx,file_p);
return SOAP_FAULT;
}
- attr[0].name = in->tag->name;
- attr[0].value = in->tag->value;
- attr[0].origin = GLITE_JP_ATTR_ORIG_USER;
- attr[0].timestamp = time(NULL);
- attr[0].origin_detail = NULL; /* XXX */
-
/* XXX: ignore errors but don't fail silenty */
glite_jpps_match_attr(ctx,in->jobid,attr);
struct tags_handle {
void *bhandle;
int n;
- glite_jp_tagval_t *tags;
+ glite_jp_attrval_t *tags;
};
int init(glite_jp_context_t ctx, glite_jpps_fplug_data_t *data)
static int tagappend(void *fpctx,void *handle,int oper,...)
{
- glite_jp_tagval_t *tag;
+ glite_jp_attrval_t *tag;
va_list ap;
char *hdr,*rec;
glite_jp_context_t ctx = fpctx;
glite_jp_clear_error(ctx);
va_start(ap,oper);
- tag = va_arg(ap,glite_jp_tagval_t *);
+ tag = va_arg(ap,glite_jp_attrval_t *);
va_end(ap);
- printf("tagappend: %s,%d,%s\n",tag->name,tag->sequence,tag->value);
+ printf("tagappend: %s,%s\n",tag->name,tag->value);
assert(oper == GLITE_JP_FPLUG_TAGS_APPEND);
return glite_jp_stack_error(ctx,&err);
}
- trio_asprintf(&hdr,"%d %ld %c",tag->sequence,
+/* XXX: origin is always USER, not recorded */
+ trio_asprintf(&hdr,"%ld %c",
tag->timestamp,tag->binary ? 'B' : 'S');
rlen = strlen(tag->name) + strlen(hdr) + 2 /* \0 after name and after hdr */ +